Can't compile GHC 6.8.2

Simon Marlow marlowsd at
Fri Dec 19 04:30:26 EST 2008

Uwe Hollerbach wrote:
> Hello Barney & all, I've been following your messages with some
> interest, as I too have been trying to build a more-modern ghc on my
> G3 iMac running 10.3.9. I started with an existing 6.6.1 build, and
> tried to build 6.8.3; I'm finally at the point where I have something
> to report, although I'm not sure if it's a success or a failure
> report... :-/
> I applied your patch to (approximately; the relevant
> section wasn't quite identical), edited rts/Linker.c to add "#define
> LC_SEGMENT_64 LC_SEGMENT", and hacked up a wrapper script around ar to
> always ranlib the library being processed; you had mentioned patching
> cabal, but I decided the wrapper around ar was easier... a hack, but
> what the hell.
> After that, "configure && make" ran to completion without errors
> (although it took a couple of days, since I had all the extralibs).
> Success! ... or is it?
> I installed the new compiler into /usr/local, then tested it by trying
> "ghc -v". Alas, no joy! It died with some dynamic-link error which
> I've approximately reproduced here:
>     lupus:~/ghc-6.8.3% ghc-6.8.3 -v
>     dyld: relocation error (external relocation for symbol _pthread_mutex_unlock
>     in ghc-6.8.3 relocation entry 0 displacement too large)Trace/BPT trap
> Failure! ... or is it?

I'd guess that the size of the binary has caused some kind of overflow of a 
short relocation field.  Any experts in MacOS linking around?

You might want to try the testsuite with stage1 and see whether the failure 
shows up anywhere else.


More information about the Glasgow-haskell-users mailing list