根据this post最后有一个支持模板haskell和ghci的GHC版本的debian软件包。为什么我不能在Raspberry Pi上安装GHC 7.8.4的软件包?
这是真的,我从Raspbian的全新副本开始,我改变了我的/etc/apt/sources.list
文件:
deb http://http.debian.net/debian sid main contrib non-free
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
我做sudo apt-get update && sudo apt-get upgrade
,然后我做了sudo apt-get install ghc
和sudo apt-get install cabal-install
。
ghc --version
报告7.8.4。 GHCi工作得很好,TH也是如此。
但由于某种原因,我无法安装cabal的任何软件包。无论我选择哪一个,我得到一些版本的错误:
login as: pi
[email protected]'s password:
Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon May 11 17:17:22 2015
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.4
$ mkdir test
$ cd test
$ cabal sandbox init
Writing a default package environment file to
/home/pi/test/cabal.sandbox.config
Creating a new sandbox at /home/pi/test/.cabal-sandbox
$ cabal install array
Resolving dependencies...
Notice: installing into a sandbox located at /home/pi/test/.cabal-sandbox
Downloading array-0.5.1.0...
Configuring array-0.5.1.0...
Failed to install array-0.5.1.0
Build log (/home/pi/test/.cabal-sandbox/logs/array-0.5.1.0.log):
cabal: Error: some packages failed to install:
array-0.5.1.0 failed during the configure step. The exception was:
user error ('/usr/bin/ghc' exited with an error:
/tmp/ghc2287_0/ghc2287_6.s: Assembler messages:
/tmp/ghc2287_0/ghc2287_6.s:76:0:
Error: selected processor does not support ARM mode `movw
r7,:lower16:stg_bh_upd_frame_info'
/tmp/ghc2287_0/ghc2287_6.s:77:0:
Error: selected processor does not support ARM mode `movt
r7,:upper16:stg_bh_upd_frame_info'
/tmp/ghc2287_0/ghc2287_6.s:80:0:
Error: selected processor does not support ARM mode `movw
r7,:lower16:base_GHCziTopHandler_runMainIO_closure'
/tmp/ghc2287_0/ghc2287_6.s:81:0:
Error: selected processor does not support ARM mode `movt
r7,:upper16:base_GHCziTopHandler_runMainIO_closure'
/tmp/ghc2287_0/ghc2287_6.s:82:0:
Error: selected processor does not support ARM mode `movw
r8,:lower16:Cabalzm1zi22zi1zi1_DistributionziSimple_defaultMain_closure'
/tmp/ghc2287_0/ghc2287_6.s:83:0:
Error: selected processor does not support ARM mode `movt
r8,:upper16:Cabalzm1zi22zi1zi1_DistributionziSimple_defaultMain_closure'
)
有谁知道我出轨?
更新
运行'cabal install base-io-access',看看是否有效。我对此负责(很小,未完成,不要在真实代码中使用),但它仅依赖于'base',并且不会执行任何FFI或类似操作。它就像你可以要求的一样简单。如果它没有编译,那么它会告诉你,如果它编译了,那么它就是软件包,然后它依赖于软件包。 – bheklilr
Thanks @bheklilr,这是一个测试,我用我自己的类似包'exact-pi'运行,只依赖于基础。我刚刚尝试过你,得到了同样的结果。 (基本上,不同的临时文件名,但甚至相同的行号和字符位置。) –
在这种情况下,我不知道。我最初的猜测是试图链接到一些C代码或其他东西。也许你需要一些额外的标志GHC让它编译正确吗?我从来没有尝试在我的RPi上安装GHC,所以我在这里没有经验 – bheklilr