[Haskell-cafe] Compiling GHC on Scientific Linux V5 [http://ftp.scientificlinux.org/linux/scientific/50/iso/i386/SL-5.0-050407-i386-DVD.iso, Build on RHEL5]

Animesh Sharma sharma.animesh at gmail.com
Mon Nov 5 09:26:12 EST 2007

For a long time I wanted to go 'strictly functional' and what better way
then to start with the beast, ghc. So about a couple of months back, I
downloaded version 6.6.1 [
and started reading YAHT [
http://darcs.haskell.org/yaht/yaht.pdf ]. Then the 'laziness' took over and
my 'idea of being strictly functional' took a back-seat. The news of release
of ghc Version 6.8.1 (3 November 2007) reignited the desire. This time I
thought of compiling the ghc from source [ Main -
, Extra Libs -
http://www.haskell.org/ghc/dist/6.8.1/ghc-6.8.1-src-extralibs.tar.bz2 ].
Make sure you have 4-5 hours and 1-1.5 GB of disc space!
Become 'root' and extract the above two files:
tar xvjf ghc-6.8.1-src.tar.bz2
tar xvjf ghc-6.8.1-src-extralibs.tar.bz2
Both of them will extract in the directory ./ghc-6.8.1.
For compiling there are some dependencies to be taken care of:
1. ghc [I already had v 6.6.1,
, it is interesting as the compilers compiles its next version [
http://en.wikipedia.org/wiki/Bootstrapping_(compilers) ]:
rpm -ivhf ghc661-6.6.1-2.el5.i386.rpm
2. cabal, Common Architecture for Building Applications and Libraries, which
can be downloaded from
http://www.haskell.org/cabal/release/rc/cabal- and
installation instructions need to be followed [
http://haskell.org/haskellwiki/Cabal/How_to_install_a_Cabal_package ]:
tar xzf cabal-
cd cabal-1.2.2
runhaskell Setup.hs configure
runhaskell Setup.hs build
runhaskell Setup.hs install
3. readline-devel, readline library which in turn has terminfo as
dependence, so better to use yum for installation:
yum install readline-devel
4. alex, A lexical analyser generator for Haskell, whose rpm can be
downloaded from
http://www.haskell.org/alex/dist/2.1.0/RH9/alex-2.1.0-1.i386.rpm and
installed easily:
rpm -ivhf alex-2.1.0-1.i386.rpm
5. happy, the yacc of haskell [I read on http://tritium.livejournal.com/ to
compile happy you need old version of happy]. But for me simply getting the
source http://www.haskell.org/happy/dist/1.17/happy-1.17.tar.gz and
installation worked fine:
tar xvzf happy-1.17-html.tar.gz
cd happy-1.17
runhaskell Setup.hs configure
runhaskell Setup.hs build
runhaskell Setup.hs install

We are all set for the ghc compilation:
cd ghc-6.8.1
make install

Clean up ~300MB from the older ghc (v 6.6.1) installation, I went the brute
force way:
find /usr -name ghc-6.6.1 > <list>
rm -rf <list>

Now I have to dig deeper into the release note
), one thing which has really got me interested is the introduction of
debugger to GHCi. Any tutorials on how to go about it?



---------The Answer lies in the Genome------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071105/54b53abe/attachment.htm

More information about the Haskell-Cafe mailing list