我不明白以下错误消息,但我知道我在Linux上安装了utf8-light之前没有问题。有人可以解释什么是错的吗?这是LLVM问题,GHC 7问题还是utf8-light问题?
$ cabal install utf8-light
Resolving dependencies...
Configuring utf8-light-0.4...
Preprocessing library utf8-light-0.4...
Building utf8-light-0.4...
[1 of 1] Compiling Codec.Binary.UTF8.Light ( src/Codec/Binary/UTF8/Light.hs, dist/build/Codec/Binary/UTF8/Light.o )
SpecConstr
Function `$j_s2oG{v} [lid]'
has five call patterns, but the limit is 3
Use -fspec-constr-count=n to set the bound
Use -dppr-debug to see specialisations
In file included from /usr/local/Cellar/ghc/7.0.3/lib/ghc-7.0.3/include/Stg.h:230,
from /var/folders/1+/1+3Ih2g9EriMfl8UHRtdQU+++TM/-Tmp-/ghc39083_0/ghc39083_0.hc:3:0:
/usr/local/Cellar/ghc/7.0.3/lib/ghc-7.0.3/include/stg/Regs.h:177:0:
sorry, unimplemented: LLVM cannot handle register variable ‘R1’, report a bug
cabal: Error: some packages failed to install:
utf8-light-0.4 failed during the building phase. The exception was:
ExitFailure 1
答案 0 :(得分:2)
由于这是Mac上LLVM的问题,您有几个选择:
E.g。
$ cabal install utf8-string --ghc-options=-fasm
应该强制使用本机codegen。
答案 1 :(得分:1)
这不是那么有用,但谷歌搜索问题带我到this bug report。看起来这是一个LLVM问题,与Haskell无关。也就是说,我真的不知道我在说什么,我不知道如何解决它。对不起,我无能为力。
答案 2 :(得分:0)
llvm-gcc和llvm不支持全局寄存器固定变量。因此,唯一的解决方案是重写代码而不使用它们。局部变量很好,因为可以自动将对它们的访问重写为内联asm。