For anyone who stumbles upon this, I've discovered two important things that make cabal WAY less of a pain.
First, sandboxes are built in starting with cabal-install 1.18 (you don't need cabal-dev anymore). You should upgrade with cabal install cabal-install
, and use them for everything! I create ~/.cabal/sandboxes
and put one sandbox for each build in there. Then I link finished binaries into ~/.cabal/bin
with ln
.
Second, if your distro (Debian, for example) doesn't give /tmp
execute permissions it will cause all sorts of seemingly unrelated errors. Things like configure: error: cannot run C compiled programs
. It's easy to fix with alias cabal="TMPDIR=/somewhere/with/permission cabal"
.