stg_ap_v_ret porting crash: solved?

Simon Marlow
Tue, 9 Sep 2003 12:11:11 +0100

> On Sat, 6 Sep 2003, Donald Bruce Stewart wrote:
> > simonmar:
> > > > I was a bit too soon reporting the sparc-sun-solaris2, two
> > > > attempts have died with stg_ap_v_ret. Same result=20
> sparc-*-openbsd.
> >
> Also with mips-sgi-irix65 . An attempt died with stg_ap_v_ret .
> I'm trying to follow Ian's steps....but please, report any=20
> change you can
> make on the doc "Bootstraping GHC from hc-files".

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.