Installing nhc98 under Windows
System Requirements
In order to use nhc98 under Windows 95/98/ME or NT/2000/XP, you first
need to install the Cygwin DLL, the gcc C compiler, and GNU tools.
For recent releases of Cygwin (from 1.1.0 onwards), you should
download the small utility called setup.exe from a Cygwin
mirror FTP site and follow its instructions to install the toolset.
This is an interactive process where you can choose which components
to collect and install.
(The older Cygwin release 1.0 was available on CD-ROM only,
and for even older Cygwin versions (b19, b20, and
b20.1), you needed to download and run the self-extracting
archive cygwin/full.exe.)
Along with gcc, you should also get the bash shell
and lots of other Unix tools, such as tar, gunzip,
and make, which are needed to unpack and build the
nhc98 distribution. (It is safest to simply collect the
entire set of packages.)
Caution: some people report that their anti-virus software interacts
badly with Cygwin, slowing the entire Windows system to a crawl.
If you are surprised by the slowness of your system, try disabling
(or changing the settings in) your anti-virus package.
We last tested with Cygwin release 1.1.4, together with
gcc 2.95.2-4 and make 3.79.1.
Full information on Cygwin is available from
http://sources.redhat.com/cygwin/
In Northern Europe, a good mirror of the Cygwin toolset is
SunSite.)
If you have a recent version of GHC (5.00 upwards) already installed
on your Windows system, then there is a specific pitfall to beware of.
- GHC no longer relies on the Cygwin environment, but is a fully
native Windows compiler. This is a good thing in general,
but it does mean that if you try to use GHC under Cygwin, for
instance to build nhc98, you may occasionally bump into problems.
These are largely due to a mismatch between the Windows view of
the filesystem and the Cygwin view of it.
- The build system for nhc98 uses an absolute pathname as the
destination of a compile command. This is one of the areas
where Cygwin and GHC can conflict if you are not careful. The
important thing to remember is that the location in which you
unpack the nhc98 distribution must have the same absolute
filepath in both Cygwin and Windows. For instance, a Cygwin
mount that maps C:\tmp to /tmp will work fine,
whereas a mount that maps C:\cygwin\tmp to /tmp
will probably not work.
Some people have reported difficulty getting recent releases of nhc98
to build with older versions of Cygwin. The make fails very quickly,
saying that there is "no rule to make target .../src/runtime/Kernel".
This could be due to one of several causes.
- Ensure that the environment variable MAKE_MODE is set to UNIX.
- Gnu-make's $(patsubst ...) can't handle spaces in directory pathnames
- so please ensure you don't have any!
- Untarring the source package sometimes mistakenly creates
directory names in upper-case instead of lower-case. (Ensure you
untar in Windows itself, rather than onto a Windows partition
from Linux, for example.)
- Some distributions of Gnu-make do not handle globbing in static
pattern rules as they should. (make 3.75 in Cygwin b20 is broken,
although the same version works correctly on other platforms.)
Upgrade (or downgrade) to a different (working) version of make.
And now...
Once you have installed gcc and tools, the standard installation instructions apply. You have
the option of installing the binary or source distribution packages.
(A prior installation of Cygwin is required even for the binary
distribution.)
The latest updates to these pages are available on the WWW from
http://www.cs.york.ac.uk/fp/nhc98/
2002.04.05
York Functional Programming Group
|