Opened 5 years ago

Closed 19 months ago

#7316 closed bug (fixed)

GHC segfaults on ARM

Reported by: laney Owned by: bgamari
Priority: normal Milestone: 8.0.1
Component: Compiler Version: 7.4.2
Keywords: Cc: bgamari, cjwatson@…, erikd
Operating System: Unknown/Multiple Architecture: arm
Type of failure: None/Unknown Test Case:
Blocked By: #3658 Blocking: #7623
Related Tickets: Differential Rev(s):
Wiki Page:


Sorry for the lack of detail. I thought I'd file this upstream. We've been seeing this in Ubuntu with 7.4.2. Some cabal packages, like chell, fail to build with a segfault in ghc.

[3 of 4] Compiling Test.Chell.Main  ( lib/Test/Chell/Main.hs, dist-ghc/build/Test/Chell/Main.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array- ... linking ... done.
Loading package deepseq- ... linking ... done.
Loading package old-locale- ... linking ... done.
Loading package time-1.4 ... linking ... done.
Loading package random- ... linking ... done.
Loading package containers- ... linking ... done.
Loading package patience-0.1.1 ... linking ... done.
Loading package bytestring- ... linking ... done.
Loading package transformers- ... linking ... done.
Loading package monads-tf- ... linking ... done.
Loading package text- ... linking ... done.
Loading package system-filepath-0.4.6 ... linking ... done.
Loading package pretty- ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package options-0.1.1 ... linking ... done.
make: *** [build-ghc-stamp] Error 11

Full build log attached. I'll try to reduce the example and/or reproduce with 7.6 soon. (I can also provide you with SSH access to hardware if you need it).

Attachments (1)

buildlog_ubuntu-quantal-armhf.haskell-chell_0.3-1build1_FAILEDTOBUILD.txt.gz (7.9 KB) - added by laney 5 years ago.
Log of chell building on Ubuntu Quantal (GHC 7.4.2)

Download all attachments as: .zip

Change History (14)

comment:1 Changed 5 years ago by laney

Summary: GHC segfaults on hardfloat ARMGHC segfaults on ARM

Changed 5 years ago by laney

Log of chell building on Ubuntu Quantal (GHC 7.4.2)

comment:2 Changed 5 years ago by simonmar

Cc: bgamari added
difficulty: Unknown
Milestone: 7.6.2
Priority: normalhigh

@bgamari smells like a problem with the ARM linker, any chance you could investigate?

comment:3 in reply to:  2 Changed 5 years ago by bgamari

Replying to simonmar:

@bgamari smells like a problem with the ARM linker, any chance you could investigate?

Of course. I've recently been having a hard time getting GHC to build on my test machine apparently due to inconsistent compiler options being used by by LLVM and GCC. Nevertheless, I'll take a look at this as soon as the compiler issue is sorted out.

comment:4 Changed 4 years ago by dterei

Blocking: 7623 added

comment:5 Changed 4 years ago by cjwatson

Cc: cjwatson@… added

I'm far from certain, but it's possible that my patch in will help with this.

comment:6 Changed 4 years ago by igloo

Blocked By: 3658 added

This should be fixed by using dynamic libraries to implement GHCi.

comment:7 Changed 4 years ago by bgamari

Owner: set to bgamari

comment:8 Changed 3 years ago by bgamari

Priority: highnormal

At this point it seems like dynamic linking works pretty well with the LLVM backend on ARM. We can keep this bug open as the bug likely still lurks in GHC's linker, but it's not nearly as critical now.

comment:9 Changed 3 years ago by thoughtpolice


Moving to 7.10.1.

comment:10 Changed 2 years ago by thoughtpolice


Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:11 Changed 21 months ago by thoughtpolice


Milestone renamed

comment:12 Changed 19 months ago by erikd

Cc: erikd added

comment:13 Changed 19 months ago by bgamari

Resolution: fixed
Status: newclosed

laney, as of 7.10.3 ARM support should be reasonable stable (with the exception of distributions using Thumb binaries) as #10375 is resolved.

Given that we don't really know what happened in this particular bug I'm going to close this. Feel free to open another ticket if you are still having trouble with 7.10.3 or later.

Note: See TracTickets for help on using tickets.