1

I am using Arch Linux Arm hard float and there isn't any binary packages for GHC available for armv6. How would you cross compile GHC for the Raspberry Pi so that I can compile Haskell code? Is the .deb package compatible with the Arch Linux ARM userspace? How would I install GHC from there?

ArchHaskeller
  • 1,435
  • 12
  • 35

2 Answers2

2

This is known as a bootstrap problem and is often encountered when cross compiling scripting languages. For example, Python has (or had) similar problems. It's one of the trickiest (and most annoying) issues you'll face when doing embedded work.

There's some info here: http://hackage.haskell.org/trac/ghc/wiki/CrossCompilation

I know it's bad form to just post links on Stack Exchange but since I have zero Haskell experience that's the best I can do.

Alistair Buxton
  • 804
  • 7
  • 17
0

You won't be able to install debian .deb files on Arch as it uses pacman to manage packages instead of aptitude. You can just pacman -S ghc to install the precompiled binary for armv5 (it's in extra/), so there's no need to cross-compile it. Of course if you wanted to specifically use a version compiled for armv6, you would have to install the armv5 one first to be able to compile another version.

Munkeh
  • 681
  • 4
  • 9