简体   繁体   English

在Nvidia Jetson TK1上安装haskell平台(ARM架构)

[英]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-platformsudo 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: 在这里写了一篇关于它博客文章,这篇文章更详细,但这里总结了我所做的事情:

  1. You will need GHC7.6.3 or earlier to bootstrap the compilation. 您需要GHC7.6.3或更早版本来引导编译。 I ran sudo apt-get install ghc automake build-essential cabal-install groff 我运行了sudo apt-get install ghc automake build-essential cabal-install groff
  2. You'll also need Alex and Happy, 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
  3. I decided to compile with llvm, clang and gold linker, because gcc wouldn't compile all the way. 我决定用llvm,clang和gold链接器编译,因为gcc不会一直编译。 sudo apt-get install llvm clang binutils
  4. Edit mk/build.mk. 编辑mk / build.mk。 I uncommented the line about quick-llvm compilation BuildFlavour = quick-llvm . 我取消了关于quick-llvm编译BuildFlavour = quick-llvm You'll also need to replace appearances of -H64m with -H32m 您还需要将-H64m外观替换为-H32m
  5. perl boot and sudo ./configure --with-clang=/usr/bin/clang --with-ar=/usr/bin/ar perl bootsudo ./configure --with-clang=/usr/bin/clang --with-ar=/usr/bin/ar
  6. Because there is a linker issue, obtain the following script that will switch between standard ld and gold: https://gist.githubusercontent.com/bgamari/9399430/raw/build-ghc-arm.sh 因为存在链接器问题,请获取以下将在标准ld和gold之间切换的脚本: https://gist.githubusercontent.com/bgamari/9399430/raw/build-ghc-arm.shhttps://gist.githubusercontent.com/bgamari/9399430/raw/build-ghc-arm.sh
  7. 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

  8. sudo make install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM