Haskell ghc armv7二进制+;阴谋集团非法指令

Haskell ghc armv7二进制+;阴谋集团非法指令,haskell,ghc,cabal,Haskell,Ghc,Cabal,我正在尝试使用最近发布的armv7 ghc二进制文件在raspberry pi 2上运行,可在以下位置获得: 上面说它是用debian jesse构建的,所以我在我的pi2上安装了debian jesse。我已经成功安装了ghc-至少ghci工作正常。但是没有阴谋集团,显然ghc 7.10.2需要阴谋集团1.22+。debian版本的cabal类似于1.16(还将安装GHC7.6.x)。所以我正试图用它的bootstrap.sh脚本从源代码安装cabal install。下载mtl包并构建“S

我正在尝试使用最近发布的armv7 ghc二进制文件在raspberry pi 2上运行,可在以下位置获得:

上面说它是用debian jesse构建的,所以我在我的pi2上安装了debian jesse。我已经成功安装了ghc-至少ghci工作正常。但是没有阴谋集团,显然ghc 7.10.2需要阴谋集团1.22+。debian版本的cabal类似于1.16(还将安装GHC7.6.x)。所以我正试图用它的bootstrap.sh脚本从源代码安装cabal install。下载mtl包并构建“Setup”可执行文件,然后尝试执行它。但安装程序exe失败,指令“非法”

根据下载页面,需要“黄金”链接器。我补充说

ln-s
哪个黄金
~/bin/ld

并将我的路径设置为包含~/bin。不幸的是,同样的结果

接下来,我尝试用gold(我想)重新安装ghc二进制文件。因此,根:

> ln -s `which gold` /usr/local/bin/ld
> cd ghc-7.10.2
> make install
ghc再次成功安装,但建筑阴谋集团安装的结果相同:

bburdette@jessie-rpi:~/code/cabal/cabal-install$ ./bootstrap.sh 
Using gcc for C compiler. If this is not what you want, set CC.
Using /usr/lib/gcc/arm-linux-gnueabihf/4.9/collect2 instead.
Checking installed packages for ghc-7.10.2...
deepseq is already installed and the version is ok.
binary is already installed and the version is ok.
time is already installed and the version is ok.
Cabal is already installed and the version is ok.
transformers is already installed and the version is ok.
mtl-2.2.1 will be installed from local tarball.
text-1.2.0.3 will be downloaded and installed.
parsec-3.1.7 will be downloaded and installed.
network-2.6.0.2 will be downloaded and installed.
old-locale-1.0.0.7 will be downloaded and installed.
old-time-1.1.0.3 will be downloaded and installed.
HTTP-4000.2.19 will be downloaded and installed.
zlib-0.5.4.2 will be downloaded and installed.
random-1.1 will be downloaded and installed.
stm-2.4.4 will be downloaded and installed.

Using local tarball for mtl-2.2.1.
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
Illegal instruction

Error during cabal-install bootstrap:
Configuring the mtl package failed.
有什么想法吗


我想知道符号链接是否是启用gold的正确方法?也许我需要在每个阴谋集团的项目中添加ghc选项,或者有其他方式使用黄金?或者这根本不是问题所在

好的,终于解决了这个问题。根据ghc下载页面,您应该使用debian jessie附带的llvm 3.5。但是默认的llvm版本是3.5-10,这不起作用。需要的是3.5.2-2

我下载了3.5.2-2的debs并安装了它,但它很快就变成了依赖地狱,需要安装LLVM3.5.2-2所需的5-6个libs。我切换到debian测试,安装llvm更容易。如果您使用debian实验版,可能会更容易

我使用的ghc 7.10.2包:

我在debian jessie上使用默认llvm 3.5时遇到的错误:

在我看来,编译器对于体系结构来说是坏的。但是我对在pi中运行Haskell感兴趣已经很长时间了,到目前为止,我没有你幸运。所以你可以把它拔下来。。。如果你成功了,请告诉我们。@dsign我不会说它坏了,但它是实验性的。:)一两周前,基于Debian Jessie的ARM GHC发行版被上传了。@Sibi同意了,但我的措辞很不幸。我只是希望它能被修复。我已经有了GHC7.8的香蕉圆周率和覆盆子圆周率(我想是7.6)。在香蕉皮(带拱门)上,我甚至可以编译我的yesod项目。但这似乎是个幸运的机会。pi上7.8的相同过程失败。您在pi上运行的是armv7还是armv6 Linux发行版?