cdevtools & opkg / how to install SDL headers?


klapse

Central Scrutinizer
Joined
Aug 30, 2012
Messages
1,932
Location
Germany
I need to compile a SDL program within cdevtools.

My cdevtools does not include the SDL header files in  /mnt/utmp/cdevtools/usr/include/.

My Pandora rootfs doesnt have the SDL header files in /usr/include

Installed on pandora via opkg are>


pandora:/mnt/utmp/cdevtools/mysrc/uqm-0.7.0# opkg list-installed |grep -i sdl
libsdl-1.2-0 - 1.2.14.1-r4.5
libsdl-gfx0 - 2.0.17-r0.5
libsdl-image-1.2-0 - 1.2.10-r4.1.5
libsdl-mixer-1.2-0 - 1.2.11-r4.5
libsdl-net-1.2-0 - 1.2.7-r1.5
libsdl-ttf-2.0-0 - 2.0.9-r0.5

I cannot find SDL header files using search <file|regexp>    List package providing <file>


opkg search SDL.h
How should I install the SDL 1.2 includes needed to compile my app?

edit: cannot find libsdl1.2**-dev.ipk on http://feeds.angstrom-distribution.org/feeds/core/ipk/uclibc/armv7a/base/

edit2: sdl headers are available from sdl homepage as an RPM. Do I need to download and extract these, then manually install to openpandora?
 
Last edited by a moderator:
Cannot remember that I did anything besides updating the outdated libSDL_mixer.so symlink in /mnt/utmp/cdevtools1000/usr/lib. And my appdata seems to confirm that. The headers should be in /mnt/utmp/cdevtools1000/usr/include. Unfortunately there is no general method to get the various build systems to find the headers and libs automatically and just do the right. For most autoconfig based builds exporting

CPPFLAGS="-I/mnt/utmp/cdevtools1000/usr/include


LDFLAGS="-L/mnt/utmp/cdevtools1000/usr/lib
should simply work.

Note that in some cases (mostly if the build wants to do something clever during linking) you run into subtle problems, e.g. with the included libgcc_s.so and the fact that LD_LIBRARY_PATH gets lost across /bin/sh invocations (because /bin/sh is setuid). I have experimented with different specs files, but I suspect there is no perfect solution except putting everything into / where it is expected (though I may just be too stupid).
 
Last edited by a moderator:
The opkg feeds have moved IIRC. Take a look at /mnt/utmp/cdevtools/etc/opkg and update the files (look at /etc/opkg for reference files).

After that, the addipk script should work

(or use codeblocks :p )
 
I managed to solve it by wgetting ftp://ftp.cs.tu-berlin.de/pub/linux/Mirrors/eisfair/pack-eis/download/10443/libsdl1.2-dev.tar.gz  and untarring it, then moving the usr/include/SDL to /usr/include.

Thanks for the tips!

edit: to get SDL_image.h I downloaded http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz and copied the .h file to /usr/include

edit2: to get SDL_mixer.h and mikmod.h I downloaded http://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.0.tar.gz and copied the .h files to /usr/include
 
Last edited by a moderator:
Back
Top