Booting from HC files is completely broken

David Madore
Tue, 24 Jul 2001 16:00:08 +0200

Hi all.

I tried to compile ghc-5.00.2 on a RedHat-7.1 system by booting from
HC files.  (Actually, I have a ghc-5.00 installed, but apparently some
programs compiled with it segfault, and this makes compilation of
ghc-5.00.2 impossible.  Note that I have a working happy-1.10,

Now it seems that the distrib/hc-build script is broken.

First of all, this is a minor point, but it calls ./configure twice,
and the second time it omits passing $configopts to it, so that
anything like --prefix will fail.

But this is not the problem I have.  To avoid the above gotcha, I
manually drove the various commands.  Up to the second invocation of
"configure", everything works fine.  I end up with a working
ghc-inplace (well, it seems to work).

But no interface (.hi) files.

How on earth are these supposed to be generated?  The hc-build script
calls ./configure a second time; now that does not find a working ghc
(of course: it doesn't know about the just built ghc-inplace), so
GHC="" in the Makefiles, and the attempt to make all in ghc/utils
fails miserably (in a ridiculous way, in fact: since GHC="", the next
argument on the command line, viz. "-ldl", becomes the command, and
GNU make looks for a program called "ldl", doesn't find it, and
ignores the error because of the prepended "-"; similarly, some "-o"
commands look for a program named "o" and ignore the error).  I tried
passing GHC to point to the ghc-inplace program built, but that
doesn't work either (missing interface files, so ghc/utils can't be
built; and ghc/libs can't be built because of the missing ghc/utils).

It seems that we still have a chicken-and-egg problem which the .hc
files have done nothing to solve.

Any suggestion (other than starting from a binary build, which is what
I suppose I'll try now)?

(Note: I'm not subscribed to the list.  Please Cc me all replies.)

     David A. Madore
    (, )