Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

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?

share|improve this question
    
Is it actually dependent on itself or is this a bug in the PKGBUILD? –  Alex Chamberlain Oct 19 '12 at 20:51
    
@AlexChamberlain The GHC is written in Haskell. So you would need a haskell compiler(Eg: GHC) to compile GHC. –  ArchHaskeller Oct 19 '12 at 20:57
add comment

2 Answers 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.

share|improve this answer
add comment

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.

share|improve this answer
    
@Haskeller Which version of Arch are you using? This answer is for the old soft float version. –  Alex Chamberlain Oct 21 '12 at 10:41
    
It looks like bootstrapping GHC from an older version would have severe difficulties on a 256 MB machine. This could be achieved with patience and a big swap file on a USB HD. Given the OP's user name, I suspect they want to run the latest and greatest Haskell, and the v6.something on Arch won't cut it. –  scruss Oct 21 '12 at 18:02
    
@AlexChamberlain I am using the hard float version. Is it able run on the hard float compiled userspace? –  ArchHaskeller Oct 21 '12 at 18:14
    
@Haskeller No... raspberrypi.stackexchange.com/q/1209/86 –  Alex Chamberlain Oct 21 '12 at 18:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.