[英]Installing the haskell-platform on the Nvidia Jetson TK1 (ARM Architecture)
Running lsb_release -s -d
on the Jetson TK1 gives me Ubuntu 14.04 LTS
在lsb_release -s -d
TK1上运行lsb_release -s -d
给了我Ubuntu 14.04 LTS
So I tried sudo apt-get install haskell-platform
and sudo apt-get install ghc
and with both I get an error that it is unable to locate the package. 所以我尝试了sudo apt-get install haskell-platform
和sudo apt-get install ghc
,并且我得到了一个错误,它无法找到包。 So I enabled the universe repository as I saw on a stackoverflow post for installing the haskell-platform for ubuntu 14.04. 所以我启用了Universe存储库,就像我在stackoverflow帖子上看到的那样为ubuntu 14.04安装haskell-platform。 I still get the same result. 我仍然得到相同的结果。
I see some people mentioning the got the haskell-platform to install on raspberry pis easily and that GHC now has good support for ARM but I don't see a way to get the install running on the Jetson TK1. 我看到有些人提到了很容易在raspberry pis上安装haskell平台,GHC现在对ARM有很好的支持,但我没有办法让Jetson TK1上的安装运行。 My next option is to build from source, I don't see source for ARM architecture on the GHC or Haskell platform website. 我的下一个选择是从源代码构建,我没有在GHC或Haskell平台网站上看到ARM架构的源代码。
I know there is also cross compiling, I will start messing with that when I see there is no easier way. 我知道还有交叉编译,当我看到没有更简单的方法时,我会开始搞乱它。
I managed to compile GHC7.8.3 on the Jetson K1 and Adapteva Parallella. 我设法在Jetson K1和Adapteva Parallella上编译GHC7.8.3。 I wrote a blog post about it here which is more verbose, but here's a summarized rundown of what I did: 我在这里写了一篇关于它的博客文章,这篇文章更详细,但这里总结了我所做的事情:
sudo apt-get install ghc automake build-essential cabal-install groff
我运行了sudo apt-get install ghc automake build-essential cabal-install groff
sudo apt-get install alex happy
. 你还需要Alex和Happy, sudo apt-get install alex happy
。 I also installed them in Cabal, cabal update && cabal install alex happy 我还将它们安装在Cabal,cabal update && cabal安装alex happy sudo apt-get install llvm clang binutils
BuildFlavour = quick-llvm
. 我取消了关于quick-llvm编译BuildFlavour = quick-llvm
。 You'll also need to replace appearances of -H64m
with -H32m
您还需要将-H64m
外观替换为-H32m
perl boot
and sudo ./configure --with-clang=/usr/bin/clang --with-ar=/usr/bin/ar
perl boot
和sudo ./configure --with-clang=/usr/bin/clang --with-ar=/usr/bin/ar
https://gist.githubusercontent.com/bgamari/9399430/raw/build-ghc-arm.sh
因为存在链接器问题,请获取以下将在标准ld和gold之间切换的脚本: https://gist.githubusercontent.com/bgamari/9399430/raw/build-ghc-arm.sh
: https://gist.githubusercontent.com/bgamari/9399430/raw/build-ghc-arm.sh
chmod ugo+rx build-ghc-arm.sh sudo /build-ghc-arm.sh -j6
chmod ugo + rx build-ghc-arm.sh sudo /build-ghc-arm.sh -j6
sudo make install
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.