I am trying to get up and run on raspberry pi 2 with the recently released ghc binaries for armv7 available here:
https://www.haskell.org/ghc/download_ghc_7_10_2#linux_armv7
This suggests that it was built with debian jesse, so I installed debian jesse on my pi2. I have successfully installed ghc - at least ghci works. But there is no bondage, and apparently ghc 7.10.2 requires cabal 1.22+. The debian version of cabal is something like 1.16 (and will also install ghc 7.6.x). Therefore, I am trying to install cabal-install from the source code using bootstrap.sh script. This downloads the mtl package and creates the "Setup" executable, and then tries to execute it. But exe installer does not work with "illegal instruction".
A gold linker is required according to the download page. I added that by doing
ln -s which gold ~ / bin / ld
and setting my path to include ~ / bin. Sorry, unfortunately.
Next, I tried reinstalling the ghc binaries with gold (I think). So, as root:
> ln -s `which gold` /usr/local/bin/ld > cd ghc-7.10.2 > make install
Again ghc was successfully installed, but the result for building cabal-install is the same:
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.
Any ideas?
I am wondering if symbolic links are the right way for this gold? Maybe I need to add this as a ghc option in every cabal project or use a different way to use gold? Or maybe this is not a problem?
haskell ghc cabal
Bzzt
source share