Skip to content

Instantly share code, notes, and snippets.

@stephenjbarr
Created February 26, 2014 20:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenjbarr/9237286 to your computer and use it in GitHub Desktop.
Save stephenjbarr/9237286 to your computer and use it in GitHub Desktop.
sudo yum -y update
sudo yum -y install make glibc-devel gcc47
sudo yum -y install gcc47-c++
sudo yum -y install htop git
sudo yum -y install zlib-devel
sudo yum -y install freeglut-devel
##############################
## install llvm
## Reference:
## http://llvm.org/docs/GettingStarted.html#unpacking-the-llvm-archives
mkdir /media/ephemeral0/llvm
cd /media/ephemeral0/llvm
git clone http://llvm.org/git/llvm.git
cd llvm
./configure --enable-optimized
gmake -j 16
##############################
## installing libgmp
sudo yum -y install m4
cd /media/ephemeral0/
mkdir gmp
cd gmp
wget https://ftp.gnu.org/gnu/gmp/gmp-5.1.3.tar.bz2
tar -xvjf gmp-5.1.3.tar.bz2
cd gmp-5.1.3
./configure --prefix=/usr
make -j 8
sudo make install
sudo ldconfig
########################################
## installing glibc 2.15
cd /media/ephemeral0/
mkdir glibc
cd glibc
wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz
tar -xvzf glibc-2.15.tar.gz
cd glibc-2.15
mkdir glibc-build
cd glibc-build
# Create the config file, build and install
../configure --prefix='/usr'
make -j 8
sudo make install
sudo ldconfig
########################################
# install haskell 7.8.1 RC1
cd /media/ephemeral0/
mkdir hask
cd hask
wget http://www.haskell.org/ghc/dist/7.8.1-rc1/ghc-7.8.20140130-x86_64-unknown-linux.tar.bz2
bunzip2 ghc-7.8.20140130-x86_64-unknown-linux.tar.bz2
tar -xvf ghc-7.8.20140130-x86_64-unknown-linux.tar
cd ghc-7.8.20140130
./configure
sudo make install
##############################
## install cabal
cd /media/ephemeral0/hask
git clone https://github.com/haskell/cabal.git
cd cabal
cd Cabal
ghc --make Setup.hs
./Setup configure --user
./Setup build
./Setup install
## modify .bashrc
echo "export PATH=~/.cabal/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
cd /media/ephemeral0/hask/cabal/cabal-install
./bootstrap.sh # this failed on me because of a hackage outage, but
# retrying worked fine
##############################
## run cabal
cabal update
cabal install vector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment