【发布时间】:2013-07-19 20:31:58
【问题描述】:
我正在尝试在 Raspberry Pi 上编译 GHC 7.6.3。 Raspbian 附带的 GHC 7.4 版本不支持 ghci。 我打算打包 v 7.6.3 并使其可用。
过了很长一段时间,我在 Pi 上收到了这个错误:
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 的交叉似乎得到了很好的支持):ghc.haskell.org/trac/ghc/wiki/CrossCompilation
-
Debian 提供了GHC 7.6.3 on arm,所以你不妨看看Debian 申请的ARM 相关的Patched。
-
谢谢你们。实际上我试图暂时切换到 sid 存储库来安装 ghc,但这最终导致了依赖关系的噩梦(它坚持要升级我的 libc)。所以我决定自己编译。
-
我尝试在 Raspberry Pi 上编译 Debian sid 版本的 ghc,并遇到与您完全相同的错误。告诉你是否可以让交叉编译工作!
-
呃,前两天编译也到这一步了。我想知道7.8是否存在同样的问题?可能会尝试编译。
标签: haskell compilation raspberry-pi ghci raspbian