Booting from HC files is completely broken

2001-07-24 Thread David Madore

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,
however.)

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
([EMAIL PROTECTED],
 http://www.eleves.ens.fr:8080/home/madore/ )

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



RE: Booting from HC files is completely broken

2001-07-24 Thread Simon Marlow

 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,
 however.)
 
 Now it seems that the distrib/hc-build script is broken.

Yes it is, sorry about that.  There are several open bug reports on
SourceForge relating to the broken hc bootstrapping situation.  I'm
working on fixing it, so hopefully the next release will have reliable
hc bootstrapping again.

Your particular problem can be solved by (a) getting the .hs files that
are generated from the .hsc files in the libraries, and (b) making in
ghc/lib/std and hslibs before ghc/utils.  Having the .hs files means you
don't need hsc2hs in order to build the libraries and works around the
chicken/egg problem.

Cheers,
Simon

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users