Haskell SDL-mixer compilation error - haskell

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.

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

I try this, and it works for me. But I donnot know the reason :-)
brew install sdl_mixer
Then try
cabal install SDL-mixer

Related

Cabal couldnt figure out LLVM verison.

I am trying to install the repa-v4l2 package and I get an error I dont know how to fix:
kyle#Kyles-Comp:~$ sudo cabal install repa-v4l2
[sudo] password for kyle:
Resolving dependencies...
Configuring repa-v4l2-0.2.0.0...
Building repa-v4l2-0.2.0.0...
Preprocessing library repa-v4l2-0.2.0.0...
[1 of 2] Compiling Graphics.Webcam.Linux.Internal( src/Graphics/Webcam/Linux/Internal.hs, dist/build/Graphics/Webcam/Linux/Internal.o )
<no location info>:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM
ghc: could not execute: opt
Failed to install repa-v4l2-0.2.0.0
cabal: Error: some packages failed to install:
repa-v4l2-0.2.0.0 failed during the building phase. The exception was:
ExitFailure 1
How do you help LLVM figure out the verison?

Error installing cuda module in Mac OS X 10.7.5 (checking whether the C compiler works… no)

I'm trying to install cuda package with cabal on Mac OS X 10.7.5.
The haskell was installed with haskell platform 64bit mac version. ghc version is 7.6.3, gcc version is 4.2.
>> cabal install cuda
Resolving dependencies...
[1 of 1] Compiling Main ( /var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1/Setup.hs, /var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1/dist/setup/Main.o )
Linking /var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1/dist/setup/setup ...
Configuring cuda-0.5.1.1...
checking for gcc... cc -arch i386 /usr/bin/gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
Failed to install cuda-0.5.1.1
cabal: Error: some packages failed to install:
cuda-0.5.1.1 failed during the configure step. The exception was:
ExitFailure 77
It seems like that 32bit architecture of gcc is invoked when I installed 64 bit version of haskell.
What might be wrong?
I could use Install CUDA for Haskell using Autoconf on Win7 to solve the issue with Mac OS X.
Remove previous versions - sudo uninstall-hs all --remove
Install cuda sdk from https://developer.nvidia.com/cuda-downloads?sid=407404
download haskell cuda source http://hackage.haskell.org/package/cuda
Open Setup.hs
At line 56, modify the code to use clang - [("CC", "/usr/bin/clang")
Or you can setup any c/c++ compiler "/opt/local/bin/gcc-mp-4.8".
Then run the runhaskell:
> cabal install
Or, you can execute these three commands:
>runhaskell Setup.hs configure
>runhaskell Setup.hs build
>runhaskell Setup.hs install

Cabal Cabal-Install not working, strange error

I need to install Yesod and dependancies trough Cabal, unfortunately I'm not able to update cabal. Shell output:
...$ sudo cabal install cabal-install
Resolving dependencies...
Configuring cabal-install-1.18.0.2...
/tmp/24453.c:1:12:
warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
^
1 warning generated.
Building cabal-install-1.18.0.2...
Preprocessing executable 'cabal' for cabal-install-1.18.0.2...
<command line>: cannot satisfy -package-id HTTP-4000.2.8-cdf033f9d7051824f52cd5101df67509
(use -v for more information)
Failed to install cabal-install-1.18.0.2
cabal: Error: some packages failed to install:
cabal-install-1.18.0.2 failed during the building phase. The exception was:
ExitFailure 1
Anyone knows how to fix it? Nothing really makes sense to me.
The solution can be found here: Installing & Building GHC with OSX Mavericks GHC
The commandline tools from apple are required!
Thanks!

Cabal fails to install Idris language on OSX Lion

I'm trying to install the Idris language in an OSX Lion using the installation guide provided on the official tutorial. I have alraedy installed GMP. This is the error I get:
$ cabal install idris
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
[1 of 1] Compiling Main ( /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/Setup.hs, /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/Main.o )
Linking /var/folders/f0/dlx6tl5x18z4k4_vq0fkqtb80000gn/T/llvm-general-3.3.5.0-61662/llvm-general-3.3.5.0/dist/setup/setup ...
setup: The program llvm-config version ==3.3.* is required but it could not be
found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on llvm-general-3.3.5.0 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
llvm-general-3.3.5.0 failed during the configure step. The exception was:
ExitFailure 1
Trying to install Idris without LLVM produces this error:
$ cabal install idris -f-LLVM
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
cabal: Error: some packages failed to install:
idris-0.9.9 depends on libffi-0.1 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
I was having this same problem on OSX Mavericks. To get Idris to compile, I used homebrew to install gmp, then I had to do 'export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig', and then 'cabal install idris -f-LLVM'. I got the tip to export the PKG_CONFIG_PATH variable from this site:
https://groups.google.com/d/msg/idris-lang/gxcdvRIA2OI/NqKSd4zHkI4J
Mavericks already had libffi installed, and I didn't want to install a second copy from source, which is what the PKG_CONFIG_PATH trick helped me avoid. Do 'brew info libffi' to find the correct path to export. Hopefully someone will create a homebrew formula for Idris soon...
The first error indicates you should install the LLVM development packages of your distribution (not through cabal) and the second indicates you should install the development package for the GCC libffi library. What Linux distribution are you using? Or are you on Windows/Mac?

GHC: double-conversion-0.2.0.1 unknown symbol

I'm trying to use the latest release of EclipseFP. Upon start, the scion-browser setup initializes, with everything going well until trying to install scion-browser-0.1. I get the following error in my Eclipse console:
...
Loading package double-conversion-0.2.0.1 ... linking ... ghc: /home/dpm/.cabal/lib/double-conversion-0.2.0.1/ghc-7.0.3/HSdouble-conversion-0.2.0.1.o: unknown symbol `_ZNK17double_conversion6Double5valueEv'
ghc: unable to load package `double-conversion-0.2.0.1'
cabal: Error: some packages failed to install:
scion-browser-0.1 failed during the building phase. The exception was:
ExitFailure 1
Apparently, ghc-pkg seems to think everything is OK with this package (ghc-pkg check prints nothing). Reinstalling double-conversion through cabal also changes nothing. Anybody any idea what's going on? I'm on Ubuntu 9.10 Linux, GHC 7.0.3 from the Haskell-Platform.
As indicated here :
close your eclipse and run this in your terminal:
cabal install blaze-textual --user -fnative --reinstall
cabal install aeson --user --reinstall
then, restart your eclipse.

Resources