Commit 1eee6c55 authored by simonmar's avatar simonmar
Browse files

[project @ 2001-01-17 15:11:04 by simonmar]

Update sweep
parent 68206aea
......@@ -11,15 +11,15 @@
<Abstract>
<Para>
<para>
This guide is intended for people who want to build or modify
programs from the Glasgow <Literal>fptools</Literal> suite (as distinct from those
who merely want to <Emphasis>run</Emphasis> them). Installation instructions are now provided in the user guide.
</Para>
</para>
<Para>
<para>
The bulk of this guide applies to building on Unix systems; see <XRef LinkEnd="winbuild"> for Windows notes.
</Para>
</para>
</Abstract>
......@@ -30,34 +30,34 @@ The bulk of this guide applies to building on Unix systems; see <XRef LinkEnd="w
<Title>Getting the Glasgow <Literal>fptools</Literal> suite
</Title>
<Para>
<para>
Building the Glasgow tools <Emphasis>can</Emphasis> be complicated, mostly because
there are so many permutations of what/why/how, e.g., ``Build Happy
with HBC, everything else with GHC, leave out profiling, and test it
all on the `real' NoFib programs.'' Yeeps!
</Para>
</para>
<Para>
<para>
Happily, such complications don't apply to most people. A few common
``strategies'' serve most purposes. Pick one and proceed
as suggested:
</Para>
</para>
<Para>
<para>
<VariableList>
<VarListEntry>
<Term><IndexTerm><Primary>Binary distribution</Primary></IndexTerm>Binary distribution.</Term>
<ListItem>
<Para>
<para>
If your only purpose is to install some of the <Literal>fptools</Literal> suite then the easiest thing to do is to get a binary distribution. In the
binary distribution everything is pre-compiled for your particular
machine architecture and operating system, so all you should have to
do is install the binaries and libraries in suitable places. The user guide
describes how to do this.
</Para>
</para>
<Para>
<para>
A binary distribution may not work for you for two reasons. First, we
may not have built the suite for the particular architecture/OS
platform you want. That may be due to lack of time and energy (in
......@@ -65,123 +65,104 @@ which case you can get a source distribution and build from it; see
below). Alternatively, it may be because we haven't yet ported the
suite to your architecture, in which case you are considerably worse
off.
</Para>
</para>
<Para>
<para>
The second reason a binary distribution may not be what you want is
if you want to read or modify the souce code.
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
<Term><IndexTerm><Primary>Source distribution</Primary></IndexTerm>Source distribution.</Term>
<ListItem>
<Para>
<para>
You have a supported
platform, but (a)&nbsp;you like the warm fuzzy feeling of compiling things
yourself; (b)&nbsp;you want to build something ``extra''&mdash;e.g., a set of
libraries with strictness-analysis turned off; or (c)&nbsp;you want to hack
on GHC yourself.
</Para>
</para>
<Para>
<para>
A source distribution contains complete sources for one or more
projects in the <Literal>fptools</Literal> suite. Not only that, but the more awkward
machine-independent steps are done for you. For example, if you don't
have <Command>flex</Command><IndexTerm><Primary>flex</Primary></IndexTerm> you'll find it convenient that the source
distribution contains the result of running <Command>flex</Command> on the lexical
analyser specification. If you don't want to alter the lexical
analyser then this saves you having to find and install <Command>flex</Command>. You
will still need a working version of GHC on your machine in order to
compile (most of) the sources, however.
</Para>
<Para>
We make source distributions more frequently than binary
distributions; a release that comes with pre-compiled binaries
is considered a major release, i.e., a release that we have some
confidence will work well by having tested it (more) thoroughly.
</Para>
<Para>
Source-only distributions are either bugfix releases or snapshots of
current state of development. The release has undergone some testing.
Source releases of GHC 4.xx can be compiled up using GHC 2.10 or
later.
</Para>
projects in the <Literal>fptools</Literal> suite. Not only that, but
the more awkward machine-independent steps are done for you. For
example, if you don't have
<Command>happy</Command><IndexTerm><Primary>happy</Primary></IndexTerm>
you'll find it convenient that the source distribution contains the
result of running <Command>happy</Command> on the parser
specifications. If you don't want to alter the parser then this saves
you having to find and install <Command>happy</Command>. You will
still need a working version of GHC (preferably version 4.08+) on your
machine in order to compile (most of) the sources, however.
</para>
</ListItem></VarListEntry>
<VarListEntry>
<Term>Build GHC from intermediate C <Filename>.hc</Filename> files<IndexTerm><Primary>hc files</Primary></IndexTerm>:</Term>
<ListItem>
<Para>
<para>
You
need a working GHC to use a source distribution. What if you don't
have a working GHC? Then you have no choice but to ``bootstrap'' up
from the intermediate C (<Filename>.hc</Filename>) files that we provide. Building GHC
on an unsupported platform falls into this category. Please see
<Xref LinkEnd="sec-booting-from-C">.
</Para>
</para>
<Para>
<para>
Once you have built GHC, you can build the other Glasgow tools with
it.
</Para>
</para>
<Para>
<para>
In theory, you can (could?) build GHC with another Haskell compiler
(e.g., HBC). We haven't tried to do this for ages and it almost
certainly doesn't work any more (for tedious reasons).
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
<Term>The CVS repository.</Term>
<ListItem>
<Para>
We make source distributions slightly more often than binary
distributions; but still infrequently. If you want more up-to-the
minute (but less tested) source code then you need to get access to
our CVS repository.
</Para>
<Para>
All the <Literal>fptools</Literal> 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.
</Para>
<Para>
The repository holds source code only. It holds no mechanically
<para>
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.
</para>
<para>All the <Literal>fptools</Literal> 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.</para>
<para>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.
</Para>
<Para>
More information about our CVS repository is available in the <ULink
URL="http://www.haskell.org/ghc/cvs-cheat-sheet.html" >FPTools CVS
Cheat Sheet</ULink >.
</Para>
derived files from scratch.</para>
<para>More information about our CVS repository is available in the
<ULink URL="http://www.haskell.org/ghc/cvs-cheat-sheet.html">fptools
CVS Cheat Sheet</ULink>.</para>
</ListItem></VarListEntry>
</VariableList>
</Para>
</para>
<Para>
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.
</Para>
<para>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.</para>
</Sect1>
<Sect1 id="sec-build-checks">
<Title>Things to check before you start typing</Title>
<Para>
<para>
Here's a list of things to check before you get started.
<OrderedList>
<ListItem>
<Para>
<para>
<IndexTerm><Primary>Disk space needed</Primary></IndexTerm>
Disk space needed: About 40MB (one tenth of one hamburger's worth) of disk
space for the most basic binary distribution of GHC; more for some
......@@ -190,31 +171,31 @@ libraries) might take you to up to one fifth of a hamburger. You'll need
over 100MB (say, one fifth a hamburger's worth) if you need to build the
basic stuff from scratch. All of the above are
<Emphasis>estimates</Emphasis> of disk-space needs. (Note: our benchmark hamburger is a standard Double Whopper with Cheese, with an RRP of UKP2.99.)
</Para>
</para>
</ListItem>
<ListItem>
<Para>
Use an appropriate machine, compilers, and things.
SPARC boxes, and PCs running Linux, FreeBSD, NetBSD, or Solaris are
all fully supported. Win32 and HP boxes are in pretty good shape.
DEC Alphas running OSF/1, Linux or some BSD variant, MIPS and AIX
boxes will need some minimal porting effort before they work (as of
4.06). <Xref LinkEnd="sec-port-info"> gives the full run-down on
ports or lack thereof.
</Para>
<para>
Use an appropriate machine, compilers, and things. SPARC boxes, and
PCs running Linux, BSD (any variant), or Solaris are all fully
supported. Win32 and HP boxes are in pretty good shape. DEC Alphas
running OSF/1, Linux or some BSD variant, MIPS and AIX boxes will need
some minimal porting effort before they work (as of 4.06). <Xref
LinkEnd="sec-port-info"> gives the full run-down on ports or lack
thereof.
</para>
</ListItem>
<ListItem>
<Para>
<para>
Be sure that the ``pre-supposed'' utilities are installed.
<Xref LinkEnd="sec-pre-supposed"> elaborates.
</Para>
</para>
</ListItem>
<ListItem>
<Para>
<para>
If you have any problem when building or installing the Glasgow
tools, please check the ``known pitfalls'' (<Xref
LinkEnd="sec-build-pitfalls">). Also check the FAQ for the version
......@@ -235,12 +216,12 @@ For GHC, please see the bug-reporting section of the GHC Users' Guide
If in doubt, please send a message to
<Email>glasgow-haskell-bugs@haskell.org</Email>.
<IndexTerm><Primary>bugs, mailing list</Primary></IndexTerm>
</Para>
</para>
</ListItem>
</OrderedList>
</Para>
</para>
</Sect1>
......@@ -248,39 +229,39 @@ If in doubt, please send a message to
<Title>What machines the Glasgow tools run on
</Title>
<Para>
<para>
<IndexTerm><Primary>ports, GHC</Primary></IndexTerm>
<IndexTerm><Primary>GHC ports</Primary></IndexTerm>
<IndexTerm><Primary>supported platforms</Primary></IndexTerm>
<IndexTerm><Primary>platforms, supported</Primary></IndexTerm>
The main question is whether or not the Haskell compiler (GHC) runs on
your platform.
</Para>
</para>
<Para>
<para>
A ``platform'' is a architecture/manufacturer/operating-system
combination, such as <Literal>sparc-sun-solaris2</Literal>. Other common ones are
<Literal>alpha-dec-osf2</Literal>, <Literal>hppa1.1-hp-hpux9</Literal>, <Literal>i386-unknown-linux</Literal>,
<Literal>i386-unknown-solaris2</Literal>, <Literal>i386-unknown-freebsd</Literal>,
<Literal>i386-unknown-cygwin32</Literal>, <Literal>m68k-sun-sunos4</Literal>, <Literal>mips-sgi-irix5</Literal>,
<Literal>sparc-sun-sunos4</Literal>, <Literal>sparc-sun-solaris2</Literal>, <Literal>powerpc-ibm-aix</Literal>.
</Para>
</para>
<Para>
<para>
Bear in mind that certain ``bundles'', e.g. parallel Haskell, may not
work on all machines for which basic Haskell compiling is supported.
</Para>
</para>
<Para>
<para>
Some libraries may only work on a limited number of platforms; for
example, a sockets library is of no use unless the operating system
supports the underlying BSDisms.
</Para>
</para>
<Sect2>
<Title>What platforms the Haskell compiler (GHC) runs on</Title>
<Para>
<para>
<IndexTerm><Primary>fully-supported platforms</Primary></IndexTerm>
<IndexTerm><Primary>native-code generator</Primary></IndexTerm>
<IndexTerm><Primary>registerised ports</Primary></IndexTerm>
......@@ -289,24 +270,19 @@ The GHC hierarchy of Porting Goodness: (a)&nbsp;Best is a native-code
generator; (b)&nbsp;next best is a ``registerised''
port; (c)&nbsp;the bare minimum is an ``unregisterised'' port.
(``Unregisterised'' is so terrible that we won't say more about it).
</Para>
<Para>
The native code generator is currently non-functional (as of GHC
version 4.06), but we're actively working on getting it going again.
</Para>
</para>
<Para>
<para>
We use Sparcs running Solaris 2.7 and x86 boxes running FreeBSD and
Linux, so those are the best supported platforms, unsurprisingly.
</Para>
</para>
<Para>
<para>
Here's everything that's known about GHC ports. We identify platforms
by their ``canonical'' CPU/Manufacturer/OS triple.
</Para>
</para>
<Para>
<para>
<VariableList>
<VarListEntry>
......@@ -318,14 +294,14 @@ by their ``canonical'' CPU/Manufacturer/OS triple.
<IndexTerm><Primary>alpha-dec-netbsd</Primary></IndexTerm>
<ListItem>
<Para>
<para>
Currently non-working. The last working version (osf[1-3]) is GHC
3.02. A small amount of porting effort will be required to get Alpha
support into GHC 4.xx, but we don't have easy access to machines right
now, and there hasn't been a massive demand for support, so Alphas
remain unsupported for the time being. Please get in touch if you
either need Alpha support and/or can provide access to boxes.
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
......@@ -333,9 +309,9 @@ either need Alpha support and/or can provide access to boxes.
<IndexTerm><Primary>sparc-sun-sunos4</Primary></IndexTerm>
<ListItem>
<Para>
<para>
Probably works with minor tweaks, hasn't been tested for a while.
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
......@@ -343,9 +319,9 @@ Probably works with minor tweaks, hasn't been tested for a while.
<IndexTerm><Primary>sparc-sun-solaris2</Primary></IndexTerm>
<ListItem>
<Para>
<para>
Fully supported, including native-code generator.
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
......@@ -353,9 +329,9 @@ Fully supported, including native-code generator.
<IndexTerm><Primary>hppa1.1-hp-hpux</Primary></IndexTerm>
<ListItem>
<Para>
<para>
Works registerised. No native-code generator.
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
......@@ -363,14 +339,14 @@ Works registerised. No native-code generator.
<IndexTerm><Primary>i386-*-linux</Primary></IndexTerm>
<ListItem>
<Para>
GHC works registerised. You <Emphasis>must</Emphasis> have GCC 2.7.x
or later. NOTE about <literal>glibc</literal> versions: GHC binaries
built on a system running <literal>glibc 2.0</literal> won't work on a
system running <literal>glibc 2.1</literal>, and vice version. In
general, don't expect compatibility between <literal>glibc</literal>
versions, even if the shared library version hasn't changed.
</Para>
<para>GHC works registerised, has a native code generator. You
<Emphasis>must</Emphasis> have GCC 2.7.x or later. NOTE about
<literal>glibc</literal> versions: GHC binaries built on a system
running <literal>glibc 2.0</literal> won't work on a system running
<literal>glibc 2.1</literal>, and vice versa. In general, don't
expect compatibility between <literal>glibc</literal> versions, even
if the shared library version hasn't changed.
</para>
</ListItem></VarListEntry>
<VarListEntry>
......@@ -381,11 +357,11 @@ or higher, NetBSD, and possibly OpenBSD):</Term>
<IndexTerm><Primary>i386-unknown-openbsd</Primary></IndexTerm>
<ListItem>
<Para>
<para>
GHC works registerised. These systems provide ready-built packages of
GHC, so if you just need binaries you're better off just installing
the package.
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
......@@ -393,12 +369,12 @@ the package.
<IndexTerm><Primary>i386-unknown-cygwin32</Primary></IndexTerm>
<ListItem>
<Para>
<para>
Fully supported under Win9x/NT, including a native code
generator. Requires the <Literal>cygwin32</Literal> compatibility
library and a healthy collection of GNU tools (i.e., gcc, GNU ld, bash
etc.).
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
......@@ -406,26 +382,26 @@ etc.).
<IndexTerm><Primary>mips-sgi-irix[5-6]</Primary></IndexTerm>
<ListItem>
<Para>
<para>
Port currently doesn't work, needs some minimal porting effort. As
usual, we don't have access to machines and there hasn't been an
overwhelming demand for this port, but feel free to get in touch.
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
<Term>powerpc-ibm-aix:</Term>
<ListItem>
<Para>
<para>
<IndexTerm><Primary>powerpc-ibm-aix</Primary></IndexTerm>
Port currently doesn't work, needs some minimal porting effort. As
usual, we don't have access to machines and there hasn't been an
overwhelming demand for this port, but feel free to get in touch.
</Para>
</para>
</ListItem></VarListEntry>
</VariableList>
</Para>
</para>
<para>
Various other systems have had GHC ported to them in the distant past,
......@@ -439,9 +415,9 @@ task.
<Sect2>
<Title>What machines the other tools run on</Title>
<Para>
<para>
Unless you hear otherwise, the other tools work if GHC works.
</Para>
</para>
</Sect2>
......@@ -454,7 +430,7 @@ Unless you hear otherwise, the other tools work if GHC works.
<IndexTerm><Primary>pre-supposed utilities</Primary></IndexTerm>
<IndexTerm><Primary>utilities, pre-supposed</Primary></IndexTerm></Title>
<Para>
<para>
Here are the gory details about some utility programs you may need;
<Command>perl</Command>, <Command>gcc</Command> and
<command>happy</command> are the only important
......@@ -462,9 +438,9 @@ ones. (PVM<IndexTerm><Primary>PVM</Primary></IndexTerm> is important
if you're going for Parallel Haskell.) The
<Command>configure</Command><IndexTerm><Primary>configure</Primary></IndexTerm>
script will tell you if you are missing something.
</Para>
</para>
<Para>
<para>
<VariableList>
<VarListEntry>
......@@ -472,27 +448,27 @@ script will tell you if you are missing something.
<IndexTerm><Primary>pre-supposed: Perl</Primary></IndexTerm>
<IndexTerm><Primary>Perl, pre-supposed</Primary></IndexTerm>
<ListItem>
<Para>
<para>
<Emphasis>You have to have Perl to proceed!</Emphasis> Perl is a
language quite good for doing shell-scripty tasks that involve lots of
text processing. It is pretty easy to install.
</Para>
</para>
<Para>
<para>
Perl&nbsp;5 is required. For Win32 platforms, we strongly suggest you
pick up a port of Perl&nbsp;5 for <Literal>cygwin32</Literal>, as the
common Hip/ActiveWare port of Perl is Not Cool Enough for our
purposes.
</Para>
</para>
<Para>
<para>
Perl should be put somewhere so that it can be invoked by the
<Literal>&num;!</Literal> script-invoking mechanism. (I believe
<Filename>/usr/bin/perl</Filename> is preferred; we use
<Filename>/usr/local/bin/perl</Filename> at Glasgow.) The full
pathname should may need to be less than 32 characters long on some
systems.
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
......@@ -501,20 +477,20 @@ systems.
<IndexTerm><Primary>GCC (GNU C compiler), pre-supposed</Primary></IndexTerm>
<ListItem>
<Para>
<para>
We recommend using GCC version 2.95.2 on all platforms. Failing that,
version 2.7.2 is stable on most platforms. Earlier versions of GCC
can be assumed not to work, and versions in between 2.7.2 and 2.95.2
(including <command>egcs</command>) have varying degrees of stability
depending on the platform.
</Para>
</para>
<Para>
<para>
If your GCC dies with ``internal error'' on some GHC source file,
please let us know, so we can report it and get things improved.
(Exception: on iX86 boxes&mdash;you may need to fiddle with GHC's
<Option>-monly-N-regs</Option> option; see the User's Guide)
</Para>
</para>
</ListItem></VarListEntry>
<varlistentry>
......@@ -538,18 +514,18 @@ url="http://www.haskell.org/happy/">Happy's Web Page</ulink>.
<IndexTerm><Primary>pre-supposed: Autoconf</Primary></IndexTerm>
<IndexTerm><Primary>Autoconf, pre-supposed</Primary></IndexTerm>
<ListItem>
<Para>
<para>
GNU Autoconf is needed if you intend to build from the CVS sources, it
is <Emphasis>not</Emphasis> needed if you just intend to build a
standard source distribution.
</Para>
</para>
<Para>
<para>
Autoconf builds the <Command>configure</Command> script from
<Filename>configure.in</Filename> and <Filename>aclocal.m4</Filename>.
If you modify either of these files, you'll need
<command>autoconf</command> to rebuild <Filename>configure</Filename>.
</Para>
</para>
</ListItem></VarListEntry>
<VarListEntry>
......@@ -557,30 +533,30 @@ If you modify either of these files, you'll need
<IndexTerm><Primary>pre-supposed: sed</Primary></IndexTerm>
<IndexTerm><Primary>sed, pre-supposed</Primary></IndexTerm>
<ListItem>
<Para>
<para>
You need a working <Command>sed</Command> if you are going to build
from sources. The build-configuration stuff needs it. GNU sed
version 2.0.4 is no good! It has a bug in it that is tickled by the
build-configuration. 2.0.5 is OK. Others are probably OK too
(assuming we don't create too elaborate configure scripts.)
</Para>
</para>
</ListItem></VarListEntry>
</VariableList>
</Para>
</para>
<Para>
<para>
One <Literal>fptools</Literal> project is worth a quick note at this
point, because it is useful for all the others:
<Literal>glafp-utils</Literal> contains several utilities which aren't
particularly Glasgow-ish, but Occasionally Indispensable. Like
<Command>lndir</Command> for creating symbolic link trees.
</Para>
</para>
<Sect2 id="pre-supposed-gph-tools">
<Title>Tools for building parallel GHC (GPH)
</Title>
<Para>
<para>
<VariableList>
<VarListEntry>
......@@ -589,37 +565,37 @@ particularly Glasgow-ish, but Occasionally Indispensable. Like