happstack-util build failure on OS X

October 22, 2010 - happstack haskell hive-memory os-x

Attempting to cabal install happstack on OS X resulted in numerous errors, including:

ghc: could not execute: /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/ghc-asm

There’s a bug with the Haskell platform installer for OS X — the shebang line in the file /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/ghc-asm is incorrect (it's pointing at the MacPorts location for perl, rather than system perl).

Open the file in your text editor of choice and change the first line from

#!/opt/local/bin/perl

to

#!/usr/local/bin