Opened 6 years ago

Closed 5 years ago

#8768 closed bug (fixed)

Internal compiler error on haskell-src-exts 1.14.01 (profiling)

Reported by: MagnusTherning Owned by:
Priority: normal Milestone: 7.8.3
Component: Compiler Version: 7.8.1-rc2
Keywords: Cc: gregmainland@…, idhameed@…
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

I'm configuring and building haskell-src-exts like this:

runhaskell Setup configure -O -p  --enable-shared \
        -fbase4
runhaskell Setup build

It builds the ordinary bits just fine, but when it gets to compiling for profiling:

[ 1 of 22] Compiling Language.Haskell.Exts.Annotated.Syntax ( src/Language/Haskell/Exts/Annotated/Syntax.hs, dist/build/Language/Haskell/Exts/Annotated/Syntax.p_o )

/tmp/ghc340_0/ghc340_8.s:1:0:
     internal compiler error: Segmentation fault
     .section .rodata
     ^
Please submit a full bug report,
with preprocessed source if appropriate.

Change History (16)

comment:1 Changed 6 years ago by thoughtpolice

What GCC and binutils (or associated compiler/assembler tools) are you using exactly?

The thing is, this is actually a bug in GNU as or GCC it seems, as the choke happens when compiling the resulting profiled assembly code created by GHC - GHC has already done its job. There may be a possible way to work around this, but I'll need to know exactly what system you're on first to be sure I can reproduce it.

comment:2 in reply to:  1 Changed 6 years ago by MagnusTherning

Replying to thoughtpolice:

What GCC and binutils (or associated compiler/assembler tools) are you using exactly?

The thing is, this is actually a bug in GNU as or GCC it seems, as the choke happens when compiling the resulting profiled assembly code created by GHC - GHC has already done its job. There may be a possible way to work around this, but I'll need to know exactly what system you're on first to be sure I can reproduce it.

It's an up-to-date ArchLinux system:

# pacman -Q binutils gcc
binutils 2.24-2
gcc 4.8.2-8

Let me know if there is more information you need from me.

comment:3 Changed 6 years ago by dmbergey

I'm encountering the same error. I'm running debian sid.

  • ghc-7.8.1-rc2
  • gcc-4.8.2-2
  • binutils 2.24-3

Let me know if there's anything else I can do to help diagnose this.

comment:4 Changed 6 years ago by dmbergey

Version: 7.8.1-rc17.8.1-rc2

comment:5 Changed 6 years ago by octoploid

See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60436 Adding "-nostdinc" to the gcc invocation is a workaround.

comment:6 Changed 6 years ago by volodya

It is still producing the same error. I'm trying to compile the package with the flag as follows:

cabal build --gcc-options=-nostdinc

and as follows:

runhaskell Setup.hs build --gcc-options=-nostdinc

What have I missed?

Debian testing ghc 7.8.20140228-1 gcc 4.8.2-2 biinutils 2.24-4

comment:7 Changed 5 years ago by ghorn

Cc: gregmainland@… added

comment:8 Changed 5 years ago by thoughtpolice

Milestone: 7.8.3

I believe this should now be fixed by 396648eebaa1144d4d1f5326db716e8130f73732 - furthermore, this commit has been merged into the 7.8 branch. Can anyone test this please? I have not been able to reproduce it.

comment:9 Changed 5 years ago by thoughtpolice

Status: newinfoneeded

comment:10 Changed 5 years ago by MagnusTherning

I thought I'd make an attempt at verifying this just now, but got stuck already on getting all the sources. First I was told that I had an old time and should run rm libraries/time, which I did. Then I ran into the next issue:

% ./sync-all -r git://git.haskell.org get -b ghc-7.8
....
== running git submodule update
fatal: repository '/startdir/packages/Cabal.git' does not exist
Clone of '/startdir/packages/Cabal.git' into submodule path 'librariesCabal' failed
git failed: 256 at ./sync-all line 122.

I don't really have time to look into this myself, but if I get some guidance I'll be happy to fire off the build while keeping busy with more pressing stuff.

comment:11 Changed 5 years ago by MagnusTherning

Now I've managed to figure out what causes the build failure. It's the combination of me using git clone --bare --mirror into a local mirror and the use of submodules with relative paths. This means that I will need to also mirror all the relevant package repos.

AFAIU this basically means that the -r argument to sync-all won't work as I think it was intended.

comment:12 Changed 5 years ago by MagnusTherning

I've just confirmed that haskell-src-exts versions 1.14.0.1 and 1.15.0.1 can be built with profiling information using the tip of the ghc-7.8 branch (8404e800a35380281a218c78a6799ed6836b6fad).

comment:13 Changed 5 years ago by CoreyOConnor

Same as Magnus:

Reproduced on NixOS 64 bit using GHC 7.8.2.

Could not reproduce using ghc-7.8 branch (8404e800a35380281a218c78a6799ed6836b6fad)

Same build process was used in each case.

comment:14 Changed 5 years ago by ihameed

Cc: idhameed@… added

comment:15 Changed 5 years ago by rwbarton

So, this is fixed, right?

comment:16 Changed 5 years ago by thoughtpolice

Resolution: fixed
Status: infoneededclosed

I do believe this is fixed in 396648eebaa1144d4d1f5326db716e8130f73732 - closing.

Note: See TracTickets for help on using tickets.