GHC on powerpc (OS X): segmentation fault

I am having trouble compiling GHC using mac ports on powerpc OS X (10.5.5) (using XCode 3.1). I have also opened a ticket at http://trac.macports.org/ticket/17184 which has the full build log attached. The build starts with
nice port -c upgrade ghc ---> Staging gmp into destroot ---> Packaging tgz archive for gmp 4.2.4_0 ---> Deactivating gmp 4.2.3_0 ---> Installing gmp 4.2.4_0 ---> Activating gmp 4.2.4_0 ---> Cleaning gmp ---> Fetching ghc ---> Attempting to fetch ghc-6.10.1-src.tar.bz2 from http://haskell.org/ghc/dist/stable/dist/ ---> Attempting to fetch ghc-6.10.1-src-extralibs.tar.bz2 from http://haskell.org/ghc/dist/stable/dist/ ---> Attempting to fetch ghc-6.8.2-darwin-ppc-leopard-bootstrap.tar.bz2 from http://haskell.org/ghc/dist/6.8.2/ ---> Verifying checksum(s) for ghc ---> Extracting ghc ---> Applying patches to ghc ---> Configuring ghc ---> Building ghc with target all Error: Target org.macports.build returned: shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1 && env DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib make" returned error 2 Command output: /private/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1/ghc/stage1-inplace/ghc -optc-O -optc-I/opt/local/include -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I/opt/local/include -optc-I../gmp/gmpbuild -optc-I../libffi/build/include -optc-fno-strict-aliasing -H32m -O -I/opt/local/include -L/opt/local/lib -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I/opt/local/include -I../gmp/gmpbuild -I../libffi/build/include -I. -dcmm-lint -c parallel/GranSim.c -o parallel/GranSim.o
Eventually the build fails with
/private/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1/ghc/stage1-inplace/ghc -optc-O -optc-I/opt/local/include -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I/opt/local/include -optc-I../gmp/gmpbuild -optc-I../libffi/build/include -optc-fno-strict-aliasing -H32m -O -I/opt/local/include -L/opt/local/lib -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I/opt/local/include -I../gmp/gmpbuild -I../libffi/build/include -I. -dcmm-lint -c sm/Sweep.c -o sm/Sweep.o
/private/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1/ghc/stage1-inplace/ghc -H32m -O -I/opt/local/include -L/opt/local/lib -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I/opt/local/include -I../gmp/gmpbuild -I../libffi/build/include -I. -dcmm-lint -c Apply.cmm -o Apply.o
make[1]: *** [Apply.o] Segmentation fault
make: *** [stage1] Error 2
Does anyone have a clue how to proceed?

I can offer a Tiger PPC built that works for me: http://www.dfki.de/sks/hets/intel-mac/ghcs/ghc-6.10.1-i386-apple-darwin.tar.... (linked against /opt/local/lib/libgmp.dylib) Cheers Christian Chris Kuklewicz wrote:
I am having trouble compiling GHC using mac ports on powerpc OS X (10.5.5) (using XCode 3.1).
I have also opened a ticket at http://trac.macports.org/ticket/17184 which has the full build log attached.
The build starts with
nice port -c upgrade ghc ---> Staging gmp into destroot ---> Packaging tgz archive for gmp 4.2.4_0 ---> Deactivating gmp 4.2.3_0 ---> Installing gmp 4.2.4_0 ---> Activating gmp 4.2.4_0 ---> Cleaning gmp ---> Fetching ghc ---> Attempting to fetch ghc-6.10.1-src.tar.bz2 from http://haskell.org/ghc/dist/stable/dist/ ---> Attempting to fetch ghc-6.10.1-src-extralibs.tar.bz2 from http://haskell.org/ghc/dist/stable/dist/ ---> Attempting to fetch ghc-6.8.2-darwin-ppc-leopard-bootstrap.tar.bz2 from http://haskell.org/ghc/dist/6.8.2/ ---> Verifying checksum(s) for ghc ---> Extracting ghc ---> Applying patches to ghc ---> Configuring ghc ---> Building ghc with target all Error: Target org.macports.build returned: shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1 && env DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib make" returned error 2 Command output: /private/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1/ghc/stage1-inplace/ghc -optc-O -optc-I/opt/local/include -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I/opt/local/include -optc-I../gmp/gmpbuild -optc-I../libffi/build/include -optc-fno-strict-aliasing -H32m -O -I/opt/local/include -L/opt/local/lib -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I/opt/local/include -I../gmp/gmpbuild -I../libffi/build/include -I. -dcmm-lint -c parallel/GranSim.c -o parallel/Gr anSim.o
Eventually the build fails with
/private/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1/ghc/stage1-inplace/ghc -optc-O -optc-I/opt/local/include -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I/opt/local/include -optc-I../gmp/gmpbuild -optc-I../libffi/build/include -optc-fno-strict-aliasing -H32m -O -I/opt/local/include -L/opt/local/lib -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I/opt/local/include -I../gmp/gmpbuild -I../libffi/build/include -I. -dcmm-lint -c sm/Sweep.c -o sm/Sweep.o
/private/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1/ghc/stage1-inplace/ghc -H32m -O -I/opt/local/include -L/opt/local/lib -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I/opt/local/include -I../gmp/gmpbuild -I../libffi/build/include -I. -dcmm-lint -c Apply.cmm -o Apply.o
make[1]: *** [Apply.o] Segmentation fault
make: *** [stage1] Error 2
Does anyone have a clue how to proceed?

Christian Maeder wrote:
I can offer a Tiger PPC built that works for me: http://www.dfki.de/sks/hets/intel-mac/ghcs/ghc-6.10.1-i386-apple-darwin.tar.... (linked against /opt/local/lib/libgmp.dylib)
Cheers Christian
But the filename says "-i386-" so I suspect it is not a powerpc build. Regards, Chris

Chris Kuklewicz wrote:
Christian Maeder wrote:
I can offer a Tiger PPC built that works for me: (linked against /opt/local/lib/libgmp.dylib)
But the filename says "-i386-" so I suspect it is not a powerpc build.
Sorry, the link is: http://www.dfki.de/sks/hets/mac/ghcs/ghc-6.10.1-powerpc-apple-darwin.tar.bz2 Christian

Hi Chrisitian, On Nov 11, 2008, at 7:19 AM, Christian Maeder wrote:
Chris Kuklewicz wrote:
Christian Maeder wrote:
I can offer a Tiger PPC built that works for me: (linked against /opt/local/lib/libgmp.dylib)
But the filename says "-i386-" so I suspect it is not a powerpc build.
Sorry, the link is:
http://www.dfki.de/sks/hets/mac/ghcs/ghc-6.10.1-powerpc-apple-darwin.tar.bz2
Christian
I'll try using your binary compiler as a bootstrap compiler for the macports' ppc builds. Should have something ready for testing in a day or two. Greg

On Tue, Nov 11, 2008 at 01:19:25PM +0100, Christian Maeder wrote:
http://www.dfki.de/sks/hets/intel-mac/ghcs/ghc-6.10.1-i386-apple-darwin.tar....
http://www.dfki.de/sks/hets/mac/ghcs/ghc-6.10.1-powerpc-apple-darwin.tar.bz2
Thanks Christian, I've put these up on the 6.10.1 download page. Thanks Ian

Ian Lynagh wrote:
On Tue, Nov 11, 2008 at 01:19:25PM +0100, Christian Maeder wrote:
http://www.dfki.de/sks/hets/intel-mac/ghcs/ghc-6.10.1-i386-apple-darwin.tar....
http://www.dfki.de/sks/hets/mac/ghcs/ghc-6.10.1-powerpc-apple-darwin.tar.bz2
Thanks Christian, I've put these up on the 6.10.1 download page.
http://haskell.org/ghc/download_ghc_6_10_1.html#macosxintel http://haskell.org/ghc/download_ghc_6_10_1.html#macosxppc libreadline.5.2.dylib is no longer needed, since ghc uses libedit.2.dylib (which uses libncurses.5.dylib, that should be also under /usr/lib/) Cheers C.

Chris Kuklewicz wrote:
/private/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1/ghc/stage1-inplace/ghc -H32m -O -I/opt/local/include -L/opt/local/lib -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I/opt/local/include -I../gmp/gmpbuild -I../libffi/build/include -I. -dcmm-lint -c Apply.cmm -o Apply.o
make[1]: *** [Apply.o] Segmentation fault
make: *** [stage1] Error 2
Does anyone have a clue how to proceed?
Perhaps this is the same as http://hackage.haskell.org/trac/ghc/ticket/2380 but others have managed to compile GHC on PPC/OSX. In general we don't have anyone actively working on fixing bugs in the PPC port at the moment, I'd love it if someone could step up and help us keep this platform fully-supported. Here are the current PPC-specific bugs: http://hackage.haskell.org/trac/ghc/query?status=new&status=assigned&status=reopened&architecture=powerpc&order=priority Cheers, Simon

I was using macports' binary ghc-6.8.2 so I also suspect this is the same as #2380. Thankfully Christian Maeder's powerpc build is working for me. I have rebuilt all my software and the packages they depend on. I will update the macports error to point at the ghc trac error. The compilation times for ghc itself are quote long on my hardware, as I learned when trying and failing to get the early 6.8.x series to work on powerpc. Thus I won't be stepping up to do the same for ghc-6.10.1 unless I find myself with a much less bust life. PS: I must say that ghc-6.10.1 appears to run much faster than ghc-6.8.3 on my G4 laptop. Thanks :) -- Chris Simon Marlow wrote:
Chris Kuklewicz wrote:
/private/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.10.1/ghc/stage1-inplace/ghc -H32m -O -I/opt/local/include -L/opt/local/lib -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I/opt/local/include -I../gmp/gmpbuild -I../libffi/build/include -I. -dcmm-lint -c Apply.cmm -o Apply.o
make[1]: *** [Apply.o] Segmentation fault
make: *** [stage1] Error 2
Does anyone have a clue how to proceed?
Perhaps this is the same as
http://hackage.haskell.org/trac/ghc/ticket/2380
but others have managed to compile GHC on PPC/OSX.
In general we don't have anyone actively working on fixing bugs in the PPC port at the moment, I'd love it if someone could step up and help us keep this platform fully-supported. Here are the current PPC-specific bugs:
Cheers, Simon
participants (5)
-
Chris Kuklewicz
-
Christian Maeder
-
Gregory Wright
-
Ian Lynagh
-
Simon Marlow