
lunar:
Hello,
Following Donald Stewart efforts and Simon Marlow's new porting guide, I made two attempts of getting GHC working on Linux/PowerPC.
I made a first attempt using cross-compiling from a Linux/i386 box. I followed every instruction on the guide, but the compiler was unusable, resulting in the following error message : hc-6.0.1: internal error: stg_ap_v_ret Please report this as a bug to glasgow-haskell-bugs@haskell.org, or http://www.sourceforge.net/projects/ghc/
Don got the same message for his cross-compilation tests, so I decided to stay on the same computer using the official build for Mac OS X.
I did something very slightly incorrect, I think, though I don't know what it was, because I got a working cross-port to freebsd yesterday, on a box that had previously given me the stg_ap_v_ret error. See yesterday's post of mine on that. The i386-*-linux host is probably the best host, because of header etc. compatibility. I always got a lot more pain when the OS's were very different.
I had to add -Onot -fvia-C to prelude/PrimOp_HC_OPTS in ghc/compiler/Makefile to make GHC build. This failed on the RTS as said in the guide, so I decided to go on. But I was unable to build the libraries. I got a bunch of error message like : "cpp0: unkown -smart flag", and it failed later at : /compiler/ghc-inplace -H16m -O -fglasgow-exts -cpp -Iinclude -#include HsBase.h -funbox-strict-fields -package-name base -O -H32m - -keep-hc-files -c GHC/Base.lhs -o GHC/Base.o -ohi GHC/Base.hi GHC/Base.hc:1111: only 1 arg to macro 'HP_CHK_NP' (2 expected) [...]
I don't know what to try next...
Try (or look at) the new hc-build script from cvs, Simon updated that last night. Also, see if there is anything in the building guide you might have done slightly differently, as the build system is very fragile. -- Don