Building on Leopard with Tiger compatibility
Submitted by olivierg on Sat, 2009-05-02 21:24.
Hi,
I'm working on Jackbeat, an audio app which I successfully built on Leopard and bundled using ige-mac-bundler. I'm actually quite proud of the result ;)
http://jackbeat.samalyse.org/attachment/wiki/ScreenShots/jackbeat-0.7.0-...
Thanks for making that possible.
Unfortunately, it doesn't work on Tiger. Without leaving Leopard, is there a way to produce a binary which is compatible with both versions of OS X?

Yes. To build The Gimp with
Yes. To build The Gimp with 10.4 compatability, I used the following .jhbuildrc-custom:
| setup_sdk_10_4()
| prefix = "/Volumes/Thumb"
| module_makeargs["gtk+"]='LDFLAGS="-framework AppKit -framework Carbon -framework CoreFoundation -framework ApplicationServices -lobjc"'
| module_makeargs["ige-mac-integration"]='LDFLAGS="-framework AppKit -lobjc"'
| module_makeargs["gimp"]='LDFLAGS="-framework Carbon -framework CoreFoundation"'
| module_autogenargs["gimp"]="--without-wmf"
It runs on both my MacPro under 10.5 and my daughter's MacBook under 10.4.
You need to have the 10.4u SDK installed (it's included in the XCode dmg).
Note that Gnome apps on OSX have rpaths to the prefix that you set in .jhbuildrc (which you can override in .jhbuildrc-custom, see above), so you have to duplicate that path on the target machine. (As you can see, I built onto a thumb drive for my test. Saves copying and I get the same path on every box).
This won't build universal binaries. I think you'd do that by adding something like environ_append("CFLAGS" "-arch i386 -arch ppc") to your .jhbuildrc-custom, but I've never tried it. You'll have to look at the Apple docs to make sure.
Thanks for your reply.
Thanks for your reply. However I do not have any control on the target machine. As I previously said, I'm bundling everything using ige-mac-bundler. People just download and run a DMG. I suppose your rc settings may work even in that case though.
Actually, in the meantime, I've built Jackbeat on Tiger, and the result works on both Tiger and Leopard.
I just wonder: is there any reason not to do this? Could I benefit from bug fixes or improvement in some of the OS X core libraries by building on Leopard with Tiger compatibility instead of simply building on Tiger?
Concerning universal binaries, from what I read on the other posts, this sounds like almost impossible. Did anybody manage to build a universal binary (or simply a PPC one) on an Intel machine?
Just a quick answer on the
Just a quick answer on the last part, I have built universal binaries in the past, there is not really anything preventing it from being done, it's just that I didn't take it the whole way to be automated. The issues I were running into was that some/many libraries are not playing well with the "automatic" way where you just specify two -arch flags, since they do checks at configure time instead of build time. So for those I just had to build twice, first with ppc and then with i386 (still in the same intel machine) and then run lipo on the binaries to combine them into a universal one.
I think someone here on the forum had whipped together a script that automated most of this... can't find it now though.
As long as you're up to date
As long as you're up to date on the 10.4u SDK, there shouldn't be any difference between building on Tiger and Leopard.
Since you've already got the app bundle working without needing to reference outside of itself (this works with some apps and not others), you can ignore my blathering about that. Just leave the "prefix" line out of .jhbuildrc-custom.