General Category > Help and troubleshooting

Building FIFE with SDL2

(1/1)

MattF:
Hi all.  I'm facing some challenges building FIFE.  I've obtained all of the necessary dependencies, but upon running "scons" I am told that SDL could not be found.

Due to X11/Quartz changes in some of the latest versions of OS X, I've found it much less problematic to install SDL2.  However, I would imagine that the "2" is preventing it from being picked up by the builder.

Does anyone know if there's a workaround to either get this working with SDL2 or get SDL1 to build from source in OS X?  I did add the runtime version of SDL1 to my "Frameworks" directory, but that couldn't be found by another dependency.

I'm on version 10.9.5 but I'd imagine it hasn't changed drastically in that regard in the last few dot releases.

Thanks!

helios:
Hey MattF,
the current version of FIFE needs SDL 1.2. There is a branch that already have support for SDL 2.0, we hope to merge that stuff into master within the next months.
I'm no expert for OSX systems but I think you are right, the "2" is a problem, normally both versions of SDL should be installed as SDL so it's not possible to have both versions at the same time.
SDL 1.2 for OSX can be found here https://www.libsdl.org/download-1.2.php
I'm no expert for OSX systems but maybe the link is helpful for you http://www.noquarterarcade.com/os-x-sdl-development-command-line-setup

MattF:
Thanks for that.

That OS X flavour of SDL 1.2 is what I'm talking about when I say that I added it to my Frameworks directory.

That guide says little more in terms of building SDL itself than the README.  I'm getting hung up on the "make" step with the following error:


--- Code: ---In file included from ./src/events/SDL_events.c:27:
./include/SDL_syswm.h:58:10: fatal error: 'X11/Xlib.h' file not found
--- End code ---

It's trying to include a couple of header files which can't be found on my system.  Even digging into SDL_events.c it looks like I'd have a lot to comment out or modify to eliminate the issue, and who knows what problems that could lead to.  So I figured I'd cut my losses and try SDL2.

If I can't figure anything out then perhaps I'll check out that branch.

helios:
You are welcome :)
Additional I can point you to the travis script for mac osx here: https://github.com/fifengine/fifengine/blob/master/.travis.mac.sh
and to the UH guide here: http://www.unknown-horizons.org/download/sources/s-osx/
Maybe there are useful tips that can help you.
If it's possible you should use the master version of fife, simply because the branches are not well tested.

Navigation

[0] Message Index

Go to full version