stg_ap_v_ret porting crash: solved?

Donald Bruce Stewart dons@cse.unsw.edu.au
Wed, 10 Sep 2003 11:01:40 +1000


dons:
> simonmar:
> > Aha!  I *think* I've figured out what's going wrong.
> > 
> > The stg_ap_v_ret failure is caused by info tables being generated for
> > the wrong endianness.  This isn't supposed to happen, because we should
> > be cross-compiling for the correct endianness, but I'm guessing that the
> > config.h copied over from the target to the host machine has been
> > overwritten during the build process with an incorrect one.
> > 
> > Try this:  before doing 'cd H/ghc && make boot && make' on the host
> > machine, do 'touch ghc/includes/config.h'.  Check after the build that
> > this file hasn't been overwritten.
> 
> Looks like that was it!
> 
> I've just built a working unreg compiler on
> sparc-unknown-openbsd, which I have not been able to do previously.

  $ uname -msr
  OpenBSD 3.3 sparc

  $ cat > test.hs 
  import System.Info
  main = print System.Info.arch >> print System.Info.os

  $ /usr/obj/ports/ghc-6.0.1/ghc-6.0.1/ghc/compiler/ghc-inplace test.hs

  $ ./a.out 
  "sparc"
  "openbsd"

-- Don :D