chai compiling errors
I'm getting these errors after cloning, apt-get and make_everything:
/home/gerald/Desktop/scl-manips-group_august/3rdparty/chai3d-3.0/lib/debug/libchai3d.so: error: undefined reference to 'dlopen' /home/gerald/Desktop/scl-manips-group_august/3rdparty/chai3d-3.0/lib/debug/libchai3d.so: error: undefined reference to 'dlerror' /home/gerald/Desktop/scl-manips-group_august/3rdparty/chai3d-3.0/lib/debug/libchai3d.so: error: undefined reference to 'dlclose' /home/gerald/Desktop/scl-manips-group_august/3rdparty/chai3d-3.0/lib/debug/libchai3d.so: error: undefined reference to 'dlsym' /home/gerald/Desktop/scl-manips-group_august/3rdparty/chai3d-3.0/lib/debug/libchai3d.so: error: undefined reference to 'clock_gettime'
Anyone seen this before? x86_64 x86_64 GNU/Linux
Comments (4)
-
repo owner -
repo owner -
assigned issue to
Gerald, can you confirm that this is a generic problem with updated library dependencies and not something particular to your installation? If so, I'll add the flags to the master cmake files.
-
assigned issue to
-
reporter My kernel is 3.2.* but that did that trick: CMakelists in scl_test: SET(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -pg -std=c++0x -DGRAPHICS_ON -DASSERT=assert -DDEBUG=1 -lrt -ldl") SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -std=c++0x -DGRAPHICS_ON -DW_THREADING_ON -DNDEBUG -lrt -ldl")
Linux geral 3.2.0-38-generic
#61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013 x86_64 x86_64 x86_64 GNU/LinuxThanks!
-
reporter - changed status to resolved
My kernel is 3.2.* but that did that trick: CMakelists in scl_test, scl_dynamics, scl_gc_ctrl, scl_task_ctrl, scl_example_ctrl, scl_haptic_ctrl:
SET(CMAKE_CXX_FLAGS "-Wall -fPIC -fopenmp -lrt -ldl")
Linux geral 3.2.0-38-generic
#61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013 x86_64 x86_64 x86_64 GNU/LinuxThanks!
- Log in to comment
Latest ubuntu libraries require some additional linker options. What is your kernel version? $ uname -a
Std is kernel 3.2* but some people have higher versions because they're on a new update channel. Let me know if you're higher than that.
Quick google search suggests that fix for now is to add -lrt and -ldl to linker options. Eg.
https://www.google.com/search?q=error%3A+undefined+reference+to+'clock_gettime'&oq=error%3A+undefined+reference+to+'clock_gettime'&aqs=chrome.0.69i57j0.1293j0&sourceid=chrome&ie=UTF-8
http://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-reference-to-clock-gettime-and-clock-settim