how to compile non-dynamic ghc-7.8.2 ?

Simon Marlow marlowsd at
Tue Apr 29 17:36:46 UTC 2014

On 25/04/2014 02:15, John Lato wrote:
> Hello,
> I'd like to compile ghc-7.8.2 with DynamicGhcPrograms disabled (on
> 64-bit linux).  I downloaded the source tarball, added
> to mk/ <>, and did ./configure && ./make.
> ghc builds and everything seems to work (cabal installed a bunch of
> packages, ghci seems to work), however whenever I try to run Setup.hs
> dynamically (either 'runghc Setup.hs configure' or loading it with ghci
> and executing 'main') it dumps core.  Compiling Setup.hs works, and
> nothing else has caused ghci to crash either (this email is a literate
> haskell file equivalent to Setup.hs).
> Building with DYNAMIC_GHC_PROGRAMS = YES works properly.
> With that in mind, I have a few questions:
>   How should I compile a non-dynamic ghc?
>   Is this a bug in ghc?

I think you are running into this:

It took me a *long* time to track that one down.  I still don't know 
what the root cause is, because I don't understand the system linker's 
behaviour here.  Given that other people are running into this, we ought 
to milestone it for 7.8.3 and do something about it.


More information about the Glasgow-haskell-users mailing list