Rockbox Development > Starting Development and Compiling
Cannot build simulator
(1/1)
lllf:
Hi there.
I've been trying to compile the simulator (for Sansa ClipV2 under Ubuntu 9.1, gcc4.4.1, ld2.20) without much success. I get the following messages/errors when trying to MAKE.
LD rockboxui
/home/myname/rockbox/simbuild/clip/uisimulator/libuisimulator.a(uisdl.o): In function `gui_message_loop':
/home/myname/rockbox/uisimulator/sdl/uisdl.c:147: undefined reference to `sqrt'
/home/myname/rockbox/simbuild/clip/uisimulator/libuisimulator.a(io.o): In function `sim_codec_load_ram':
/home/myname/rockbox/uisimulator/common/io.c:552: undefined reference to `dlopen'
...[some more undefined references here]
/home/myname/usr/lib/libSDL.a(SDL_alsa_audio.o): In function `UnloadALSALibrary':
SDL_alsa_audio.c:(.text+0x2a): undefined reference to `dlclose'
...[some more undefined references here]
/home/myname/usr/lib/libSDL.a(SDL_x11video.o): In function `X11_Available':
SDL_x11video.c:(.text+0x1f): undefined reference to `XOpenDisplay'
/home/myname/usr/lib/libSDL.a(SDL_x11video.o): In function `create_aux_windows':
SDL_x11video.c:(.text+0x522): undefined reference to `XCreateWindow'
...[much more undefined references here]
It seems to me that my build environment isn't configured correctly, but I can't figure out what's wrong exactly. Obviously the linker cannot find the math-library, but it's there. If I add '-lm' to the linker options in the Makefile manually the first error vanishes, but editing the auto-generated Makefile does not look much like a good solution to me.
The same goes for fcntl.h. The compiler seems to be unable to find it, but it's there (under /usr/include), however I can't get rid of this error by adding the path to the include path manually in the Makefile (which again would be a bad solution anyway).
All following errors are related to the SDL-library. I installed it in my user path, because I don't have the rights to install it globally...
Well, thanks in advance for hints and comments.
Ulf
funman:
You're using a static build of libSDL, but rockbox assumes you use a shared library.
Replace "path/$file --libs" in tools/configure (line 82) by "path/$file --static-libs", and re-run configure & make.
It should add all the needed libraries.
lllf:
That solves only half the problem (it was rather line 116 if I'm not mistaken, the change in line 82 showed no effect).
Now I get:
LD rockboxui
/home/myname/usr/lib/libSDL.a(SDL_fbevents.o): In function `FB_OpenMouse':
SDL_fbevents.c:(.text+0x1088): undefined reference to `__ctype_b'
/home/myname/usr/lib/libSDL.a(SDL_fbelo.o): In function `eloSendQuery':
SDL_fbelo.c:(.text+0x517): undefined reference to `__ctype_toupper'
/home/myname/usr/lib/libSDL.a(SDL_fbelo.o): In function `eloInitController':
SDL_fbelo.c:(.text+0x701): undefined reference to `__ctype_tolower'
collect2: ld returned 1 exit status
Something's still missing...
funman:
those are glibc symbols, not sure why they wouldn't be found.
Run with make V=1 so gcc command lines are not hidden, then copy the last one adding "-lc" (not sure that would change anything)
The other solution is to build SDL as shared library (./configure --disable-static --enable-shared) and have the simulator load this library
--- Code: ---LD_LIBRARY_PATH=/home/you/sdl-install/lib ./rockboxui
--- End code ---
lllf:
Hm, didn't work either. I will try again later this weekend... thank you so far.
Navigation
[0] Message Index
Go to full version