-
Notifications
You must be signed in to change notification settings - Fork 847
Description
I'm trying to build stack on an RPi 3 and I got this error:
Building stack-1.1.0...
Preprocessing library stack-1.1.0...
[53 of 86] Compiling Stack.Constants ( src/Stack/Constants.hs, dist/build/Stack/Constants.o )
src/Stack/Constants.hs:291:7:
cannot find normal object file `dist/build/Stack/Types/PackageName.dyn_o'
while linking an interpreted expression
From what I understand, this is because TH needs to load some of stack's modules dynamically to run. If I build with --ghc-options=-dynamic-too, at least this error disappears. Later the linking step fails with thousands of errors like this:
/usr/bin/ld.gold: warning: cannot scan executable section 1 of /home/pi/.cabal/lib/arm-linux-ghc-7.10.3/filelock-0.1.0.1-0GuYZFry5kL0ASYgccAvYE/libHSfilelock-0.1.0.1-0GuYZFry5kL0ASYgccAvYE.a(Flock.o) for Cortex-A8 erratum because it has no mapping symbols.
But I guess at least that is a GHC bug.
I don't know if this is an issue with GHC, Cabal or the way stack's project is setup. I was able to compile all of stack's dependencies (a fairly significant and representative amount of code), so I assume the GHC/Cabal here on armv7 is not fundamentally broken.
Googling for this error leads to a lot of bug reports and discussions, and it's hard for me to figure out who's at fault there. I'd really appreciate a permanent fix for this, or an explanation that would allow me to file a bug report with the appropriate culprit.
Any help with getting stack compiled & build on ARM would be much appreciated.