(alpha) "stick shift" cabal install for GHC 6.12.1

Duncan Coutts duncan.coutts at googlemail.com
Fri Dec 18 10:57:59 EST 2009

On Thu, 2009-12-17 at 14:00 -0800, Dave Bayer wrote:

> Background: I never got "cabal install" to work on OS X 10.5 with GHC
> 6.10.4, basically because zlib wouldn't work. Odd, because a perfectly
> good version of gunzip already exists on most platforms, and the code
> doesn't fall back to this version if needed.

Do you mean OSX 10.5 or 10.6. I've never heard of major problems on 10.5
and lots of problems on 10.6. The latter are all fixable.

The issue on 10.6 was that gcc defaults to compiling 64bit, but ghc
expects 32bit. The hack for ghc-6.10.4 was to change the wrapper script
to pass -optc-m32 -optl-m32. That's enough to get ghc working, but for
other packages that bind to foreign libs you also need to apply the same
trick to hsc2hs.

That's why so many people bumped into zlib not working, it was because
their hsc2hs was thinking it should be using 64bit when everything else
was expecting 32bit. That manifested in a zlib initialisation error
(because the structure size check fails).

So in short, the problems are not with cabal or zlib, you just need a
fully working ghc installation.


More information about the Glasgow-haskell-users mailing list