Opened 4 years ago

Closed 4 years ago

#11055 closed bug (worksforme)

GHC 7.8.4 crash on ARM while building Stack 0.1.7

Reported by: Lokathor Owned by:
Priority: normal Milestone: 7.10.3
Component: Compiler Version: 7.8.4
Keywords: Cc:
Operating System: Linux Architecture: arm
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I was attempting to get stack on a raspberry pi 2. I had made a sandbox and installed the dependencies just fine. I go to build stack itself and the following happens:

daniel@pixie stack $ cabal build
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring stack-
Building stack-
Preprocessing library stack-
[ 1 of 74] Compiling Data.Set.Monad   ( src/Data/Set/Monad.hs, dist/build/Data/Set/Monad.o )
ghc: internal error: scavenge: unimplemented/strange closure type 15028 @ 0x6dfe143c
    (GHC version 7.8.4 for arm_unknown_linux)
    Please report this as a GHC bug:

The folder is still there so I could attach files or some such if needed. I know that GHC on ARM is full of weird instruction problems that have only recently been fixed, but I wasn't sure if this was related or not.

Change History (5)

comment:1 Changed 4 years ago by bgamari

Status: newinfoneeded

Indeed there are a number of bugs in ARM support in the 7.8. As of 7.10.3 these are largely fixed. Could you try the 7.10.3 release candidate?

For the record, the testsuite summary should look something like this on 7.10.3,

OVERALL SUMMARY for test run started at Tue Nov  3 02:48:37 2015 KST
 0:46:50 spent to go through
    4463 total tests, which gave rise to
   18087 test cases, of which
   14064 were skipped

      52 had missing libraries
    3906 expected passes
      41 expected failures

       6 caused framework failures
       0 unexpected passes
      11 unexpected failures
      13 unexpected stat failures

Unexpected failures:
   cabal/sigcabal01        sigcabal01 [bad stderr] (normal)
   codeGen/should_compile  T7574 [stderr mismatch] (normal)
   driver                  T5313 [bad stderr] (normal)
   ghc-api                 T8628 [bad stderr] (normal)
   ghc-api                 T8639_api [bad stderr] (normal)
   ghc-api/T10052          T10052 [bad stderr] (normal)
   ghc-api/dynCompileExpr  dynCompileExpr [bad stderr] (normal)
   rts                     T5435_v_asm [bad stderr] (normal)
   rts                     T5435_v_gcc [bad stderr] (normal)
   rts                     linker_unload [bad stderr] (normal)
   safeHaskell/flags       Flags02 [exit code non-0] (normal)

comment:2 Changed 4 years ago by Lokathor

Is where i should try? Reddit directs me there, but the folder is blank to me. Usually there are no ARM builds to begin with.

Could a broken 7.8 like I have somehow compile 7.10.3? Or would I have to try some cross compiler thing from a different computer? I tried the official debian armhf version of 7.10.2 but it crashed on every build because of some assembally mismatch i ended up having. Raspbian itself doesnt have a version of the 7.10 line as far as I know.

I'm afraid I'm very new to this all and have never compiled ghc before.

comment:3 Changed 4 years ago by Lokathor

Alright, I guess the downloads directories are made before they're filled, and they're filled based on platform popularity as well. At the time of this writing, the 7.10.3-rc1 directory has an ARM build, the 7.10.3-rc2 does not, and the 7.10.3-rc3 directory is entirely empty.

Using 7.10.3-rc1 I was able to build stack 0.1.7, and it seems to work. I also tried out another file that would always crash GHCi (but not GHC) in version 7.8.4, and using version 7.10.3-rc1 it did not crash ghci.

I did however get a warning I've never seen before during the linking, about missing mapping symbols. I built another project just to be sure and it gave the same thing, all the messages are basically

/usr/bin/ warning: cannot scan executable section 1 of
for Cortex-A8 erratum because it has no mapping symbols.

Things *seem* to run fine despite the warning though. I'm going to use the newly built stack to rebuild stack itself, which should give it a fair shake, but it takes like a day to build all the dependencies and the binary together, so I'll get back on results from that tomorrow.

comment:4 Changed 4 years ago by Lokathor

Success. Stack was able to rebuild stack and also cabal.

I'm still not sure how to run that testsuite summary thing though.

comment:5 Changed 4 years ago by thomie

Milestone: 7.10.3
Resolution: worksforme
Status: infoneededclosed

If 7.10.3-rc1 fixed the problem for you, then we can close this ticket. Thanks for reporting and testing. Great to know that stack works on arm now.

Check #10376 for those warnings. Workaround: set library-stripping: False in ~/.cabal/config.

Check this list for open arm bugs:!closed&architecture=arm&order=id

Note: See TracTickets for help on using tickets.