Problems building HEAD

Simon Marlow simonmarhaskell at
Tue May 2 07:51:38 EDT 2006

Reilly Hayes wrote:

> 1) Issues with
> in head contains the following lines
> TOP:=$(TOP)/ghc
> include $(TOP)/mk/
> include $(TOP)/mk/
> # Reset TOP

Yes, none of that is required any more.  Thanks.

> 2) Building the .hc files
> The building guide says that I can build hc files on another host 
> running on the same platform.  The word platform seems to be used to 
> describe architecture in some places and architecture & O/S in others.  
> I have assumed that it means architecture in this case (if we already 
> have a compiler that runs on the same Arch & OS, why are we porting).
> What the building guide does not do is provide instructions for 
> producing registerized hc files.

Right - it's a build method that is even less well supported than doing 
an unregisterised bootstrap, because it is rarely needed.  You can 
always do an unregisterised bootstrap first, and use that compiler to 
build a registerised version.  Bootstrapping direct to registerised just 
misses out one stage.

>  The recipe I have stumbled onto is this
> a) Create mk/ and add the following lines:
> GhcLibHcOpts = -O -fvia-C -keep-hc-files
> GhcRtsHcOpts = -keep-hc-files
> GhcStage1HcOpts = -O -fvia-C -keep-hc-files
> GhcStage2HcOpts = -O -fvia-C -keep-hc-files
> b) run "./configure"
> c) run "make"
> d) I want to run "make hc-file-bundle Project=ghc", but it complains
> about a few missing files.  So first I cd to rts and
> run "make AutoApply.hc AutoApply_p.hc AutoApply_thr.hc \
> AutoApply_thr_p.hc AutoApply_debug.hc AutoApply_thr_debug.hc"
> e) run "make hc-file-bundle Project=ghc", which works just fine.
> f) untar the resulting file in the parent directory of ghc-6.5.20060429 
> on the target machine
> 3) running the build. 
> I'm following the steps in distrib/hc-build by hand, which work out to:
> ./configure --enable-hc-boot
> make -C utils boot all
> make -C ghc boot
> make -C libraries boot all GhcBootLibs=YES
> make -C ghc all
> Is this all correct?  I'm having problems with the build in utils, but 
> by then I've already made enough assumptions about how to fix the build 
> that there's little point in asking the question until I've verified 
> that I haven't messed things up upstream.

You're in uncharted territory to some extent, because I don't think 
anyone has gone through the bootstrapping process with 6.5 since the 
recent source tree reorganisation.

If you're willing to be a guinnea pig, that's great :-)

I'm guessing the sequence should be something like this:

./configure --enable-hc-boot
$MAKE -C utils/mkdependC boot all
$MAKE -C includes boot all
$MAKE -C rts boot all
$MAKE -C libraries boot all GhcBootLibs=YES
$MAKE -C compat boot all
$MAKE -C utils boot all
$MAKE -C compiler boot all

Try that, and let me know how far you get.


More information about the Glasgow-haskell-users mailing list