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

て烟熏妆下的殇ゞ 提交于 2020-01-14 10:14:28

问题


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

回答1:


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.



来源:https://stackoverflow.com/questions/21221465/cabal-1-18-gives-bus-error-10-on-nearly-everything-on-os-x

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!