... | ... | @@ -11,31 +11,31 @@ In most cases the `configure` script will tell you if you are missing something. |
|
|
GHC is required to build GHC, because GHC itself is
|
|
|
written in Haskell, and uses GHC extensions. It is possible
|
|
|
to build GHC using just a C compiler, and indeed some
|
|
|
distributions of GHC do just that, but it isn't the best
|
|
|
distributions of GHC do just that, but it isn't the best
|
|
|
supported method, and you may encounter difficulties. Full
|
|
|
instructions are in [Porting GHC](building/porting).
|
|
|
|
|
|
instructions are in <a href="building/porting">Porting GHC</a>.
|
|
|
<br><br>
|
|
|
GHC can be built using either an earlier released
|
|
|
version of GHC, or
|
|
|
bootstrapped using a GHC built from exactly the same
|
|
|
sources. Note that this means you cannot in general build
|
|
|
GHC using an arbitrary development snapshot, or a build from
|
|
|
say last week. It might work, it might not - we don't
|
|
|
say last week. It might work, it might not - we don't
|
|
|
guarantee anything. To be on the safe side, start your
|
|
|
build using the most recently released stable version of
|
|
|
GHC.
|
|
|
|
|
|
<br><br>
|
|
|
In general, we support building with the previous 2
|
|
|
major releases, e.g.:
|
|
|
|
|
|
- To build 6.8.\* you need GHC \>= 6.4
|
|
|
- To build 6.10.\* you need GHC \>= 6.6
|
|
|
- To build 7.4.\* you need GHC \>= 7.0
|
|
|
- To build 7.6.\* you need GHC \>= 7.2
|
|
|
- To build 7.8.\* you need GHC \>= 7.4
|
|
|
- To build 7.10.\* you need GHC \>= 7.6
|
|
|
- To build 8.0.\* you need GHC \>= 7.8
|
|
|
- To build 8.2.\* you need GHC \>= 7.10
|
|
|
- To build 6.8.* you need GHC >= 6.4
|
|
|
- To build 6.10.* you need GHC >= 6.6
|
|
|
- To build 7.4.* you need GHC >= 7.0
|
|
|
- To build 7.6.* you need GHC >= 7.2
|
|
|
- To build 7.8.* you need GHC >= 7.4
|
|
|
- To build 7.10.* you need GHC >= 7.6
|
|
|
- To build 8.0.* you need GHC >= 7.8
|
|
|
- To build 8.2.* you need GHC >= 7.10
|
|
|
|
|
|
</td></tr></table>
|
|
|
|
... | ... | @@ -49,143 +49,159 @@ various bugs tickled by GHC, so the configure script |
|
|
will look for version 5.6 or later.
|
|
|
|
|
|
Perl should be put somewhere so that it can be invoked
|
|
|
by the `#!` script-invoking mechanism.
|
|
|
by the <tt>#!</tt> script-invoking mechanism.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>GNU C (`gcc`)</th>
|
|
|
|
|
|
<table><tr><th>GNU C (<tt>gcc</tt>)</th>
|
|
|
<td>
|
|
|
Most GCC versions should work with the most recent GHC
|
|
|
sources. Expect trouble if you use a recent GCC with
|
|
|
an older GHC, though (trouble in the form of mis-compiled code,
|
|
|
link errors, and errors from the `ghc-asm`
|
|
|
link errors, and errors from the <tt>ghc-asm</tt>
|
|
|
script).
|
|
|
|
|
|
If your GCC dies with "internal error"" on
|
|
|
<br><br>
|
|
|
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 x86
|
|
|
boxes, you may need to fiddle with GHC's
|
|
|
`-monly-N-regs` option; see the User's
|
|
|
boxes, you may need to fiddle with GHC's
|
|
|
<tt>-monly-N-regs</tt> option; see the User's
|
|
|
Guide).
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>GNU Make</th>
|
|
|
<td>
|
|
|
The GHC build system makes heavy use of features
|
|
|
specific to recent versions of GNU `make`, so
|
|
|
specific to recent versions of GNU <tt>make</tt>, so
|
|
|
you must have at least GNU make 3.80 installed in
|
|
|
order to build GHC.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>[ Happy](http://www.haskell.org/happy)</th>
|
|
|
|
|
|
<table><tr><th><a href="http://www.haskell.org/happy"> Happy</a></th>
|
|
|
<td>
|
|
|
Happy is a parser generator tool for Haskell, and is
|
|
|
used to generate GHC's parsers.
|
|
|
|
|
|
If you start from a source tarball of GHC, then you don't need Happy, because we supply the
|
|
|
used to generate GHC's parsers.
|
|
|
<br><br>
|
|
|
If you start from a source tarball of GHC, then you don't need Happy, because we supply the
|
|
|
pre-processed versions of the Happy parsers. If you intend to
|
|
|
modify the compiler and/or build from a git repository, then you
|
|
|
need Happy.
|
|
|
|
|
|
<br><br>
|
|
|
Happy version 1.19.4 or higher is currently required to build GHC.
|
|
|
Grab a copy from
|
|
|
[ Happy's Web Page](http://www.haskell.org/happy/).
|
|
|
<a href="http://www.haskell.org/happy/"> Happy's Web Page</a>.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>[ Alex](http://www.haskell.org/alex/)</th>
|
|
|
|
|
|
<table><tr><th><a href="http://www.haskell.org/alex/"> Alex</a></th>
|
|
|
<td>
|
|
|
Alex is a lexical-analyser generator for Haskell,
|
|
|
which GHC uses to generate its lexer.
|
|
|
|
|
|
Like Happy, you don't need Alex if you're building GHC from a
|
|
|
source tarball, but you do need it if you're modifying GHC and/or
|
|
|
<br><br>
|
|
|
Like Happy, you don't need Alex if you're building GHC from a
|
|
|
source tarball, but you do need it if you're modifying GHC and/or
|
|
|
building from a git repository.
|
|
|
|
|
|
<br><br>
|
|
|
Alex version 3.1 or higher is currently required to build GHC.
|
|
|
Alex is
|
|
|
written in Haskell.
|
|
|
Alex distributions are available from
|
|
|
[ Alex's Web Page](http://www.haskell.org/alex/).
|
|
|
<a href="http://www.haskell.org/alex/"> Alex's Web Page</a>.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>[ Haddock](http://www.haskell.org/haddock/)</th>
|
|
|
|
|
|
<table><tr><th><a href="http://www.haskell.org/haddock/"> Haddock</a></th>
|
|
|
<td>
|
|
|
Haddock is a documentation generator for Haskell,
|
|
|
used for making the docs for the libraries. If you don't want to build the docs then you don't need haddock.
|
|
|
|
|
|
used for making the docs for the libraries. If you don't want to build the docs then you don't need haddock.
|
|
|
<br><br>
|
|
|
Haddock is only needed for GHC 6.8.3 and older; GHC 6.10 comes with Haddock.
|
|
|
For GHC 6.8 and older you need a 0.\* version of haddock; 2.\* versions won't work.
|
|
|
For GHC 6.8 and older you need a 0.* version of haddock; 2.* versions won't work.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>`autoconf` and `automake`</th>
|
|
|
|
|
|
<table><tr><th><tt>autoconf</tt> and <tt>automake</tt></th>
|
|
|
<td>
|
|
|
These are needed if you intend to build from the
|
|
|
darcs/git sources, they are *not* needed if you
|
|
|
darcs/git sources, they are <i>not</i> needed if you
|
|
|
just intend to build a standard source distribution.
|
|
|
|
|
|
<br><br>
|
|
|
Version 2.52 or later of the autoconf package is required.
|
|
|
NB. version 2.13 will no longer work, as of GHC version
|
|
|
6.1. Version 1.9 of automake is known to work, use others at
|
|
|
your own risk.
|
|
|
`autoreconf` (from the autoconf package)
|
|
|
recursively builds `configure` scripts from
|
|
|
the corresponding `configure.ac` and
|
|
|
`aclocal.m4` files. If you modify one of
|
|
|
the latter files, you'll need `autoreconf` to
|
|
|
rebuild the corresponding `configure`.
|
|
|
<br><br>
|
|
|
<tt>autoreconf</tt> (from the autoconf package)
|
|
|
recursively builds <tt>configure</tt> scripts from
|
|
|
the corresponding <tt>configure.ac</tt> and
|
|
|
<tt>aclocal.m4</tt> files. If you modify one of
|
|
|
the latter files, you'll need <tt>autoreconf</tt> to
|
|
|
rebuild the corresponding <tt>configure</tt>.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>`diff`</th>
|
|
|
|
|
|
<table><tr><th><tt>diff</tt></th>
|
|
|
<td>
|
|
|
Most installations should have this by default.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>`lndir`</th>
|
|
|
|
|
|
<table><tr><th><tt>lndir</tt></th>
|
|
|
<td>
|
|
|
Needed if you want to prepare a source distribution with
|
|
|
`make sdist`, and useful for maintaining a separate
|
|
|
[build tree](building/using).
|
|
|
<tt>make sdist</tt>, and useful for maintaining a separate
|
|
|
<a href="building/using">build tree</a>.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>`sed`</th>
|
|
|
|
|
|
<table><tr><th><tt>sed</tt></th>
|
|
|
<td>
|
|
|
Most Unix installations and MSYS2 on
|
|
|
Windows already come with `sed`, so you're probably OK.
|
|
|
Windows already come with <tt>sed</tt>, so you're probably OK.
|
|
|
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
|
|
|
OK. Others are probably OK too (assuming we don't create too
|
|
|
elaborate configure scripts.)
|
|
|
</td></tr></table>
|
|
|
|
|
|
|
|
|
<table><tr><th>Python</th>
|
|
|
<td>
|
|
|
Required for [running the testsuite](building/running-tests).
|
|
|
Required for <a href="building/running-tests">running the testsuite</a>.
|
|
|
Version 2.6 or later is needed. Python3 should also work.
|
|
|
Python3 is needed for GHC 8.2.1 or later.
|
|
|
</td></tr></table>
|
|
|
|
|
|
|
|
|
<table><tr><th>Sphinx</th>
|
|
|
<td>
|
|
|
Required for building the [documentation](building/docs).
|
|
|
Required for building the <a href="building/docs">documentation</a>.
|
|
|
</td></tr></table>
|
|
|
|
|
|
|
|
|
<table><tr><th>LLVM</th>
|
|
|
<td>
|
|
|
Required for compiling code with the `-fllvm` flag enabled (e.g., if you want to build GHC with the `perf-llvm` build flavour). Version 3.8 or later is required. See also [the LLVM installation page](commentary/compiler/backends/llvm/installing).
|
|
|
Required for compiling code with the <tt>-fllvm</tt> flag enabled (e.g., if you want to build GHC with the <tt>perf-llvm</tt> build flavour). Version 3.8 or later is required. See also <a href="commentary/compiler/backends/llvm/installing">the LLVM installation page</a>.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>[ libedit](http://www.thrysoee.dk/editline/)</th>
|
|
|
|
|
|
<table><tr><th><a href="http://www.thrysoee.dk/editline/"> libedit</a></th>
|
|
|
<td>
|
|
|
If libedit is installed, ghci will be built with a nice interactive line-editing interface.
|
|
|
Version 2.6.9 and later are known to work; note that the libeditline package listed on some distros is too old.
|
|
|
If a suitable version of libedit cannot be found, ghc/ghci will still build fine, just without the nice line-editing capabilities.
|
|
|
If your installation does not have libedit by default, you may either download and build it yourself from the link above, or else install your distro's relevant package (sometimes called "libedit-devel" or "libedit-dev").
|
|
|
GHC does not use libedit on Windows; instead, it uses the console's default line editor.
|
|
|
<br><br> If your installation does not have libedit by default, you may either download and build it yourself from the link above, or else install your distro's relevant package (sometimes called "libedit-devel" or "libedit-dev").
|
|
|
<br><br>GHC does not use libedit on Windows; instead, it uses the console's default line editor.
|
|
|
</td></tr></table>
|
|
|
|
|
|
<table><tr><th>[ libffi](http://sourceware.org/libffi/)</th>
|
|
|
<td>TODO Document this. I stumbled on this as a new dependency as a user, but I cannot comment further.
|
|
|
|
|
|
<table><tr><th><a href="http://sourceware.org/libffi/"> libffi</a></th>
|
|
|
<td>
|
|
|
TODO Document this. I stumbled on this as a new dependency as a user, but I cannot comment further.
|
|
|
</td></tr></table>
|
|
|
|
|
|
|
|
|
## Nofib
|
|
|
|
|
|
|
... | ... | |