LinuxCompileTroubleShooting
Contents
- 1 error during linking : /usr/bin/ld: cannot find -lboost_thread-mt
- 2 error when starting : cannot open shared object file
- 3 error when starting : Could not load dynamic library /usr/local/lib/OGRE/RenderSystem_GL.so
- 4 undefined reference to Ogre::...
- 5 undefined reference to ... in lugre_ode.cpp
- 6 something similar to "lua not found"
- 7 error when starting : Ogre::InternalErrorException
- 8 error when starting : missing libzzip-0.so.12
error during linking : /usr/bin/ld: cannot find -lboost_thread-mt
the library name is probably different on your distro, locate the right lib like this
locate libboost_thread | grep .so
and create a symlink like this
"ln -s /usr/lib/libboost_thread-mt-1_33_1.so /usr/lib/libboost_thread-mt.so"
./sfz: error while loading shared libraries: libfmodex.so: cannot open shared object file: No such file or directory or ./sfz: error while loading shared libraries: libOgreMain.so: cannot open shared object file: No such file or directory
as superuser/root edit the file /etc/ld.so.conf and add a line with "/usr/local/lib" or where your libOgreMain*.so file is located and run /sbin/ldconfig afterwards. this adds a searchpath for .so (shared object) files to your system (at least on ubuntu and debian i think)
to find your .so file you can use something like "locate libfmodex.so"
my /etc/ld.so.conf currently looks like this :
include /etc/ld.so.conf.d/*.conf /usr/local/lib
Alternatively, without having to use the superuser, you can set the environmental variable LD_LIBRARY_PATH to the directory where the shared library can be found. In bash, for example, you would type: export LD_LIBRARY_PATH=/usr/local/lib or export LD_LIBRARY_PATH=$HOME/sfz. Then you can run ./sfz and it should work. See man ld.so for details.
error when starting : Could not load dynamic library /usr/local/lib/OGRE/RenderSystem_GL.so
adjust plugins_linux.cfg and modify this line
PluginFolder=/usr/local/lib/OGRE
to the directory you get with
locate RenderSystem_GL.so
undefined reference to Ogre::...
you probably have an old ogre version. the debian/ubuntu packet has version 1.2.*, we need at least 1.4.0 you could try to compile ogre from source to fix that. also you might have an old version installed alongside the new version.
undefined reference to ... in lugre_ode.cpp
lugre/src/lugre_ode.o: In function `Lugre::cOdeObject::AddRelForceAtRelPos(float, float, float, float, float, float)': /somewhere/sfz/mylugre/src/lugre_ode.cpp:288: undefined reference to `dBodyAddRelForceAtRelPos' ... lugre/src/lugre_ode.o: In function `dMass': /usr/local/include/ode/mass.h:92: undefined reference to `dMassSetZero' collect2: ld returned 1 exit status scons: *** [sfz] Error 1 scons: building terminated because of errors.
you need to compile ode from source. the package doesnt work. solution : "scons configure" and then "scons" again
something similar to "lua not found"
you need lua 5.0, the newer version 5.1 will not work and is not backwards compatible, sorry.
error when starting : Ogre::InternalErrorException
terminate called after throwing an instance of 'Ogre::InternalErrorException' what(): OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library /usr/local/lib/libOgreMain-1.4.3.so/RenderSystem_GL.so. ...
edit plugins_linux.cfg and adjust the line with PluginFolder=/usr/local/lib/OGRE to the path where your RenderSystem_GL.so is (locate RenderSystem_GL.so)
error when starting : missing libzzip-0.so.12
./sfz: error while loading shared libraries: libzzip-0.so.12: cannot open shared object file: No such file or directory
Ensure you have libzzip installed.
If problem still persists,
use "locate libzzip-0" to locate your libzzip libraries, and then, symlink your existing libraries (likely to be /usr/lib/libzzip-0.so.13 or similar) to libzzip-0.so.12, using "sudo ln -s /usr/lib/libzzip-0.so.13 /usr/lib/libzzip-0.so.12"