A quick overview of my system:
- Mac OS X version 10.6.4 (Snow Leopard)
- Haskell Platform version 2010.2.0.0 which includes ghc version 6.12.3
$ cabal update
$ cabal install snap-server
After a short while compiling, cabal failed with the following message:
cabal: Error: some packages failed to install:
bytestring-mmap-0.2.1 failed during the building phase.
The exception was:
ExitFailure 1 snap-core-0.2.13 depends on bytestring-mmap-0.2.1 which failed to install.
snap-server-0.2.13.3 depends on bytestring-mmap-0.2.1 which failed to install.
Hmm...trying again to try to narrow down what the problem was:
$ cabal install snap-server
I get a bit more info:
Resolving dependencies... Configuring bytestring-mmap-0.2.1...
Preprocessing library bytestring-mmap-0.2.1...
Building bytestring-mmap-0.2.1... [1 of 3]
Compiling System.IO.Posix.MMap.Internal
(System/IO/Posix/MMap/Internal.hs, dist/build/System/IO/Posix/MMap/Internal.o )
ghc: could not execute:
/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/ghc-asm
cabal:
Error: some packages failed to install: bytestring-mmap-0.2.1 failed during the building phase.
The exception was:
ExitFailure 1 snap-core-0.2.13 depends on bytestring-mmap-0.2.1 which failed to install.
snap-server-0.2.13.3 depends on bytestring-mmap-0.2.1 which failed to install.
Ok, so the problem is around executing /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.3/ghc-asm. Looking at the contents of this file, I see that it is a perl script with the perl interpreter location set to:
#!/opt/local/bin/perl
Running:
$ which perl
I find that perl is located at /usr/bin/perl. Making the appropriate substitution and trying again, the installation was successful. Note that this problem has been documented here
Thanks!
ReplyDeleteEvery time someone includes a Perl script in a Haskell package, God kills a kitten. When someone hardcodes the location to Perl, He erupts a volcano. Then He kills a kitten.
ReplyDeleteThanks so much for documenting this.