GHC 6.8.1 on powerpc OS X 10.5

Chris Kuklewicz haskell at list.mightyreason.com
Thu Nov 15 04:56:30 EST 2007


So I decided to try and route around the ld/collect2 problems with ghc-6.8.1 not
working on powerpc OS X 10.5

OS X 10.5 (Leopard) uses XCode 3.0 which has a gcc-4.0 toolchain.

So I try to get another gcc & binutils from macports.  This failed.  All of
gcc40 gcc41 gcc42 and gcc43 failed to compile successfully with macports.

So I switched to trying fink, which offers gcc-4.2.2 and this did compile and
install.  Hooray.

Unfortunately, using ghc-6.6.1 (from when I ran OS 10.4 Tiger) with gcc-4.2.2
does not work when compiling ghc-6.8.1 (at least on this platform).

> ------------------------------------------------------------------------
> == make boot -r;
>  in /Users/chrisk/Documents/projects/haskell/build/ghc-6.8.1/ghc-6.8.1/compiler
> ------------------------------------------------------------------------
> ../utils/mkdirhier/mkdirhier stage1
> for i in utils basicTypes types hsSyn prelude rename typecheck deSugar coreSyn vectorise specialise simplCore stranal stgSyn simplStg codeGen main profiling parser cprAnalysis ndpFlatten iface cmm nativeGen; do \
> 	    ../utils/mkdirhier/mkdirhier stage1/$i; \
> 	done
> Creating stage1/ghc_boot_platform.h...
> Done.
> ../utils/genprimopcode/genprimopcode --primop-tag         < prelude/primops.txt > primop-tag.hs-incl
> /bin/sh: line 1: 59384 Illegal instruction     ../utils/genprimopcode/genprimopcode --primop-tag < prelude/primops.txt > primop-tag.hs-incl
> make[1]: *** [primop-tag.hs-incl] Error 132
> make[1]: *** Deleting file `primop-tag.hs-incl'
> make: *** [stage1] Error 1

Running "../utils/genprimopcode/genprimopcode --primop-tag" produces "Illegal
instruction"

There were other odd messages during the make,such as in this early output:

> ------------------------------------------------------------------------
> == make boot -r;
>  in /Users/chrisk/Documents/projects/haskell/build/ghc-6.8.1/ghc-6.8.1/compat
> ------------------------------------------------------------------------
> ../utils/mkdependC/mkdependC -f .depend    -I. -Iinclude -I../includes  -- -O -I. -Iinclude -D__GHC_PATCHLEVEL__=1 -I../libraries/base/cbits -I../libraries/base/include    -- cbits/directory.c cbits/rawSystem.c cbits/unicode.c 
> /usr/local/bin/ghc -M -optdep-f -optdep.depend  -osuf o    -H16m -O -w -I. -Iinclude -Rghc-timing -ignore-package Cabal -ignore-package filepath -I../libraries -fglasgow-exts -no-recomp Compat/Directory.hs Compat/RawSystem.hs Compat/Unicode.hs Distribution/Compat/Directory.hs Distribution/Compat/Exception.hs Distribution/Compat/Map.hs Distribution/Compat/RawSystem.hs Distribution/Compat/ReadP.hs Distribution/Compat/TempFile.hs Distribution/Compiler.hs Distribution/GetOpt.hs Distribution/InstalledPackageInfo.hs Distribution/License.hs Distribution/Package.hs Distribution/ParseUtils.hs Distribution/Simple/Program.hs Distribution/Simple/Utils.hs Distribution/System.hs Distribution/Verbosity.hs Distribution/Version.hs Language/Haskell/Extension.hs System/FilePath.hs System/FilePath/Posix.hs System/FilePath/Windows.hs Trace/Hpc/Mix.hs Trace/Hpc/Tix.hs Trace/Hpc/Util.hs
> <<ghc: 36490248 bytes, 5 GCs, 130248/130248 avg/max bytes residency (1 samples), 16M in use, 0.01 INIT (0.01 elapsed), 0.22 MUT (4.47 elapsed), 0.06 GC (0.43 elapsed) :ghc>>
> make all
> /usr/local/bin/ghc -H16m -O -w -I. -Iinclude -Rghc-timing  -ignore-package Cabal -ignore-package filepath -I../libraries -fglasgow-exts -no-recomp    -c System/FilePath/Posix.hs -o System/FilePath/Posix.o  -ohi System/FilePath/Posix.hi
> gcc: unrecognized option '-no-cpp-precomp'
> 
> /var/folders/CT/CTQA-fMz2RWZwk+BYmhr7U++-Eg/-Tmp-//ghc64877_0/ghc64877_0.s:6606:0:
>     section difference relocatable subtraction expression, "_s2tx_0_alt" minus "_s2tx_info" using a symbol at the end of section will not produce an assembly time constant
> 
> /var/folders/CT/CTQA-fMz2RWZwk+BYmhr7U++-Eg/-Tmp-//ghc64877_0/ghc64877_0.s:6606:0:
>     use a symbol with a constant value created with an assignment instead of the expression, L_const_sym = _s2tx_0_alt - _s2tx_info


The '-no-cpp-precomp' and 'section difference ...' and 'use a symbol ...'
messages repeat often.

I looked at trac, and can only find the closed ticket
http://hackage.haskell.org/trac/ghc/ticket/1427
relating to gcc-4.2 issues.

Does anyone have suggestions? hints? bad jokes?

-- 
Chris K


More information about the Glasgow-haskell-users mailing list