Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cabal 1.18 gives Bus Error 10 on nearly everything on OS X

Tags:

haskell

cabal

I upgraded Cabal from the 1.16 version that came with Haskell Platform to 1.18, but nearly every command immediately dies with Bus error: 10:

$ cabal install aeson
Bus error: 10

$ cabal sandbox init
Bus error: 10

$ cabal list
Bus error: 10

(cabal help still works, though)

OS version: OS X Mavericks 10.9.1

Cabal versions:

$ cabal --version
cabal-install version 1.18.0.2
using version 1.18.1.2 of the Cabal library

GHC version:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
like image 768
MaxGabriel Avatar asked Jan 19 '14 19:01

MaxGabriel


1 Answers

I had similar problem with cabal. Installing real gcc seems to help (at least on OS X 10.8.5 Mountain Lion with Xcode 5.0.2):

brew tap homebrew/versions
brew install gcc48
# go for lunch ... or maybe movie

Then edit /Library/Frameworks/GHC.framework/Versions/7.6.3-i386/usr/lib/ghc-7.6.3/settings (as root) and put

("C compiler command", "/usr/local/bin/gcc-4.8"),

instead of /usr/bin/gcc

Then

rm -rf ~/.ghc ~/.cabal ~/Library/Haskell

As usual be careful with rm -rf but it seems necessary as cached version of Cabal-the-library lead to bus error even with gcc-4.8 (which suggests the problem may be with the Cabal library rather than cabal-install itself).

NB the fresh install of Haskell Platform alone did not work for me, either with or without various clang wrappers.

like image 82
mbenke Avatar answered Oct 19 '22 03:10

mbenke