I am trying to cross-compile cabal-install
for ARM. It has come down to installing the prerequisite packages one-by-one. I was able to configure, build and install some of the packages by following this page:
How do I install dependencies when cross compiling haskell code?
Until I got to the network
package where I got this error after ./Setup build
:
Setup: The program hsc2hs is required but it could not be found
After this I added the
--with-hsc2hs=arm-unknown-linux-gnueabihf-hsc2hs
switch to my configure, but this time I ran into
/opt/ghc-cross-7.8.3/bin/arm-unknown-linux-gnueabihf-hsc2hs: line 29: /opt/ghc-cross-7.8.3/lib/arm-unknown-linux-gnueabihf-ghc-7.8.3/bin/hsc2hs: cannot execute binary file: Exec format error
Apparently my arm-unknown-linux-gnueabihf-hsc2hs
tool is not running on my host. Why is this happening? And why, for instance, arm-unknown-linux-gnueabihf-ghc
is working but not hsc2hs
? And lastly, is there workaround for installing my original network
package?