Skip to content

Instantly share code, notes, and snippets.

@binarybana
Created February 4, 2012 05:05
Show Gist options
  • Save binarybana/1735487 to your computer and use it in GitHub Desktop.
Save binarybana/1735487 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 zlib1g-dev libncurses5-dev
#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
export EXTRA_CONFIGURE_OPTS="-p"
./bootstrap
cabal update
#Edit ~/.cabal/config to set library profiling to True
#Test everything up until now
ghc --version
cabal --version
#to pull your own 'haskell platform' try the following
cabal install haskell-src html mtl parallel parsec \
regex-base regex-compat regex-posix stm syb text \
transformers vector --solver=modular
#I had to leave out GLUT, OpenGL, fgl, QuickCheck, and cgi
#to overcome some MonadCatchIO based dependency errors
@binarybana
Copy link
Author

In order to get Pandoc and some of the other stuff I need try this

cabal install vector-strategies vector-fftw fgl graphviz
# In the future instead of the below I think I'll be able to do...
# cd ~/src
# cabal unpack pandoc-types
# cd pandoc-types
# Here I had to edit Text/Pandoc/Builder.hs to hide ((<>)) from Data.Monoid
cabal install pandoc Graphalyze

@binarybana
Copy link
Author

Also I need to email the maintainers of Graphalyze and gnuplot about the changes I had to make to get it to compile with GHC 7.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment