GHC build failures on Mac OS X Leopard: ppc & x86

Hi,
I tried to build GHC "stable" on my two computers, a PowerBook G4 and
a MacBook, both running 10.5.2. This is the first time I've ever
tried, so I'm somewhat clueless about a lot of it. I went with the
basic instructions (./configure; make) with no 'mk/build.mk' and no
configure options other than '--prefix'.
On each system, I ran into a different error, though both point to the
linker, 'ld'. The PowerBook failure looks similar to ticket #1958 [1];
however, it doesn't appear to be building parsec at that point. I
gather that it's building stage1 due to the "-o
stage1/ghc-6.8.2.20080213".
The MacBook build apparently completed stage1 and failed in trying to
build stage2 (i.e. "-o stage2/ghc-inplace").
I have included snippets below from the output of each build. I
thought it might be useful to share and see if these are already known
problems with/without workarounds. Also, I'm willing to help
debug/test if there's anything specific you want me to try. Otherwise,
I'll probably fiddle with the 'mk/build.mk' (as discussed in [1] and
[2]) and/or changing which linker is used.
Additionally, I have a somewhat unrelated question. What's the
different between ghc-stable [3] and ghc-6.8 [4]?
Thanks,
Sean
[1] http://hackage.haskell.org/trac/ghc/ticket/1958
[2] http://hackage.haskell.org/trac/ghc/wiki/Building/Hacking
[3] http://darcs.haskell.org/ghc-stable/
[4] http://darcs.haskell.org/ghc-6.8/
------------------------------------------------
PPC build output
------------------------------------------------
/usr/local/ghc-6.8.2-ppc-tiger/bin/ghc -o stage1/ghc-6.8.2.20080213
-H16m -O -istage1/utils -istage1/basicTypes -istage1/types
-istage1/hsSyn -istage1/prelude -istage1/rename -istage1/typecheck
-istage1/deSugar -istage1/coreSyn -istage1/vectorise
-istage1/specialise -istage1/simplCore -istage1/stranal
-istage1/stgSyn -istage1/simplStg -istage1/codeGen -istage1/main
-istage1/profiling -istage1/parser -istage1/cprAnalysis
-istage1/ndpFlatten -istage1/iface -istage1/cmm -istage1/nativeGen
-Wall -fno-warn-name-shadowing -fno-warn-orphans -Istage1 -cpp
-fglasgow-exts -fno-generics -Rghc-timing -I. -Iparser -package unix
-ignore-package lang -recomp -Rghc-timing -H16M '-#include
"cutils.h"' -DUSING_COMPAT -i../compat -ignore-package Cabal -package
directory -package pretty -package containers -L../compat
-lghccompat -no-link-chk stage1/basicTypes/BasicTypes.o
stage1/basicTypes/DataCon.o <snip>
collect2: ld terminated with signal 10 [Bus error]
<

Sean Leather:
I tried to build GHC "stable" on my two computers, a PowerBook G4 and a MacBook, both running 10.5.2. This is the first time I've ever tried, so I'm somewhat clueless about a lot of it. I went with the basic instructions (./configure; make) with no 'mk/build.mk' and no configure options other than '--prefix'. [..] The MacBook build apparently completed stage1 and failed in trying to build stage2 (i.e. "-o stage2/ghc-inplace").
I can't help you with the PPC, but on the MacBook try building with make EXTRA_AR_ARGS=-s It's a known bug with Cabal. Manuel
------------------------------------------------ x86 build output ------------------------------------------------
../compiler/stage1/ghc-inplace -no-user-package-conf -cpp stage2/ghc-inplace.c -o stage2/ghc-inplace
ld: in /Users/leather/Projects/ghc-stable/ghc/libraries/haskell98/ dist/build/libHShaskell98-1.0.1.0.a, archive has no table of contents
collect2: ld returned 1 exit status
make[2]: *** [stage2/ghc-inplace] Error 1 make[1]: *** [stage2] Error 2 make: *** [bootstrap2] Error 2

Hi, Manuel M T Chakravarty:
I can't help you with the PPC, but on the MacBook try building with
make EXTRA_AR_ARGS=-s
It's a known bug with Cabal.
Thanks, Manuel, it builds now.
Afterwards, I ran 'make' in 'testsuite/tests/ghc-regress' and got this:
OVERALL SUMMARY for test run started at Mon Feb 18 17:55:20 CET 2008
2084 total tests, which gave rise to
10640 test cases, of which
0 caused framework failures
2160 were skipped
7487 expected passes
372 expected failures
0 unexpected passes
621 unexpected failures
That seems like a large number of unexpected failures; however, I
haven't seen a summary from a build of Mac OS X on x86, so I don't
know what to expect.
At a glance, many of the failures refer to ghci (at least that's what
I assume the "(ghci)" next to the name means). Here is a sample:
=====> user001(ghci)
cd ../../../libraries/unix/tests &&
'/Users/leather/Projects/ghc-stable/ghc/compiler/stage1/ghc-inplace'
-no-recomp -dcore-lint -dcmm-lint -Di386_apple_darwin user001.hs
--interactive -v0 -ignore-dot-ghci -package unix

Sean Leather wrote:
Hi,
I tried to build GHC "stable" on my two computers, a PowerBook G4 and a MacBook, both running 10.5.2
Manuel M T Chakravarty:
I can't help you with the PPC...
As far as I know -- and I wish to be wrong -- there is no known way to get a fully working ghc-6.8.x on OS 10.5.y on the PowerPC (PPC) architecture. I spent some free time helping debug the ghc-6.8 release, which led to a patch for some of the problems being applied in ghc-6.8.1. But a few other problems remain, I suggest looking at open ghc trac tickets on the powerpc architecture. I still use ghc-6.6.1 for now.

Chris Kuklewicz wrote:
As far as I know -- and I wish to be wrong -- there is no known way to get a fully working ghc-6.8.x on OS 10.5.y on the PowerPC (PPC) architecture.
One problem left was: m29:fastcgi-3001.0.1 maeder$ ./Setup build Segmentation fault I could work around this by using "runghc Setup.lhs build" (and only got distrubing warnings that I could ignore). I've tried to debug the problem, but only got the following after typing "run" twice in gdb on Intel Leopard: (gdb) run Starting program: /Users/Shared/maeder/haskell/fastcgi-3001.0.1/Setup build arch: posix_spawnp: /Users/Shared/maeder/haskell/fastcgi-3001.0.1/Setup: Bad CPU type in executable Program exited with code 01. Could you create a ticket for this problem and investigate it further? Christian

Sean Leather:
Manuel M T Chakravarty:
I can't help you with the PPC, but on the MacBook try building with
make EXTRA_AR_ARGS=-s
It's a known bug with Cabal.
Thanks, Manuel, it builds now.
Afterwards, I ran 'make' in 'testsuite/tests/ghc-regress' and got this:
OVERALL SUMMARY for test run started at Mon Feb 18 17:55:20 CET 2008 2084 total tests, which gave rise to 10640 test cases, of which 0 caused framework failures 2160 were skipped
7487 expected passes 372 expected failures 0 unexpected passes 621 unexpected failures
That seems like a large number of unexpected failures; however, I haven't seen a summary from a build of Mac OS X on x86, so I don't know what to expect.
At a glance, many of the failures refer to ghci (at least that's what I assume the "(ghci)" next to the name means). Here is a sample:
I haven't run the full test suite on the 6.8 branch. Try make Validating=YES fast stage=2 CLEANUP=1 That should go through (sometimes when test outputs changes due to changes on the HEAD), it takes a while until the tests are adapted to expect different outputs for 6.8. Manuel
participants (4)
-
Chris Kuklewicz
-
Christian Maeder
-
Manuel M T Chakravarty
-
Sean Leather