GHC 6.8.1 (now ghc-6.8.2) on Mac OS X 10.5 (Leopard)

Christian Maeder Christian.Maeder at
Fri Jan 11 04:52:42 EST 2008


on an Intel Leopard produced binaries executable on Intel Tigers (we
have no Intel Panther, though)

Without MACOSX_DEPLOYMENT_TARGET binaries from Leopard yield "Bus Error"
on Tiger.

The binary was built using my own binary-dist for Intel Tiger (Mac OS
10.4) (with GMP and GNUreadline frameworks).


Deborah Goldsmith wrote:
> On Nov 6, 2007, at 4:06 PM, Manuel M T Chakravarty wrote:
>> I wasn't expecting any backwards compatibility from Leopard-built
>> software to Tiger, but then I am also a Mac-noob and maybe there are
>> ways to achieve that that I don't know of.  Any suggestions?
> Sorry, I missed this the first time around...
> To build binaries on Leopard that are compatible with previous releases
> of Mac OS X, you need to use the appropriate SDK parameters when
> invoking gcc (for includes) and the linker (for libraries). This is
> described in the context of building a universal binary in:
> but the same concepts (-isysroot for gcc and -Wl,-syslibroot for ld)
> apply to building against any SDK.
> An SDK is basically a copy of the frameworks and libraries for a
> particular OS release, but the libraries are just stubs to link against.
> By pointing gcc and ld at an SDK, you use the correct headers and entry
> points for a particular release.
> Caveat: I don't know how use of SDKs interacts with use of non-system
> libraries (e.g., in /opt/local or /Library/Frameworks).
> Another approach is to set MAC_OS_X_VERSION_MIN_REQUIRED to
> MAC_OS_X_VERSION_10_4 (or whatever). You then have to be careful about
> how you use APIs that are new in Leopard. I would think the SDK approach
> would be easier for something like ghc.
> If you don't do anything, by default binaries built on a particular Mac
> OS X release will only run on that release or later.
> Deborah

More information about the Glasgow-haskell-users mailing list