|Version 3 (modified by macgyver, 9 years ago) (diff)|
Building on MacOS X
Getting Readline to work
Thanks to Paul R Brown for the following instructions.
Building GHC 6.6 out of the box on MacOS X will leave you with a GHCi binary that has no readline support. This is because MacOS X comes with a cut-down readline library that doesn't support all the things that GHC requires, so the GHC configure script decides not to use it.
To get readline working, you first need to install GNU readline:
cd ~/work mkdir gnu-readline cd !$ wget ftp://ftp.cwru.edu/pub/bash/readline-5.2.tar.gz tar xzvf readline-5.2.tat.gz cd readline-5.2 ./configure make && sudo make install
Now you have to tell the GHC build about readline:
cd ~/work mkdir ghc cd !$ wget http://www.haskell.org/ghc/dist/6.6/ghc-6.6-src.tar.bz2 wget http://www.haskell.org/ghc/dist/6.6/ghc-6.6-src-extralibs.tar.bz2 tar xjvf ghc-6.6-src.tar.bz2 tar xjvf ghc-6.6-src-extralibs.tar.bz2 cd ghc-6.6 ./configure --with-readline-includes=/usr/local \ --with-readline-libraries=/usr/local make -j && sudo make install
(-j tells make to spawn lots of processes building in parallel, it will probably save some time especially if you have a multi-core machine).
Building the distrbution
The following instructions are from Audrey Tang
Install the 6.4.1 bindist, download both source tarballs from http://haskell.org/ghc/download_ghc_66.html and extract both;
cd into ghc-6.6; sh configure; make; make install.
Then create mk/build.mk with one line:
then "make binary-dist", and tar the ghc-6.6/ directory produced.