Building
Dependencies
- Fully supported: OSX/x86, Linux/x86, Linux/x86_64, Linux/PPC, FreeBSD/x86
Partially supported: Cygwin/x86
Other platforms may take some tweaking.
- A recent version of GHC.
Compiling DDC requires at least GHC 7.4. We use a few GHC specific extensions, so it's unlikely to work with other Haskell compilers.
Depending on how you've installed GHC, you may need to install the following extra packages from Hackage. The -p option tells cabal to also install the profiled version of each package, so you can profile DDC itself.
cabal update cabal install mtl -p --reinstall cabal install parsec -p cabal install QuickCheck -p cabal install regex-base -p cabal install regex-posix -p cabal install regex-compat -p cabal install haskell-src -p cabal install buildbox -p cabal install text -p cabal install wl-pprint -p cabal install haskeline -p cabal install alex
Alternatively, if you are on a Debian or Ubuntu based distribution and want to get some of the required packages via the apt-get package management system you can do so using:
sudo apt-get install ghc6 alex libghc6-mtl-* libghc6-parsec3-* libghc6-regex-* libghc6-quickcheck2-* \ libghc6-haskell-src-* libghc-readline-* x11proto-xext-dev libx11-dev libxv-dev
You will still need to install the text and buildbox libraries via cabal because these don't have Debian packages yet.
Some distributions will need to compile Lexer without -Werror manually or install a patch. See http://trac.haskell.org/haskell-platform/ticket/171
- A recent version of GCC.
It's been tested with at least 4.0.1, 4.1.2, 4.2.1 and 4.3.1. Later versions will probably work. We compile C files with the -std=c99 option to GCC, so the code should be fairly portable. We haven't explicitly tested it with other compilers though.
- The graphical demos depend on libxv but most Linux distros, and Mac OSX already have this.
- Some distros will need llvm for the regression tests with the llvm backend.
(On Xubuntu 11.10, I needed to install llvm-2.9 and symlink llc to llc-2.9 ln -s /usr/bin/llc-2.9 /usr/bin/llc)
Building
- Build the compiler, runtime system, external libraries and base libraries.
$ make
- As above, but also build source docs and run all the regression tests.
$ make total
More useful build targets are listed at the top of the Makefile
