Haskell SDL-mixer compilation error

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?

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

SDL/Windows, SDL_mixer is a sample multi-channel audio mixer library. All reported builds failed as of 2018-07-15 [all 1 reports] Global installation: runhaskell Setup.lhs configure runhaskell Setup.lhs build runhaskell Setup.lhs install  Install the Haskell packages: cabal install .\hsSDL2 cabal install .\hs-sdl2-image cabal install .\hsSDL2-ttf cabal install .\hs-sdl2-mixer If you get any of the messages: cabal: Missing dependency on a foreign library: * Missing (or bad) header file: SDL_mixer.h configure: error: *** SDL not found! Get SDL from www.libsdl.org.

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 ...

SDL-mixer: Binding to libSDL_mixer, Was trying to build a project to experience haskell game but it failed when trying building sdl2-image: Stack 1.7.1 Windows 10 N 64-bit It seems to sdl2-​mixer-1.1.0: configure sdl2-image-2.0.0: build sdl2-mixer-1.1.0: build  These kinds of errors seem to be caused by using an old version of cabal-install with a new version of GHC. IIRC you need at least 1.18. IIRC you need at least 1.18. This comment has been minimized.

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

brew install sdl_mixer

Then try

cabal install SDL-mixer

Windows 10 build error · Issue #9 · haskell-game/sdl2-image · GitHub, Mixer ( src/SDL/Mixer.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/SDL/​Mixer.o ) cbits/helpers.c:1:10: fatal error: 'SDL2/SDL.h' file not  Hello, I am unable to compile defendguin. I copied the sdl library, but it was missing the sdl_mixer.h file. I found the mixer source code and saved

Build error · Issue #1 · Rydgel/flappy-haskell · GitHub, SDL_mixer is a sample multi-channel audio mixer library. As of SDL_mixer 1.2.​7, FLAC, MikMod, Ogg Vorbis and MP3 loading libraries are Added support for native MIDI on Haiku * Added Android.mk to build on the Android platform Manuel Montezelo, Nikos Chantziaras 1.2.11: * Fixed initialization error and crashes  For example, you're working on a haskell file, you do C-c C-l to load that file, and compilation errors (if any) will appear in the compilation buffer. In emacs 23.*, you could hit RET on those compilation errors to jump to the appropriate file location.

SDL_mixer 2.0, Haskell SDL-mixer compilation error. I am trying to install the SDL-mixer haskell package by using "cabal install sdl-mixer". When I do so, it gives the error  InFreefall. Apparently, this user prefers to keep an air of mystery about them. 8. answers. 9. questions ~36k. people reached. 4 Haskell SDL-mixer compilation

ExitFailure 9 when trying to install ghc-mod using Cabal, I get the error: Executable named pacman not found on path: (with the PATH data If anyone's trying to build with ghc 8 and/or sdl2-image/sdl2-mixer/sdl2-ttf the  Introduction. The Haskell packages hsSDL2 and sdl2 are bindings to the C library libSDL. From Wikipedia: Simple DirectMedia Layer (SDL) is a cross-platform, free and open source software multimedia library written in C, that presents a simple interface to various platforms' graphics, sound, and input devices.

Comments
  • 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 installing, 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.
  • I got the same error as above on Linux Mint 16, and this worked for me.
  • 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.