(alpha) "stick shift" cabal install for GHC 6.12.1
bayer at cpw.math.columbia.edu
Fri Dec 18 11:51:48 EST 2009
On Dec 18, 2009, at 5:27 AM, Antoine Latter wrote:
> Do you have any more information about this failure? It seems like it
> would be easier to get zlib to work than to replicate cabal-install.
From http://www.reddit.com/r/haskell/comments/afz6n/cabalinstallpy/ :
BTW, the reason you could not get cabal-install working on your OSX 10.6 is because you did not have a fully working GHC installation and zlib (a dep of cabal-install) was the first thing to trip over this.
Since GHC-6.10.4 does not work "out of the box" on OSX 10.6 you followed some hints to modify the ghc wrapper script to pass the gcc flags -m32. The bit you missed is that you need to do the same for hsc2hs. Otherwise hsc2hs generates code that assumes you're targeting the 64bit ABI. That's why the zlib initialisation check fails, because the code calling zlib has been compiled for the wrong size of everything.
Bingo, that sounds right, it's a relief to know what happened.
There's plenty of advice on the web to just modify the ghc script itself for GHC-6.10.4 on OSX 10.6. I knew to modify more scripts, but I missed hsc2hs. I had gotten as far as figuring out that zlib itself was broken, and I had set up some "sandbox" clean development volume images for testing, when I noticed that GHC-6.12.1 was out. And that cabal-install wasn't ready yet.
More information about the Glasgow-haskell-users