Hi everyone,
I am cross-compiling SDL-1.2(from svn), SDL_image-1.2(from svn), and SDL_gfx-2.0.20 under Ubuntu
9.10 for use on the BeagleBoard (arm-angstrom-linux-gnueabi). I’m using the latest versions in the
1.2 branch.
Firstly, if I configure SDL with the option “–enable-input-tslib=no” to rid the build of libts
EVERYTHING WORKS. I will get working SDL libs that I can use on the BeagleBoard with my app.
But if I don’t specify “–enable-input-tslib” it will be ENABLED because my cross environment has
the tslib files and configure finds them just fine.
ls /OE/angstrom-dev/staging/armv7a-angstrom-linux-gnueabi/usr/lib/libts*
lrwxrwxrwx 1 doug doug 18 2010-01-24 12:55 libts-1.0.so.0 -> libts-1.0.so.0.0.0
-rwxr-xr-x 1 doug doug 11417 2009-11-18 20:01 libts-1.0.so.0.0.0
-rwxr-xr-x 1 doug doug 973 2009-11-18 20:01 libts.la
lrwxrwxrwx 1 doug doug 18 2010-01-24 12:55 libts.so -> libts-1.0.so.0.0.0
Before I do anything with SDL to build it, I do this in my session first to setup the cross paths:
export PATH=/OE/angstrom-dev/cross/armv7a/bin:/OE/angstrom-dev/staging/i686-linux/usr/bin:$PATH
Now I configure and make SDL:
./configure --prefix=/home/doug/src/SDL --build=i686-linux --host=arm-angstrom-linux-gnueabi
–enable-video-directfb=no
make
make install
Next I configure and attempt to make SDL_image:
./configure --prefix=/home/doug/src/SDL --build=i686-linux --host=arm-angstrom-linux-gnueabi
–with-sdl-prefix=/home/doug/src/SDL
make
This will bomb with the last few logged lines of:
/bin/sh ./libtool --tag=CC --mode=link arm-angstrom-linux-gnueabi-gcc
-I/OE/angstrom-dev/staging/i686-linux/usr/include/libpng12 -g -O2 -I/home/doug/src/SDL/include/SDL
-D_GNU_SOURCE=1 -D_REENTRANT -no-undefined -release 1.2 -version-info 8:2:8 -o libSDL_image.la
-rpath /home/doug/src/SDL/lib IMG.lo IMG_bmp.lo IMG_gif.lo IMG_jpg.lo IMG_lbm.lo IMG_pcx.lo
IMG_png.lo IMG_pnm.lo IMG_tga.lo IMG_tif.lo IMG_xcf.lo IMG_xpm.lo IMG_xv.lo IMG_ImageIO.lo
-L/home/doug/src/SDL/lib -Wl,-rpath,/home/doug/src/SDL/lib -lSDL -lpthread
/bin/grep: /usr/lib/libts.la: No such file or directory
/OE/angstrom-dev/staging/i686-linux/usr/bin/sed: can’t read /usr/lib/libts.la: No such file or
directory
libtool: link: `/usr/lib/libts.la’ is not a valid libtool archive
make: *** [libSDL_image.la] Error 1
Upon further inspection, I noticed the following line in lib/libSDL.la:
dependency_libs=’ -lm /usr/lib/libts.la
-L/OE/angstrom-dev/staging/armv7a-angstrom-linux-gnueabi/usr/lib -ldl -lpthread’
It seems that one of the build tools (an area I suck 100% at) is trying to pickup libts.la in
/usr/lib - which is not the cross-compiler area. Note that /usr/lib/libts.la does NOT exist on my
host system.
If I manually change that line to this:
dependency_libs=’ -lm -L/OE/angstrom-dev/staging/armv7a-angstrom-linux-gnueabi/usr/lib -lts -ldl
-lpthread’
and then re-compile SDL_image, everything seems to work (not the direct path is replaced with -lts).
So this is a quick-hacked workaround.
So here’s my question. Something isn’t quite working right with libts in a cross-compiled build
environment. Everything else I’ve tested seems to be ok. So what “FIX” could be applied in the
build scripts so this works correctly?
I don’t know if the error is in autogen, libtool, or some other strange-and-complex-guru file.
I can try to provide more information if some kind soul can figure out what’s going wrong.
Thanks,
Doug.