[nhc-users] Problem installing nhc98 1.16 using bootstrap-from-C method

David Bakin davidbak@attbi.com
Thu, 10 Apr 2003 10:05:25 -0700


Got it working with that fix - although I couldn't get the nhc98 -C step to
work to compile the fixed .hs file (it complained about not finding
Platform.hi in any of several locations, even after a full successful build
there is still no Platform.hi anywhere - should there be?) so I just
hand-modified the (encoded) string constant in RunAndReadStdout.hc.)

So now I'm free to play with nhc98, thanks!

I have another question though:  on the "Building/Installing nhc98" page it
says that if you build using the C compiler only the resulting compiler is
slower.  Why?  I would have thought the hc files were directly from nhc (or
ghc?) in the first place (and if from ghc then wouldn't the resulting
compiler be faster than an nhc-bootstrapped compiler)?  Anyway, now that I
have built from C sources should I bootstrap through the resulting nhc98?

Plus a small correction for the "Installing nhc98 under Windows" page:  you
also need cygwin's 'bc' tool which is not installed by default.

-- Dave

----- Original Message -----
From: "Malcolm Wallace" <Malcolm.Wallace@cs.york.ac.uk>
To: "David Bakin" <davidbak@attbi.com>
Cc: <nhc-users@haskell.org>
Sent: Thursday, April 10, 2003 2:03 AM
Subject: Re: [nhc-users] Problem installing nhc98 1.16 using
bootstrap-from-C method


> "David Bakin" <davidbak@attbi.com> writes:
>
> > I'm having trouble building nhc98 using bootstrap-from-C - the following
> > shows the error I'm getting.  It is actually executing in hmake3.config
> >
> > I/O error:
> >   action :  openFile ReadMode
> >   on file:  /cygdrive/c/TEMP\hmakeconfig.tmp
> >   gave   :  ENOENT (No such file or directory)
>
> I believe the problem here is the mixture of directory separators.
> When compiled by ghc the mix doesn't matter, but it does matter in a
> pure C-under-cygwin build, which likes to pretend to be Unix as much
> as possible.
>
> In src/hmake/RunAndReadStdout.hs, try changing
>
>     tmpfile root =
>       ...
>       if windows
>         then (tmp++"\\"++root++".tmp")
> to
>         then (tmp++"/"++root++".tmp")
>
> Then, because you are bootstrapping via C, you will need to re-generate
> the .hc file from this source before continuing with the build:
>
>     ( cd src/hmake && ../../script/nhc98 -C RunAndReadStdout.hs )
>     make
>
> Regards,
>     Malcolm