首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Haskell SDL-mixer编译错误

Haskell SDL-mixer编译错误
EN

Stack Overflow用户
提问于 2013-05-19 10:12:01
回答 3查看 738关注 0票数 4

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

代码语言:javascript
复制
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。如何安装此程序包?

EN

回答 3

Stack Overflow用户

发布于 2013-08-31 01:13:52

请确保您已经安装了libsdl-mixer作为先决条件。

票数 2
EN

Stack Overflow用户

发布于 2013-09-29 21:04:31

在软件包网络上,在ubuntu 12.04上也出现了同样的症状。这是由于/usr/bin/ld是gold而不是ld.bfd造成的。对于某些包,传递--with-ld=ld.bfd显然是不够的。

解决方法:

代码语言:javascript
复制
mkdir /tmp/ld_override

ln -s /usr/bin/ld.bfd /tmp/ld_override/ld

PATH=/tmp/ld_override:$PATH cabal install ...
票数 1
EN

Stack Overflow用户

发布于 2018-09-25 08:14:31

我试过了,它对我很有效。但我不知道原因:-)

代码语言:javascript
复制
brew install sdl_mixer

然后试一试

代码语言:javascript
复制
cabal install SDL-mixer
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16630804

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档