4

I am trying to install the SDL-mixer haskell package by using "cabal install sdl-mixer". When I do so, it gives the error

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

If it makes a difference, I am on Arch Linux. How do I install this package?

InFreefall
  • 518
  • 1
  • 4
  • 16
  • 2
    The package has a `configure` script, that doesn't recognize the `--with-gcc` option. The C compiler (gcc) doesn't seem to work for the `configure` script. You can try setting the `CC` environment variable, `$ export CC="/path/to/your/gcc"` before `cabal install`ing, but if the `--with-gcc` option wasn't passed by you but automatically added by `cabal`, that's unlikely to help. You can `cabal unpack SDL-mixer`, and in its directory run `cabal install -v2` (or perhaps you need `-v3`) to get the command line `cabal` uses for `configure`. Then run it yourself and look at `config.log`. – Daniel Fischer May 19 '13 at 11:02

3 Answers3

2

make sure you have installed libsdl-mixer as a prerequisite.

Ladace
  • 53
  • 6
1

Got the same symptoms on package network, on ubuntu 12.04. It was caused by /usr/bin/ld being gold instead of ld.bfd. Passing --with-ld=ld.bfd is apparently not enough for some packages.

Workaround:

mkdir /tmp/ld_override

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

PATH=/tmp/ld_override:$PATH cabal install ...
talonmies
  • 70,661
  • 34
  • 192
  • 269
  • I'm still not quite sure what this does, but I can't thank you enough now that `cabal install cabal-install` works on my install of Ubuntu 12.04. – Zajn Oct 18 '13 at 02:02
0

I try this, and it works for me. But I donnot know the reason :-)

brew install sdl_mixer

Then try

cabal install SDL-mixer