wiki:Building/Preparation/Linux

Version 24 (modified by krakrjak, 7 months ago) (diff)

Updating instructions to include gotchas for building on Debian.

Setting up a Linux system for building GHC

If you're on a recent Linux system, then you should be able to get a working build environment by installing the following packages using your system's package manager.

Fedora

  • glibc-devel
  • ncurses-devel
  • gmp-devel
  • autoconf
  • automake
  • libtool
  • gcc
  • make
  • perl
  • python
  • ghc
  • happy
  • alex
  • git

For building the documentation: (User's Guide and Cabal guide):

  • docbook-utils
  • docbook-utils-pdf
  • docbook-style-xsl

other packages that are useful for development:

  • strace
  • patch

Debian, Ubuntu, and other Debian-based systems

If you are building GHC >7.6 on Debian 7.0 (wheezy) you will need to install an updated version of happy (>=1.19) which is available in sid and has not migrated to jessie as of 2013-09-25.

You can make sure you have all dependencies by

   sudo apt-get build-dep ghc6

But this might install some packages you do not use in your system (e.g. java, docbook, xsltproc). Alternatively install the following:

   sudo apt-get install haskell-platform git autoconf libtool make ncurses-dev g++

(ncurses-dev is needed by the terminfo package, and g++ is needed by a couple of tests, ghcilink003 and ghcilink006).

For building the documentation (User's Guide):

   sudo apt-get install dblatex docbook-xsl docbook-utils

other packages that are useful for development:

   sudo apt-get install linux-tools

(includes perf, see Debugging/LowLevelProfiling/Perf)