on when to build ghci libs in cabal

Simon Marlow simonmar at microsoft.com
Mon Aug 1 05:05:57 EDT 2005


On 30 July 2005 21:05, Isaac Jones wrote:

> Henning Günther and Duncan Coutts / the Gentoo team have sent me a
> patch to move creation of ghci libs to the build phase rather than the
> register phase.  It makes more sense there and should be somewhat
> better for debian and gentoo.
> 
> Though Duncan points out that maybe some ppl want to build the ghci
> libs during register because it could save room in a binary
> distribution (like debian and rpm).  Any opinions here?
> 
> Also, I noticed the "FIXME" that mentions the -x flag is only
> supported on some platforms; what effect will this have on platforms
> that don't support it?  Will they be broken during build?  What about
> platforms where we know the ghci libs don't work, like MacOS; will
> this patch cause building to break?
> 
> The patch adds a couple extra configure options,
> --enable-library-for-ghci / --disable-library-for-ghci.  I'm sorta
> thinking of just having one option "--disable-interpreter-libs" or
> something to make this seem more generic, though at the moment, it
> still only makes sense for a combo compiler / interpreter build (that
> is, --ghc).  I'll be happy to add this to the manual once we settle on
> a flag.  Do we ever really need to disable it anyway?

Definitely a good thing.  The ghc-pkg --auto-ghci-libs was only ever a hack, because it doesn't make any attempt to find the right way to build GHCi libs on the current platform; Cabal can do a much better job.  I'm happy we're shifting this burden onto Cabal.

I'm not sure you would ever want to disable it; it should be completely transparent.  Arguably GHCi should be able to use the .a files directly, but we've never gotten around to implementing that.  It'll be a non-issue when we start using shared libraries, too.

Cheers,
	Simon


More information about the Libraries mailing list