LinuxCompileTroubleShooting

From SfzWiki
Revision as of 00:42, 25 October 2008 by Ghoulsblade (Talk | contribs)

Jump to: navigation, search

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"

error when starting : cannot open shared object file

./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

lugre/src/lugre_thread.cpp:122: error: 'boost' has not been declared

you need the boost thread libs, they might not be part of the standard boost package on some distros

for debian or ubtuntu try  apt-get install libboost-thread-dev

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

Ogre::MovableObject::visitRenderables (ogre 1.6.* shoggoth)

you'll have to apply patches to the code to use the latest ogre version

  • ./data/shoggoth_patch
  • in lugre folder: patch -p0 < patches/shoggoth.patch
  • in data folder: patch -p0 < shoggoth_patch

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"

problems with lua

if you get something like "No package 'lualib50' found" maybe one of the following will help :

we use lua50 , try uninstalling lua51, it is not backwards compatible.

if your linux distro is debian or ubuntu based, please try apt-get install liblua50 liblualib50 lua50 liblua50-dev liblualib50-dev or similar.

if you built lua from source, be sure to do "make install"

try "locate liblua" and add the path where it is to /etc/ld.so.conf

execute /sbin/ldconfig after changing something

the lua packages might have different names, and there might be only one instead of lua and lualib, try editing configure.ac and adjust the package names, check the output of "pkg-config --list-all | grep lua"

ogre error during check for boost in configure

Checking for Boost version >= 1.33... .sconf_temp/conftest_6: error while loading shared libraries: libOgreMain-1.4.5.so: cannot open shared object file: No such file or directory

this is a bit strange and not really related to boost, probably a bug in the scons detection, try editing /etc/ldconf.so and /sbin/ldconf

(this is a stub entry, see other errors for similar fix)