根據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