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

Arjun Guha arjun at cs.brown.edu
Sun Mar 11 14:33:21 EDT 2007


My apologies for duplicates, if any.  I sent it first from the wrong address

---------- Forwarded message ----------
Thanks for the info.  The solution I plan to adopt is as follows.

I can create a tarball of the /Library/Frameworks/GMP.framework folder
on my Intel-Mac that has GHC 6.6 installed.  I can ask users of my
application to download said tarball and install it in
/Library/Frameworks or ~/Library/Frameworks.  I tested it on one Mac
that didn't have GHC, and it worked.  I'll try it on a few others
before declaring that it does work.

On a slightly related note, it appears that GHC-compiled Windows
programs either don't use GMP or have it statically embedded.  I ran a
Windows binary of the same program on a machine that almost certainly
doesn't have GMP installed and it worked.  Any confirmation would be
appreciated.

Thanks for the help.

Arjun

On 3/9/07, Christian Maeder <maeder at tzi.de> wrote:
> (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
> SRC_HC_OPTS +=
> -optc-I/home/maeder/Library/Frameworks/GNUreadline.framework/Headers
> -optl-F/home/maeder/Library/Frameworks -optl-framework -optlGNUreadline
> SRC_HSC2HS_OPTS +=
> -I/home/maeder/Library/Frameworks/GNUreadline.framework/Headers
>
> The binary distribution is here:
> http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/mac/versions/ghc-6.6-powerpc-apple-darwin.tar.bz2
>
> 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
> $HOME/Library/Frameworks.
>
> 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:
> http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/mac/GNUreadline-framework.zip
>
> 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
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Glasgow-haskell-users mailing list