Setting up a sandboxed installation of GHC HEAD

Austin Seipp aseipp at
Mon Mar 4 18:37:04 CET 2013

I wouldn't bother trying to build cabal with GHC HEAD if that's what
you're doing. You can just make cabal use a different GHC for
compilation, etc. If you have a built copy of GHC in some tree that
you want to test, you can actually make Cabal use it directly by just

$ cabal install -w ~/path/to/ghc/source/inplace/bin/ghc-stage2

That is, just use -w to point cabal to the stage2 executable. That
compiler has a registered in-place package directory so you can mess
around with it.

Alternatively, after doing a build, make a binary distribution:

$ make binary-dist

Then, take the ghc-7.7-*.tar.gz file, unpack it somewhere else and
install it to a prefix. I normally use ~/ghc/head-builds for this:

$ tar zxf ghc-7.7-*.tar.gz
$ cd ghc-7.7-...
$ ./configure --prefix=$HOME/ghc/head-builds
$ make install

Then do the same thing as before, and use `cabal` but point it to the
installed GHC binary:

$ cabal install -w ~/ghc/head-builds/bin/ghc

That should work.

On Mon, Mar 4, 2013 at 10:52 AM, Jan Stolarek <jan.stolarek at> wrote:
> I'm trying to set up a sandboxed installation of GHC HEAD with cabal-install and some other
> libraries. I need this to run some benchmarks on Repa library. Right now I'm having problems with
> bootstraping cabal-install. I managed to work around problems with some pakcages like HTTP that
> put upper bound on base version but I'm stuck with cabal-install itself. I modified dependency on
> unix package but now I'm getting some compilation errors. I could probably fix them but I guess
> that this is not the correct way of setting up a working GHC HEAD installation. So the question
> is how should I install cabal-install with HEAD ?
> Janek
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at


More information about the ghc-devs mailing list