WebFaction
Community site: login faq

I create a community post, based on my experience and the post already created -1- here on QA.

Anyone can complete !

GHC

I update with a recent step which work on my account to compile latest version of GHC :

You need to install in order 7.6.1(binary), then 7.10.2 (source). You can find other tar.gz in this directory, choose 64 bits archive if necessary :

wget http://haskell.org/ghc/dist/

Now the compilation, you need first the libgmp.so.3 :

wget https://gmplib.org/download/gmp/gmp-4.3.2.tar.bz2
tar xvf gmp-4.3.2.tar.bz2
cd gmp-4.3.2
./configure --prefix=$HOME
make 
make check
make install

Add this to .bashrc :

export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH

Then, you can install the ghc binary :

wget https://www.haskell.org/ghc/dist/7.6.1/ghc-7.6.1-x86_64-unknown-linux.tar.bz2
tar xvf ghc-7.6.1-x86_64-unknown-linux.tar.bz2
cd ghc-7.6.1
./configure --prefix=$HOME/ghc761
make install

At each step you need also to change the PATH for GHC, and source your .bashrc to take in account the new $GHCFOLDER path. Here $GHCFOLDER = $HOME/ghc761

PATH=$HOME/$GHCFOLDER/bin:$PATH

Now the install. When you ./configure a new version of GHC source to compile (here the 7.10.2), you indicate the PATH to your new $GHCFOLDER. Here $GHCFOLDER = $HOME/ghc

wget http://downloads.haskell.org/~ghc/7.10.2/ghc-7.10.2-src.tar.bz2
tar xvf ghc-7.10.2-src.tar.bz2
cd ghc-7.10.2
./configure --prefix=$HOME/ghc
make
make install

When i have error during compilation of GHC, i make in /src directory of GHC folder i want to compile :

make maintener-clean
perl boot
make install

When it's done, change your old $GHCFOLDER path to the new in your .bashrc, so $GHCFOLDER = $HOME/ghc

You're ready for cabal installation.

CABAL :

Based on this post :

Get source for Cabal here, extract, and run :

 chmod +x bootstrap.sh
./bootstrap.sh

Launch .cabal/bin/cabal update which create a config file in .cabal/, add this line into this file :

add symlink-bindir: /home/yourhome/bin

then mv .cabal/bin/cabal to /bin/ (in your home folder)

Note :

For /tmp directory error when you install package with cabal install, you create an alias :

alias cabal="TMPDIR=/your/path/for/temp/directory cabal"

For error linked to C lib which don't exist on webfaction. You need to compile source using the good prefix for ./configure --prefix=$HOME

After that, you inform cabal of the existence of lib and include with :

  • export PKG_CONFIG_PATH=/home/yourname/lib/pkgconfig
  • using this arguments with cabal install : --extra-lib-dirs=/home/youraccount/lib/ and --extra-include-dirs=/home/youraccount/include

You can also read this page on webfaction help.

-- WITH STACK (easy way !) --

You can find the correct version of stack for linux 64 here

Extract and copy stack binary to your $HOME/bin folder.

Inform stack of lib and tmp path with

alias stack="TMPDIR=/your/path/for/temp/directory stack" export PKG_CONFIG_PATH=/home/yourname/lib/pkgconfig

Install GHC with stack setup

You're ready to stack install :)

This question is marked "community wiki".

asked 06 Nov '15, 19:02

reyman64
131716
accept rate: 25%

edited 12 Mar '16, 17:26

Updated with less step during compilation

(18 Nov '15, 11:52) reyman64

Update with stack easy way !

(22 Jan '16, 17:24) reyman64

The question is the answer :)

permanent link

answered 06 Nov '15, 22:16

seanf
12.2k42136
accept rate: 37%

I have many problem to compile in one time these different program on webfaction, because of the huge memory taken by GHC. Webfaction admin kill regulary the process. Is there a way to limit the memory, i prefer a compilation in one time with less memory :)

(18 Nov '15, 11:01) reyman64
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×7
×3

question asked: 06 Nov '15, 19:02

question was seen: 2,238 times

last updated: 12 Mar '16, 17:26

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM