我正在尝试在Mac OS X 10.7.5上安装带有cabal的cuda软件包。 haskell安装了haskell平台64bit mac版本。 ghc版本是7.6.3,gcc版本是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
当我安装64位版本的haskell时,似乎调用了gcc的32位架构。
可能出现什么问题?
答案 0 :(得分:0)
我可以使用Install CUDA for Haskell using Autoconf on Win7来解决Mac OS X的问题。
sudo uninstall-hs all --remove
Setup.hs
[("CC", "/usr/bin/clang")
或者你可以设置任何c / c ++编译器“/opt/local/bin/gcc-mp-4.8”。然后运行runhaskell:
> cabal install
或者,您可以执行以下三个命令:
>runhaskell Setup.hs configure
>runhaskell Setup.hs build
>runhaskell Setup.hs install