Building the Glasgow Functional Programming Tools Suite

The GHC Team

November 2001

The Glasgow fptools suite is a collection of Functional Programming related tools, including the Glasgow Haskell Compiler (GHC). The source code for the whole suite is kept in a single CVS repository and shares a common build and installation system.

This guide is intended for people who want to build or modify programs from the Glasgow fptools suite (as distinct from those who merely want to run them). Installation instructions are now provided in the user guide.

The bulk of this guide applies to building on Unix systems; see Section 12 for Windows notes.


Table of Contents
1. Getting the sources
2. Using the CVS repository
3. What projects are there?
4. Things to check before you start
5. What machines the Glasgow tools run on
6. Installing pre-supposed utilities
7. Building from source
8. The Makefile architecture
9. Building the documentation
10. Porting GHC
11. Known pitfalls in building Glasgow Haskell
12. Notes for building under Windows

1. Getting the sources

You can get your hands on the fptools in two ways:

Source distributions

You have a supported platform, but (a) you like the warm fuzzy feeling of compiling things yourself; (b) you want to build something ``extra”—e.g., a set of libraries with strictness-analysis turned off; or (c) you want to hack on GHC yourself.

A source distribution contains complete sources for one or more projects in the fptools suite. Not only that, but the more awkward machine-independent steps are done for you. For example, if you don't have happy you'll find it convenient that the source distribution contains the result of running happy on the parser specifications. If you don't want to alter the parser then this saves you having to find and install happy. You will still need a working version of GHC (version 5.x or later) on your machine in order to compile (most of) the sources, however.

The CVS repository.

We make releases infrequently. If you want more up-to-the minute (but less tested) source code then you need to get access to our CVS repository.

All the fptools source code is held in a CVS repository. CVS is a pretty good source-code control system, and best of all it works over the network.

The repository holds source code only. It holds no mechanically generated files at all. So if you check out a source tree from CVS you will need to install every utility so that you can build all the derived files from scratch.

More information about our CVS repository can be found in Section 2.

If you are going to do any building from sources (either from a source distribution or the CVS repository) then you need to read all of this manual in detail.