[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/