FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: Problem compiling Guichan in Linux with nonstandard SDL paths  (Read 3073 times)

dae

  • Newbie
  • Posts: 2
    • View Profile
Problem compiling Guichan in Linux with nonstandard SDL paths
« on: October 26, 2011, 07:11:41 am »

Hi,

I'm considering using FIFE in my project. I'm new to it and also don't know everything about Linux, so getting started is giving me some trouble.

I'm trying to compile FIFE 0.3.3 in 64bit Linux. I don't have admin rights so I installed SDL, SDL_Image and other stuff in a nonstandard location by compiling them from sources, giving --prefix=foo for the configure scripts. I edited build/linux2-config.py for the necessary lib and include paths (adding prefix/include, prefix/include/SDL to CPPPATH and prefix/LIB to LIBPATH and LD_RUN_PATH).

When I try to run "scons ext", it seems the prefix/paths from linux2-config.py are not sent to the commands that configure and compile the included Guichan. It apparently finds the systemwide SDL headers from /usr/include instead of what I installed, and there is no SDL_Image there. So Guichan fails to use SDL.

Then I tried to manually compile Guichain using configure --prefix=foo; make; make install, and now it found the SDL_Image.h, but then:

Code: [Select]
checking SDL/SDL_image.h usability... yes
checking SDL/SDL_image.h presence... yes
checking for SDL/SDL_image.h... yes
checking for IMG_Load in -lSDL_image... no
configure: WARNING: SDL_image support skipped when SDL_image not found.

I can't read configure scripts well enough to understand what it's doing and why it fails. If I edit configure to skip the test, then make fails, since the compile commands don't use -I or -L to specify the paths to SDL_Image (despite running configure --prefix=foo before that):

Code: [Select]
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../include -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g
-O2 -Wall -Wno-unused -DGUICHAN_BUILD -MT sdlimageloader.lo -MD -MP -MF .deps/sdlimageloader.Tpo -c sdlimageloader.cpp
-fPIC -DPIC -o .libs/sdlimageloader.o
sdlimageloader.cpp:50:23: fatal error: SDL_image.h: No such file or directory

I also tried to randomly edit various .pc files to put in the correct paths, but since I don't understand what they do, it's no wonder I didn't get it to work by that. So, how do I tell either scons or the Guichan compile commands where to find the SDL_Image files?

Any help is appreciated. Thanks.
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: Problem compiling Guichan in Linux with nonstandard SDL paths
« Reply #1 on: October 26, 2011, 02:19:50 pm »

Currently the scons "ext" build target does not pass user specified command line parameters to the guichan build process. I have not looked into too closely yet, so I am not sure how flexible the guichan build scripts are to receiving outside inputs.

If it is possible to pass configuration arguments to the guichan build scripts then it will be a matter of the scons build target passing the correct parameters to point to another location to look for lib and headers. As of now I do not think it will work without modifying the fife build system.
Logged

dae

  • Newbie
  • Posts: 2
    • View Profile
Re: Problem compiling Guichan in Linux with nonstandard SDL paths
« Reply #2 on: October 27, 2011, 03:03:31 am »

Currently the scons "ext" build target does not pass user specified command line parameters to the guichan build process.

Thanks for the reply.

Could it be possible, then, to somehow manually build guichan with the correct paths? Would fife work even if guichan did compile, or does the scons ext target do something extra besides calling configure; make; make install?

For all the other fife dependencies a mere configure --prefix (or similar) was enough to help them find the libraries, but as explained above, that didn't help with guichan. I don't have the expertise to guess what else it might need. Maybe I should go find a guichan forum and ask them.
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: Problem compiling Guichan in Linux with nonstandard SDL paths
« Reply #3 on: October 27, 2011, 09:17:06 am »

I'm not familiar enough with the guichan build system or autotools in general to know what command options are available for building.

The scons ext build target does nothing except call the following the build guichan: configure, make, make install --prefix=installpath
where installpath is full path to <fife>/ext/install

So i think it is definitely possible to build guichan on your own or if you have a guichan prebuilt package available on your linux distro you should be able to use that as well (although it may be a little older and have some minor unicode support issues)

This request is something we should add to FIFE's build system to make it more flexible when building guichan. Thanks for pointing this out and I hope we will find time to fix it in the near future.
Logged