Porting to Haiku
Jessica Hamilton
jessica.l.hamilton at gmail.com
Sat Nov 1 14:36:08 UTC 2014
Hi,
I (and one other) am working on porting GHC to Haiku; we've
successfully got a working GHC cross-compiler running on Haiku, and
now are able to also build GHC on Haiku from the cross-compiler when
using the "quickest" profile in the mk/build.mk file.
However, using the default build profile, we're running into a couple of issues.
1. A random segfault in ghc-stage1 (is probably an issue in Haiku, not
entirely sure yet), with the following call stack:
runCFinalizers + 0x3a
runAllCFinalizers + 0x37
hs_exit_ +0x99
shutdownHaskellAndExit + 0x2f
hs_main + 0xb1
.../ghc-7.8.3/inplace/lib/bin/ghc-stage1 + 0xc7b374
_start + 0x4b
runtime_loader + 0x130
I can't really see anything obvious in the source code myself
(although our debugger fails to enumerate the semaphores, and also
needs to be killed). Restarting the build is sufficient to get past
the issue, however.
2. A more pressing issue is with ghc-cabal. It fails with the error
"resource exhausted" when running the following command:
inplace/bin/ghc-cabal copy compiler stage2
This error is reproducible every time. I've tried setting up a profile
build in the mk/build.mk file in order to get a stack trace from
ghc-cabal; however, after rebuilding GHC from scratch, running
ghc-cabal +RTS -xc, it still complains that the flag -xc requires the
program to be built with -prof.
Some advice would be handy before diving into another couple hours of
rebuilding GHC to try and get a profiled build of ghc-cabal out of the
build system ;-)
Cheers,
Jessica
More information about the ghc-devs
mailing list