Skip to content

Instantly share code, notes, and snippets.

@rrnewton
Created August 21, 2013 14:32
Show Gist options
  • Save rrnewton/6295246 to your computer and use it in GitHub Desktop.
Save rrnewton/6295246 to your computer and use it in GitHub Desktop.
Bash script to bootstrap GHC development within an Ubuntu 12.04 virtual machine.
#!/bin/bash
set -e
set -x
sudo apt-get install -y git gcc make autoconf libtool zlib1g-dev libgl1-mesa-dev libglu1-mesa libglu1-mesa-dev freeglut3-dev libncurses-dev libgmp-dev
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/
sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10 /usr/lib/libgmp.so.3
sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10 /usr/lib/libgmp.so
wget http://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-x86_64-unknown-linux.tar.bz2
tar xjvf ghc-7.6.3-x86_64-unknown-linux.tar.bz2
cd ghc-7.6.3
./configure && sudo make install
cd ..
wget http://lambda.haskell.org/platform/download/2013.2.0.0/haskell-platform-2013.2.0.0.tar.gz
tar xzvf haskell-platform-2013.2.0.0.tar.gz
cd haskell-platform-2013.2.0.0
./configure && make && sudo make install
sudo chmod ugo+rX -R /usr/local
cd $HOME
git clone git://github.com/ghc/ghc ghc-working
cd ghc-working
./sync-all --testsuite -r git://github.com/ghc get
time sh validate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment