Forums » Ryzom Game on GNU/Linux »
static client building problem
Added by Hialmar over 7 years ago
Hello,
I'm trying to build a static client on Ubuntu 9.10.
I have used the following CMake command:
cmake -DWITH_NEL_TESTS=OFF -DWITH_STATIC=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_STATIC_DRIVERS=ON -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_SERVER=OFF ..
However when I try running the client it still tries to load the driver:
2011/02/18 14:32:21 WRN 2670532400 <Unknown> init.cpp 533 checkDriverVersion : Can't check video driver version 2011/02/18 14:32:21 DBG 2670532400 <Unknown> dynloadlib.cpp 203 loadLibrary : Loading dynam ic library 'libnel_drv_opengl.so' 2011/02/18 14:32:21 WRN 2670532400 <Unknown> dynloadlib.cpp 37 nlLoadLibrary : Load library 'libnel_drv_opengl.so' failed: No such file or directory 2011/02/18 14:32:21 WRN 2670532400 <Unknown> dynloadlib.cpp 215 loadLibrary : Loading libra ry libnel_drv_opengl.so failed: libnel_drv_opengl.so: cannot open shared object file: No su ch file or directory 2011/02/18 14:32:21 INF 2670532400 <Unknown> common.cpp 541 Exception : Exception will be l aunched: nel_drv_opengl not found
I have tracked the problem to the dru.cpp file. For some reason NL_STATIC is not defined and therefore it tries to dynamically load the library.
I will try manually defining NL_STATIC in config.h (I have no idea how to do it with CMake) after doing CMake and will keep you posted.
If someone has a better idea I'd better do something else.
Replies (10)
RE: static client building problem - Added by kervala over 7 years ago
It should be WITH_STATIC_DRIVERS which defines NL_STATIC (you can verify that in code/nel/CMakeLists.txt line 3).
RE: static client building problem - Added by Hialmar over 7 years ago
Thanks.
I will try to do a
make clean ; make
to see if I forgot something.
RE: static client building problem - Added by Hialmar over 7 years ago
Now I have some problems with nelsound:
cmake -DWITH_NEL_TESTS=OFF -DWITH_STATIC=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_STATIC_DRIVERS=ON -DWITH_NEL_SAMPLES=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_SOUND=ON ..
ends with:
Linking CXX executable ../../../bin/ryzom_client
../../../lib/libnel_drv_openal.a(sound_driver_al.cpp.o): In function `NLSOUND::CSoundDriverAL::createReverbEffect()':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/sound_driver_al.cpp:454: undefined reference to `alGenAuxiliaryEffectSlots'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/sound_driver_al.cpp:462: undefined reference to `alGenEffects'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/sound_driver_al.cpp:489: undefined reference to `alEffecti'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/sound_driver_al.cpp:499: undefined reference to `alAuxiliaryEffectSloti'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/sound_driver_al.cpp:466: undefined reference to `alDeleteAuxiliaryEffectSlots'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/sound_driver_al.cpp:493: undefined reference to `alDeleteAuxiliaryEffectSlots'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/sound_driver_al.cpp:494: undefined reference to `alDeleteEffects'
../../../lib/libnel_drv_openal.a(source_al.cpp.o): In function `NLSOUND::CSourceAL::setupEffectFilter()':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:691: undefined reference to `alFilterf'
../../../lib/libnel_drv_openal.a(source_al.cpp.o): In function `NLSOUND::CSourceAL::setEffectFilter(NLSOUND::ISource::TFilter, float, float, float)':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:777: undefined reference to `alFilteri'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:774: undefined reference to `alFilteri'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:780: undefined reference to `alFilteri'
../../../lib/libnel_drv_openal.a(source_al.cpp.o): In function `NLSOUND::CSourceAL::setupDirectFilter()':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:572: undefined reference to `alFilterf'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:596: undefined reference to `alFilterf'
../../../lib/libnel_drv_openal.a(source_al.cpp.o): In function `NLSOUND::CSourceAL::setDirectFilter(NLSOUND::ISource::TFilter, float, float, float)':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:652: undefined reference to `alFilteri'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:649: undefined reference to `alFilteri'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:655: undefined reference to `alFilteri'
../../../lib/libnel_drv_openal.a(source_al.cpp.o): In function `CSourceAL':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:80: undefined reference to `alGenFilters'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:81: undefined reference to `alFilteri'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:82: undefined reference to `alFilterf'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:80: undefined reference to `alGenFilters'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:81: undefined reference to `alFilteri'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:82: undefined reference to `alFilterf'
../../../lib/libnel_drv_openal.a(source_al.cpp.o): In function `NLSOUND::CSourceAL::release()':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:110: undefined reference to `alDeleteFilters'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/source_al.cpp:109: undefined reference to `alDeleteFilters'
../../../lib/libnel_drv_openal.a(effect_al.cpp.o): In function `NLSOUND::CEffectAL::release()':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/effect_al.cpp:44: undefined reference to `alDeleteEffects'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/effect_al.cpp:43: undefined reference to `alDeleteAuxiliaryEffectSlots'
../../../lib/libnel_drv_openal.a(effect_al.cpp.o): In function `NLSOUND::CStandardReverbEffectAL::setEnvironment(NLSOUND::IReverbEffect::CEnvironment const&, float)':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/effect_al.cpp:71: undefined reference to `alEffectf'
../../../lib/libnel_drv_openal.a(effect_al.cpp.o): In function `CStandardReverbEffectAL':
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/effect_al.cpp:53: undefined reference to `alEffectf'
/home/torguet/home-vortex/ryzom/code/nel/src/sound/driver/openal/effect_al.cpp:53: undefined reference to `alEffectf'
collect2: ld returned 1 exit status
make2: * [bin/ryzom_client] Erreur 1
make1: [ryzom/client/src/CMakeFiles/ryzom_client.dir/all] Erreur 2
make: ** [all] Erreur 2
RE: static client building problem - Added by Hialmar over 7 years ago
I'll try to recompile everything with NL_SOUND=OFF
RE: static client building problem - Added by molator over 7 years ago
You will need OpenAL if you're building the client but not for the server.
So WITH_SOUND off is fine for the server.
RE: static client building problem - Added by kervala over 7 years ago
I checked http://packages.ubuntu.com/karmic/amd64/libopenal-dev/filelist and noticed it doesn't include libopenal.a so you have to compile the static library yourself.
RE: static client building problem - Added by Hialmar over 7 years ago
Ah ok thanks a lot.
I'll try that.
RE: static client building problem - Added by Hialmar over 7 years ago
Thanks a lot.
It now works :)
Edit: if someone has the same problem you need to download openal from here:
http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx
It's the last file which is currently called openal-soft-1.12.854
In order to compile a static library you need to do:
cmake -DLIBTYPE=STATIC ..
It's undocumented but it works.
Cf. http://connect.creativelabs.com/openal/Lists/OpenAL%20Development/Flat.aspx?RootFolder=%2Fopenal%2FLists%2FOpenAL%20Development%2FBuilding%20Static%20OpenAL%20in%20Linux&FolderCTID=0x01200200BB72FB7EEB38514F8CD1A9372A031174
After compiling it I copied it to the build directory of ryzom and cmake found it.
RE: static client building problem - Added by kervala over 7 years ago
You're welcome :)
The last sources for OpenAL soft can be found on this site (as mentionned on Creative site) :
http://kcat.strangesoft.net/openal.html
Btw I still think it's a Ubuntu bug to not provide a static library with a -dev package.
(1-10/10)