
Hi Simon,
Thanks very much for this response. I believe you're correct; ghc -e
'System.Environment.getEnvironment' segfaults with my ghc build.
John
On Tue, Apr 29, 2014 at 10:36 AM, Simon Marlow
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
DYNAMIC_GHC_PROGRAMS = NO
to mk/build.mk http://build.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: https://ghc.haskell.org/trac/ ghc/ticket/8935
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.
Cheers, Simon