[SDL_image & ttf] Bug on OSX 10.5 32bit

Hi everybody !

First of all, I apologize in advance for my English, I still have some languages problems :wink:

Iā€™m currently try to port Zelda Solarus ( http://zelda-solarus.com/jeu-zsdx-download ), on Mac OSX 10.5+.
Actually, there is no problem for most of users, but I got some feedback from OSX 10.5 - Intel 32bit users, in wich the game doesnā€™t launch.
After checking the error message, the issue is because of embed framework (Freetype on SDL_ttf and webp on SDL_image) are ā€œnot a suitable imageā€ (unknow required load command 0x80000022).

Strangely, the framework are actually compiled for i386 and x86_64, so I guess you just forgot to set the deployment target on Mac OS 10.5, or the -mmacosx-version-min=10.5 flag if you compile without XCode.
Iā€™m not even sure this is the trouble, and Iā€™m not a Mac expert, so Iā€™ll just switch the ā€œbuggedā€ framework with an equivalent dylib compiled with this flag, send it to the 10.5 users, and this works. Then there is another problem with SDL_image, but the point is the system found the lib.

This is not a big deal, but I thought you might like to know that there is a backyard compatibility issue on the latest frameworks.

PS : I use, of course, the latest version, downloaded yesterday

Thanks

Valentin

Actually, I donā€™t think this is a bug. This is due to the fact that
10.5 will try to run 64-bit binaries, but Apple failed to fill in all
the API holes in the 10.5 time frame. This was documented in the first
section with workarounds/solutions here:

http://playcontrol.net/ewing/jibberjabber/big_behind-the-scenes_chang.htmlOn 2/6/12, vlag <valentin.soudier at gmail.com> wrote:

Hi everybody !

First of all, I apologize in advance for my English, I still have some
languages problems :wink:

Iā€™m currently try to port Zelda Solarus (
http://zelda-solarus.com/jeu-zsdx-download ), on Mac OSX 10.5+.
Actually, there is no problem for most of users, but I got some feedback
from OSX 10.5 - Intel 32bit users, in wich the game doesnā€™t launch.
After checking the error message, the issue is because of embed framework
(Freetype on SDL_ttf and webp on SDL_image) are ā€œnot a suitable imageā€
(unknow required load command 0x80000022).

Strangely, the framework are actually compiled for i386 and x86_64, so I
guess you just forgot to set the deployment target on Mac OS 10.5, or the
-mmacosx-version-min=10.5 flag if you compile without XCode.
Iā€™m not even sure this is the trouble, and Iā€™m not a Mac expert, so Iā€™ll
just switch the ā€œbuggedā€ framework with an equivalent dylib compiled with
this flag, send it to the 10.5 users, and this works. Then there is another
problem with SDL_image, but the point is the system found the lib.

This is not a big deal, but I thought you might like to know that there is a
backyard compatibility issue on the latest frameworks.

PS : I use, of course, the latest version, downloaded yesterday

Thanks

Valentin

ā€“
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

Ok, I finally choose to forbid to execute 64-bit part of the binaries on Mac < 10.6. It seems to be a good solution.

Unfortunately, the system doesnā€™t try to launch 64bit anymore, but the 32-bit part of the binary is still not executed.

Here is a screenshot received from an 10.5 user, which show the error message.
http://dl.dropbox.com/u/31755496/solarusdx10.5.jpg

Did I do something wrong when I compiled main binary, or when I packaged the bundle ?

Hmmm, looks like there are two different possible problems.

  1. It looks like itā€™s still trying to load X86-64 (top of the crash log)
  2. The runtime search path isnā€™t finding the webp.framework. Assuming
    thatā€™s not a framework you are using directly, it should be an
    implementation detail and that means the underlying SDL framework
    which depends on it might not be built correctly. But this presumes
    you actually set up your runtime search path correctly to find/embed
    the SDL frameworks.On 2/9/12, vlag <valentin.soudier at gmail.com> wrote:

Ok, I finally choose to forbid to execute 64-bit part of the binaries on Mac
< 10.6. It seems to be a good solution.

Unfortunately, the system doesnā€™t try to launch 64bit anymore, but the
32-bit part of the binary is still not executed.

Here is a screenshot received from an 10.5 user, which show the error
message.
http://dl.dropbox.com/u/31755496/solarusdx10.5.jpg

Did I do something wrong when I compiled main binary, or when I packaged the
bundle ?

ā€“
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/