I'm succesfully crosscompiling OpenGL ES applications for the Raspberry Pi on my 32-bit Ubuntu machine. Setting it up was easy. I cloned the 'tools' and 'firmware' directories from github, and told cmake where to look for headerfiles, libraries and the hard-fp compiler/linker. Works great.
Now I need to do some timekeeping to spawn particles. That's where things go wrong. Relevant code from the timer-class (timer.cpp):
Code: Select all
#include <time.h> [...] timespec tS; clock_gettime(CLOCK_REALTIME, &tS);
Code: Select all
/home/panik/code/raspberrypi/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/../lib/gcc/arm-bcm2708hardfp-linux-gnueabi/4.7.1/../../../../arm-bcm2708hardfp-linux-gnueabi/bin/ld: ../../lib/libgametools.a(timer.cpp.o): undefined reference to symbol '[email protected]@GLIBC_2.4' /home/panik/code/raspberrypi/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/../lib/gcc/arm-bcm2708hardfp-linux-gnueabi/4.7.1/../../../../arm-bcm2708hardfp-linux-gnueabi/bin/ld: note: '[email protected]@GLIBC_2.4' is defined in DSO /home/panik/code/raspberrypi/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/../arm-bcm2708hardfp-linux-gnueabi/sysroot/lib/librt.so.1 so try adding it to the linker command line /home/panik/code/raspberrypi/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/../arm-bcm2708hardfp-linux-gnueabi/sysroot/lib/librt.so.1: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make: *** [demo/particle/particle] Error 1 make: *** [demo/particle/CMakeFiles/particle.dir/all] Error 2 make: *** [all] Error 2
The file librt.so.1 is actually a symbolic link to librt-2.13.so. Could that have something to do with it? It's hard to google, because the word 'link' in combination with 'ld' has different meanings, but is always relevant. My google-fu fails spectacularly on this one. Any ideas?