Skip to content

Instantly share code, notes, and snippets.

@timjb
Forked from binarybana/ghc-install-ubuntu-src.sh
Created February 4, 2012 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timjb/1737531 to your computer and use it in GitHub Desktop.
Save timjb/1737531 to your computer and use it in GitHub Desktop.
How to install GHC 7.4.1 in Ubuntu from source
#Install prerequisites
sudo aptitude install ghc darcs
#Get GHC 7.4.1 source and cabal-install HEAD
wget http://www.haskell.org/ghc/dist/7.4.1/ghc-7.4.1-src.tar.bz2
darcs get --lazy http://darcs.haskell.org/cabal/
tar xjf ghc-7.4.1-src.tar.bz2
cd ghc-7.4.1
./configure --prefix=$HOME/src/ghc
time make -j9 #Only took me about 19 minutes on recent quad core xeon
make install
echo "export PATH=`pwd`/bin:$HOME/.cabal/bin:$PATH" >> ~/.bashrc
#my bashfu might be off here, but you get the idea
. ~/.bashrc
mv ~/.cabal ~/.cabalold
cd ../cabal/cabal-install
chmod +x bootstrap.sh
./bootstrap.sh
cabal update
#Edit ~/.cabal/config to set library profiling to True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment