Difference between revisions of "LinuxCompileTroubleShooting"

From SfzWiki
Jump to: navigation, search
(Added information about LD_LIBRARY_PATH)
(error when starting : missing libzzip-0.so.12)
Line 78: Line 78:
  
 
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"
 
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"

Revision as of 06:06, 18 September 2007

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

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"

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"