Open2x Libc Problem


hornett

Still Fresh
Joined
Nov 30, 2006
Messages
7
I have open2x installed on Ubuntu Dapper, and I can use it to build simple SDL apps and such then run them on the gp2x with no problems.

However, what I'd like to do is build a statically linked gpsd from source. So far I've got it to build with the following ./configure

Code:
 ./configure --host open2x --disable-dbus --without-x --disable-python  CC=open2x-gcc CFLAGS='-I"/usr/local/open2x/include/" -I"/usr/local/open2x/include/ncurses/" -DTARGET_GP2X -Os' LDFLAGS='-L"/usr/local/open2x/lib/" -static' --prefix=/mnt/sd/gpsd2/ --disable-shared --enable-static

It builds fine, but then when I try to run it on the gp2x, it complains that libc is not 2.3.5 (I have 2.2 on my gp2x).

What I'd like to know is how to make a package like this build statically, such that it will run on unmodified firmwares. I thought --disable-shared and --enable-static along with passing -static to the linker would do this but apparently not? I seem to be missing something basic to make this work.

Code:
file /mnt/sd/gpsd2/sbin/gpsd
/mnt/sd/gpsd2/sbin/gpsd: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped

Thanks!
Andy.
 

reiboul

Peace sells... but who's buying?
Joined
Jul 16, 2006
Messages
587
Age
35
Location
France
Website
Visit site
last time I tried to compile a game for the GP2X, I used this command (without configure file)

open2x-g++ Main.cpp {etc...} -L"/usr/local/open2x/libs" -I"/usr/local/open2x/include" `/usr/local/open2x/bin/sdl-config --cflags --static-libs` -static -lSDL -lSDL_ttf -lfreetype -msoft-float -static -o Out.gpe


It is a static compilation, you may play with it if you want, don't know if it can help you though :ph34r:
It only includes SDL and SDL_ttf (no sound), uses soft floats and Open2x libs (Ubuntu Edgy)
 
Top