Haskell SDL-mixer编译错误



我正在尝试使用"cabal install SDL-mixer "来安装SDL-mixer haskell包。当我这样做时,它给出错误

Resolving dependencies...
[1 of 1] Compiling Main             ( /tmp/SDL-mixer-0.6.1-10381/SDL-mixer-0.6.1/Setup.lhs, /tmp/SDL-mixer-0.6.1-10381/SDL-mixer-0.6.1/dist/setup/Main.o )
Linking /tmp/SDL-mixer-0.6.1-10381/SDL-mixer-0.6.1/dist/setup/setup ...
Configuring SDL-mixer-0.6.1...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for sdl-config... /usr/bin/sdl-config
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/SDL-mixer-0.6.1-10381/SDL-mixer-0.6.1':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Failed to install SDL-mixer-0.6.1
cabal: Error: some packages failed to install:
SDL-mixer-0.6.1 failed during the configure step. The exception was:
ExitFailure 77

如果有区别的话,我用的是Arch Linux。我如何安装这个包?

确保您已经安装了libsdl-mixer。

在ubuntu 12.04的软件包网络上出现相同的症状。这是因为/usr/bin/ld是gold而不是ld.bfd。通过——with-ld = ld。对于某些包来说,BFD显然是不够的。

处理:

mkdir /tmp/ld_override
ln -s /usr/bin/ld.bfd /tmp/ld_override/ld
PATH=/tmp/ld_override:$PATH cabal install ...

我尝试了一下,它对我有效。但我不知道原因:-)

brew install sdl_mixer

然后试着

cabal install SDL-mixer

相关内容

最新更新