Skip to content

Failed to build Stack v1.1.0 on armv7 with Raspbian Jessie, GHC 7.10.3 & Cabal 1.22.8 #2096

@blitzcode

Description

@blitzcode

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions