[Haskell-cafe] Re: Distributing a GHC-compiled binary for Macs (x86)

Christian Maeder maeder at tzi.de
Fri Mar 9 07:56:59 EST 2007

(move a discussion to glasgow-haskell-users)

Macs that don't have GHC installed don't seem to have readline-5
installed, either.

Therefore we've created that GNUreadline.framework (see below). However,
the binary that one wants to distribute must be linked against that
framework. We do this by adding linker options to ghc:

-optl-F/home/maeder/Library/Frameworks -optl-framework -optlGNUreadline

We have also created a binary distribution (for powerpc, though) that
uses our GNUreadline.framework. For this we've changed
libraries/readline/config.mk manually:

LD=/usr/bin/ld -F/home/maeder/Library/Frameworks -framework GNUreadline
-optl-F/home/maeder/Library/Frameworks -optl-framework -optlGNUreadline

The binary distribution is here:

We think, that such a GNUreadline.framework is more flexible and
mac-like than installing readline-5 under /opt/local. The framework can
reside under /System/Library/Frameworks but also under

Maybe you could consider making such a distribution (that also doesn't
need root permission) as well?

The sources and the script to create the GNUreadline framework are included:

Cheers Christian

Christian Maeder schrieb:
> Arjun Guha schrieb:
>> Hi,
>> I compiled a binary using GHC 6.6 on my Mac (specifically, using ghc
>> --make).  This binary seems to depend on the GNU MP framework--I
>> imagine GHC uses it to implement its numeric tower.
>> However, Macs that don't have GHC installed don't seem to have GMP, so
>> I'll guess that it was installed along with the GHC binary.  Is there
>> any way to get around this GMP dependency?  I expect the binary to be
>> used on Macs that don't have GHC installed.  It would be acceptable if
>> I instructed Mac-users to download a binary installer for GMP, but I
>> haven't been able to find one.
>> Any hints or suggestions would be appreciated.  Thanks.
> We tell our users to install a GMP.framework and a GNUreadline.framework:
> http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/mac_e.htm
> Cheers Christian

More information about the Haskell-Cafe mailing list