Opened 7 years ago

Closed 6 years ago

#4269 closed bug (fixed)

Abort trap when building HEAD on OS X

Reported by: judahj Owned by:
Priority: high Milestone: 7.0.1
Component: Compiler Version: 6.13
Keywords: Cc: pho@…
Operating System: MacOS X Architecture: x86
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I cannot build GHC from the latest HEAD with OS X 10.6.3 (Core 2 Duo Macbook, 32-bit). I get the following error:

"inplace/bin/ghc-stage2"   -H64m -O0 -fasm -DNEW_GHC_LAYOUT   -hide-all-packages -i -iutils/haddock/src -iutils/haddock/dist/build -iutils/haddock/dist/build/autogen -Iutils/haddock/dist/build -Iutils/haddock/dist/build/autogen    -optP-DIN_GHC_TREE -optP-include -optPutils/haddock/dist/build/autogen/cabal_macros.h -package Cabal-1.9.2 -package array- -package base- -package containers- -package directory- -package filepath- -package ghc-6.13.20100823 -package pretty- -package xhtml-3000.2.0.1  -funbox-strict-fields -O2 -Wall -fwarn-tabs -XForeignFunctionInterface -XCPP -XPatternGuards -XDeriveDataTypeable -XScopedTypeVariables -XMagicHash -no-user-package-conf -rtsopts     -odir utils/haddock/dist/build -hidir utils/haddock/dist/build -stubdir utils/haddock/dist/build -hisuf hi -osuf  o -hcsuf hc -c utils/haddock/src/Haddock/Types.hs -o utils/haddock/dist/build/Haddock/Types.o
make[1]: *** [utils/haddock/dist/build/Haddock/Types.o] Abort trap
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [utils/haddock/dist/build/Haddock/GhcUtils.o] Abort trap
make: *** [all] Error 2

And in fact I get an "Abort trap" even just from running inplace/bin/ghc-stage2 --version.

Let me know if there's any extra tests I can run to investigate this. I added -DDEBUG to my, but it didn't change the results.

Change History (5)

comment:1 Changed 6 years ago by judahj

The problem appears to be with the stage-1 build:

$ cat ~/tmp/TestFoo.hs
module Main where
main = putStrLn "Hello, world!"
$ inplace/bin/ghc-stage1 --make -fforce-recomp ~/tmp/TestFoo.hs
[1 of 1] Compiling Main             ( /Users/judah/tmp/TestFoo.hs, /Users/judah/tmp/TestFoo.o )
Linking /Users/judah/tmp/TestFoo ...
$ ~/tmp/TestFoo
Hello, world!
Abort trap

Strangely, if I pass -debug to ghc-stage1, the resulting executable TestFoo runs successfully.

I also tried reinstalled GHC (the .pkg installer of 6.12.3), but got this same error.

comment:2 Changed 6 years ago by igloo

Milestone: 6.14.1
Priority: normalhigh
Status: newinfoneeded

Do you have this patch?

Tue Aug 24 14:14:01 BST 2010  Ian Lynagh <>
  * Don't test for gcc flags before we've found gcc

comment:3 Changed 6 years ago by gwright

If you attach the crash reporter log to the ticket, it might be easier to tell what this bug really is. Building HEAD or 6.12.3 on Snow Leopard I've seen abort traps caused by a "suicide jump", in which there is an attempted transfer of control to an address on page zero (the 4 Kbyte block at the bottom of memory). Look in the crash report if the instruction pointer is somewhere on page zero when the crash occurred.

I saw something like this in my first attempts to build HEAD on Snow Leopard some months ago. But I was not able to track it down.

comment:4 Changed 6 years ago by PHO

Cc: pho@… added

comment:5 Changed 6 years ago by judahj

Resolution: fixed
Status: infoneededclosed

I just successfully built GHC 7.0.1 release candidate 1 (from the source tarball), so I assume this issue has been resolved by a patch from the last few weeks.

Note: See TracTickets for help on using tickets.