Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Cannot build simulator
« previous next »
  • Print
Pages: [1]

Author Topic: Cannot build simulator  (Read 1407 times)

Offline lllf

  • Member
  • *
  • Posts: 3
Cannot build simulator
« on: March 05, 2010, 06:11:47 AM »
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
« Last Edit: March 05, 2010, 08:00:09 AM by lllf »
Logged

Offline funman

  • Developer
  • Member
  • *
  • Posts: 645
Re: Cannot build simulator
« Reply #1 on: March 05, 2010, 07:32:31 AM »
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.
Logged
a wise man said: "a wise man said"

Offline lllf

  • Member
  • *
  • Posts: 3
Re: Cannot build simulator
« Reply #2 on: March 05, 2010, 08:11:35 AM »
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...
Logged

Offline funman

  • Developer
  • Member
  • *
  • Posts: 645
Re: Cannot build simulator
« Reply #3 on: March 05, 2010, 08:24:22 AM »
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: [Select]
LD_LIBRARY_PATH=/home/you/sdl-install/lib ./rockboxui
Logged
a wise man said: "a wise man said"

Offline lllf

  • Member
  • *
  • Posts: 3
Re: Cannot build simulator
« Reply #4 on: March 05, 2010, 11:09:56 AM »
Hm, didn't work either. I will try again later this weekend... thank you so far.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Cannot build simulator
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.065 seconds with 15 queries.