I can't seem to get a few Haskell packages to install on my Mac (10.6.8). I first tried Happstack and it failed and then I tried Snap.
Sometimes when I run ghci I get a segmentation fault.
Other times it works and goes like this:
GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude>
When trying to get Snap:
....
....
....
Loading package vector-0.10.0.1 ... linking ... done.
Loading package zlib-0.5.4.0 ... linking ... done.
Loading package zlib-bindings-0.1.1.3 ... linking ... done.
Loading package zlib-enum-0.2.3 ... linking ... done.
Loading package snap-core-0.9.3.1 ... linking ... done.
Loading package snap-server-0.9.3.3 ... linking ... done.
Loading package directory-tree-0.11.0 ... linking ... done.
cabal: Error: some packages failed to install:
snap-0.11.2 failed during the building phase. The exception was:
ExitFailure 11
I have seen this problem a few times but nothing really solved it for me. Any ideas?
Unfortunately, GHC 7.4 isn't supported on OS X 10.6; the download page only has an installer for 10.7, and as you can see, they mean it. I know your problem from bitter experience—I was in exactly your boat for a good long while, and I never found a solution other than upgrading Mac OS X (or, presumably, downgrading GHC, but I didn't really want to do that). A colleague of mine did manage to get 7.4.1 running on OS X 10.5, but it took nontrivial effort on her part (she had to use a different version of GMP, namely 5.0.5, and edit GHC's configure script), and I never tried to replicate it myself.
In the end, you have four options, in roughly decreasing order of simplicity: