Freeciv
Advertisement
Forums: Index > Help desk > Compiling source on ubuntu - cant find sdl


Hi there.

I'm compiling freeciv 2.1.6 from source using the latest version of Ubuntu. I exctract the tarball, go to the new folder. and in terminal I type

% ./configure --enable-client=sdl

in order to install the sdl client.

The first few times i tried to use configure, it complained that It couldin't find sdl installed. I know I have sdl installed. I got libsdl 1.2 from the ubuntu package manager. Finally I corrected the problem by using aptitude.

% sudo aptitude install libsdl1.2-dev

For some reason, when I ran configure again, it found sdl. But now it writes:

checking for IMG_Load in -lSDL_image... no configure: error: specified client 'sdl' not configurable (SDL_image is needed (www.libsdl.org))


Package manager tells me I have sdl_image. Why can't configure find it? How to I tell configure where to find SDL and SDL_Image?


You need -dev packet for SDL-image too. That's four packages related to SDL: libsdl1.2, libsdl1.2-dev, libsdl-image1.2, libsdl-image1.2-dev. --Cazfi 21:32, 18 August 2008 (UTC)
Thank you! :) I installed the Configure works now. However now when I type make, i receive this error message.

graphics.c:30:23: error: SDL_image.h: No such file or directory

graphics.c: In function ‘load_surf’: graphics.c:282: warning: implicit declaration of function ‘IMG_Load’ graphics.c:282: warning: assignment makes pointer from integer without a cast graphics.c: In function ‘load_surf_with_flags’: graphics.c:312: warning: assignment makes pointer from integer without a cast make[3]: *** [graphics.o] Error 1 make[3]: Leaving directory `/home/normloman/tarballs/freeciv-2.1.6/client/gui-sdl' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/normloman/tarballs/freeciv-2.1.6/client' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/normloman/tarballs/freeciv-2.1.6'

make: *** [all] Error 2

Any advice on how to get it to work? I'm pretty new to Linux and I've only compiled a few things, so I apologize if this error is a product of my ignorance. 68.193.52.220 00:07, 19 August 2008 (UTC)
Some More Info: ./configure finds SDL_Image.h ok. Make still gives me an error message. I have all the SDL packages (libsdl, libsdlimage, libsdlsound, slibsdlnet, lidsdlmixer, ect. I also have the dev versions of them. When make is complete, freeciv server is installed, and works properly. The client is not installed. If I have the SDL Image Developer package, shouldn't I have SDL_Image.h as well? I can even see the file in nautilus (it's in /usr/include/SDL)Why cant the makefile find it? Is there any way I can tell make where SDL_image.h is? Any help would be greatly appreciated.
Problem Solved I got help from the freeciv forums. The make file was looking for SDL_Image.h in usr/local/include/sdl. I copied the file into that folder and sucessfully installed the sdl client. Thank you everyone for your help.
Advertisement