我想在Raspberry Pi上編譯GHC 7.6.3。 Raspbian附帶的7.4版GHC不支持ghci。 我打算打包v 7.6.3並使其可用。在Raspberry Pi上編譯Haskell
一個looong時間後,我得到淠此錯誤:
HC [stage 0] utils/hp2ps/dist/build/Key.o
HC [stage 0] utils/hp2ps/dist/build/PsFile.o
HC [stage 0] utils/hp2ps/dist/build/Shade.o
HC [stage 0] utils/hp2ps/dist/build/Utilities.o
"inplace/bin/mkdirhier" utils/hp2ps/dist/build/tmp//.
HC [stage 0] utils/hp2ps/dist/build/tmp/hp2ps
Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main.
Call hs_init_ghc() from your main() function to set these options.
"cp" -p utils/hp2ps/dist/build/tmp/hp2ps inplace/bin/hp2ps
cp driver/ghc-usage.txt inplace/lib/ghc-usage.txt
cp driver/ghci-usage.txt inplace/lib/ghci-usage.txt
HC [stage 0] utils/genapply/dist/build/GenApply.o
"inplace/bin/mkdirhier" utils/genapply/dist/build/tmp//.
HC [stage 0] utils/genapply/dist/build/tmp/genapply
"cp" -p utils/genapply/dist/build/tmp/genapply inplace/bin/genapply
HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/Types.o
Stack dump:
0. Program arguments: /usr/bin/llc -O3 -relocation-model=static /tmp/ghc467_0/ghc467_0.bc -o /tmp/ghc467_0/ghc467_0.lm_s --enable-tbaa=true
1. Running pass 'Function Pass Manager' on module '/tmp/ghc467_0/ghc467_0.bc'.
2. Running pass 'ARM Instruction Selection' on function '@ghczmprim_GHCziTypes_Dzh_info'
/tmp/ghc467_0/ghc467_0.lm_s: openBinaryFile: does not exist (No such file or directory)
make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Types.o] Error 1
make: *** [all] Error 2
real 308m59.437s
user 292m8.320s
sys 10m18.220s
任何想法是怎麼回事?
我該如何結束由構建系統產生的缺失中間文件?
看起來像構建工具鏈中某處的錯誤。也許最好在x86系統上嘗試一個交叉編譯器。交叉編譯器是一個薄弱的環節(很可能會暴露一些錯誤),但至少其他工具都經過了很好的測試。看到這裏的指示(從x86 Linux到Raspberry Linux的交叉似乎得到很好的支持):http://ghc.haskell.org/trac/ghc/wiki/CrossCompilation –
Debian提供[GHC 7.6.3 on arm](http ://packages.debian.org/sid/ghc),因此您可能想查看與ARM相關的[Patched](http://patch-tracker.debian.org/package/ghc/7.6.3-3 )由Debian應用。 –
謝謝你們。其實我試圖暫時切換到sid存儲庫來安裝ghc,但這最終導致了一個依賴關係的噩夢(它堅持要升級我的libc)。所以我決定自己編譯它。 –