Unregisterised build
Christoph Reichenbach
jameson@darmstadt.gmd.de
Wed, 17 Jul 2002 02:19:07 +0200 (MET DST)
Hi,
[...]
> BTW the cross-port script is a little old, so you might find other
> problems. As far as I know, unregisterised compilation *does* work
> though.
I had to do a number of manual compiles, out-of-order makes etc. to get
stuff working; I'm not completely convinced that what I'm trying to do is
right ATM...
[...]
> Your best bet for the .hsc files is to generate the .hs on your
> Alpha/Linux box by taking the intermediate _hsc.c files over and
> compiling/running them on the target machine to get the .hs files. Then
> take the .hs back to the bootstrapping machine and carry on. These are
> the libraries in stage 1, BTW.
Did that.
[...]
> The cross-port script also tries to do too much. You won't be able to
> actually run the b2 compiler on your bootstrap box, because it will be
> built against the Alpha/Linux-specific libraries, so just stop after
> you've got a set of .hc files for ghc/compiler in stage 2. Take the
> library .hc files from stage 1, and the compiler .hc files from stage 2,
> to your Alpha/Linux box.
That's where I am now. Running the distrib/hc-build script dies pretty
early on in the ghc subdir:
...
copying ./mpn/generic/sb_divrem_mn.c to mpn/sb_divrem_mn.c
copying ./mpn/generic/jacbase.c to mpn/jacbase.c
copying ./mpn/alpha/gmp-mparam.h to gmp-mparam.h
../utils/ghc-pkg/ghc-pkg-inplace --update-package <rts.conf.inplace
/bin/sh: ../utils/ghc-pkg/ghc-pkg-inplace: No such file or directory
make[1]: *** [boot] Error 127
I tried building that manually, but it seems to be relying on the presence
of a large amount of libraries (I have all its object files, but they're
worthless without the libs).
'make' in ghc/compiler dies with:
gcc -x c absCSyn/AbsCSyn.hc -o absCSyn/AbsCSyn.raw_s -S -O -mieee
-static -w -D__GLASGOW_HASKELL__=505 -O
-I/home/jameson/work/port/haskell/build/ghc/includes
-I/home/jameson/work/port/haskell/build/libraries/base/include
-I/home/jameson/work/port/haskell/build/hslibs/lang/cbits
-I/home/jameson/work/port/haskell/build/hslibs/posix/cbits
-I/home/jameson/work/port/haskell/build/hslibs/util/cbits
-I/home/jameson/work/port/haskell/build/hslibs/text/cbits
-I/home/jameson/work/port/haskell/build/hslibs/hssource/cbits -Iparser -I.
-I../includes -O -D__GLASGOW_HASKELL__=505 -I. `echo | sed
's/^$/-DSTOLEN_X86_REGS=4/'`
absCSyn/AbsCSyn.hc:2: HsStd.h: No such file or directory
absCSyn/AbsCSyn.hc:46: macro `SET_HDR_' used with only 3 args
absCSyn/AbsCSyn.hc:174: macro `SET_HDR_' used with only 3 args
[...]
followed by more of the same. The only fitting SET_HDR_ seems to be in
common-rts/includes/StgMacros.h.
I'm not sure which of the two approaches I should pursue now and where to
look for solutions to these problems (HsStd.h in particular managed to
evade all attempts to find(1) it); any ideas or suggestions?
> At some point we'll try to make all this easier, but I'm afraid that's
> the way it is at the moment :-(
NP, it's quite interesting (in a masochistic kind of way ;)
Thanks for your help so far,
llap,
Christoph