Version 5 (modified by igloo, 9 years ago) (diff)


Setting up a Windows system for building GHC

Installing the following will get you a working build environment with MSYS (alternatively, install Cygwin). For your convenience we've cached a working set of build tools that you can download. Note: do not install anything in a directory that contains spaces, because the GHC build system is not capable of handling paths with spaces in.

  • First install a recent stable version of GHC.
  • Install Python (version 2.6.2 is a good choice. 2.6.1 causes a problem with the test suite, and we don't support 3.x at this time).

The next three are just zip files, you can unpack them wherever you like, but you need to ensure that the programs can be found on your PATH. I usually put all these in c:/tools (NB. don't put them anywhere in c:/msys, that's special).

Now set your PATH. We recommend doing this by creating a file .profile in your home directory (by default c:/msys/1.0/home/<username>). The contents of your .profile should be something like this:


Modify the above according to where you installed things, and change the GHC version appropriately.

Building documentation on Windows

Documentation is optional, but in order to build it in Windows you must currently use Cygwin (there isn't a working DocBook toolchain on MSYS as far as we know).

In the Cygwin installer, just install the complete Doc category. You may have to help configure a little bit: Set the environment variables XmllintCmd and XsltprocCmd to the paths of the Cygwin executables xmllint and xsltproc, respectively, and set fp_cv_dir_docbook_xsl to the path of the directory where the XSL stylesheets are installed, e.g. c:/cygwin/usr/share/docbook-xsl.

If you want to build HTML Help, you have to install the HTML Help SDK, too, and make sure that hhc is in your PATH.