What’s the state of SDL and SDL_Image vis-a-vis Mac Universal Binaries? If
I
want to compile my game as a universal binary, do I need new binaries for
the
SDL frameworks? If so, are there some available, and/or is it a painless
thing
for me to re-compile them myself? Or would it be ugly and best avoided for
now?
Thanks,
Phil
Yes, you will need new SDL binaries otherwise your linking stage will
fail when you build the x86 side.
I’ve been working on updating all the SDL Xcode projects (SDL,
SDL_image, SDL_mixer, SDL_ttf). They are almost done with a few
caveats.
The primary problem is that we have been unable to get the MMX/SSE
code to compile/link on OS X. Unless somebody knows better, it looks
like all the assembly code will need to be rewritten to be position
independent. There are also secondary problems with limitations in
Xcode compiling architecture specific files with nasm while PPC must
also be built.
For everything else, you could compile these yourself, but the real
trick has not been the universal binary itself, but making a universal
binary that is still 10.2 compatible (per SDL requirements). There are
also the additional hoops of needing to recompile all the dependencies
as universal binaries with the same constraints, e.g, not only does
SDL_image need to be rebuilt, but libpng and libjpeg must also be
rebuilt. Same goes for SDL_mixer and SDL_ttf.
I’m trying to get all 4 projects done, so the last hold up at the
moment is SDL_mixer. There have been complaints that the SDL_mixer
framework can’t play MP3s. I think it’s because we currently are not
activating the compile flag to use SMPEG. I’m not sure how/why this
changed, but I’m also not sure how we linked to SMPEG before on OS X
as there seems to be no pre-existing infrastructure for building with
SMPEG. So I’m looking into fixing this, but that means getting SMPEG
up-to-date with Universal Binaries as well. I seem to be running into
MMX problems there too, but of a different nature. (Errors like:
Unknown pseudo-op: .type (or .size). Maybe somebody out there knows
how to fix this?)
Anyway, I hope to push out all the changes, documentation, and new
binaries to Sam within the next few days.
-Eric> From: Phil Steinmeyer
Subject: [SDL] Mac Universal Binary