Ticket #7119 (closed bug: fixed)

Opened 10 months ago

Last modified 9 months ago

Build failure on OS X Mountain Lion

Reported by: thoughtpolice Owned by:
Priority: normal Milestone:
Component: Compiler Version:
Keywords: mac Cc: simonmar@…, justinbonnar@…, eir@…
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: Building GHC failed Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets: 7040

Description

On my OS X Mountain Lion machine, while building HEAD with GHC 7.4.2 as the bootstrapping compiler, the build eventually fails like so:

$ make
===--- building phase 0
/usr/bin/make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for `phase_0_builds'.
===--- building phase 1
/usr/bin/make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
make[1]: Nothing to be done for `phase_1_builds'.
===--- building final phase
/usr/bin/make -r --no-print-directory -f ghc.mk phase=final all
  HC [stage 2] libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.o
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... ghc-stage2: internal error: Invalid Mach-O file:Address out of bounds while relocating object file
    (GHC version 7.7.20120804 for x86_64_apple_darwin)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

This is from a checkout from Friday, August 3rd 2012. It looks like a bug in the DIY linker. Initially I thought it might be fixed by Luite's patch in #7040, but it is not. The build is also completely littered with warnings during compilation from the assembler:

/var/folders/6x/2_5h95jx2kqgpbnk0cpg1vd00000gn/T/ghc67149_0/ghc67149_0.s:970:0:
    section difference relocatable subtraction expression, "_dphzmprimzmseqzm0zi6zi0zi1_DataziArrayziParallelziUnliftedziArrayArray_MutableArrayArray_info" minus "_dphzmprimzmseqzm0zi6zi0zi1_DataziArrayziParallelziUnliftedziArrayArray_MutableArrayArray_info_dsp" using a symbol at the end of section will not produce an assembly time constant

I imagine this is due to some unforseen toolchain updates in XCode 4.5. I'll look into supressing these warnings with a patch.

Attachments

0001-Fix-build-failure-on-OS-X-7119.patch Download (1.1 KB) - added by simonmar 9 months ago.
fix

Change History

  Changed 10 months ago by thoughtpolice

  • version 7.4.2 deleted

  Changed 10 months ago by chak

  • cc simonmar@… added

I get the same error with Xcode 4.4 (which is the current standard version from MAS) on ML. This worked just fine a short while ago. Hence, I suspect, the failure and the assembly warnings are due to SimonM's recent patches to the native code generator.

PS: I also previously compiled GHC successfully with Xcode 4.5 (which is what you are saying your are using).

  Changed 10 months ago by JustinBonnar

  • cc justinbonnar@… added

  Changed 10 months ago by thoughtpolice

I may have actually typo'd 4.5 instead of 4.4 in my message. I'll update my git repositories and double check shortly.

Simon has only been working on the new code generator I thought (which shouldn't have much affect on the printer, since it uses the same native x86 backend,) but perhaps some other assembly printing/etc changes occurred recently.

  Changed 10 months ago by simonmar

  • difficulty set to Unknown

I have made a few small changes to the native code generator, which I suppose conceivably could have broken something - I'll do a build on my Mac and check.

  Changed 10 months ago by goldfire

  • cc eir@… added

follow-up: ↓ 8   Changed 9 months ago by simonmar

I have a fix for this, but my slow Mac hasn't finished its validate and I'm about to go on holiday. If someone else could validate and push this that would be great. Patch is attached.

Changed 9 months ago by simonmar

fix

in reply to: ↑ 7   Changed 9 months ago by chak

Replying to simonmar:

I have a fix for this, but my slow Mac hasn't finished its validate and I'm about to go on holiday. If someone else could validate and push this that would be great. Patch is attached.

Thanks, I'll validate it.

  Changed 9 months ago by marlowsd@…

commit d801c96530a6db84316cde82a68f020f0f89c847

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Thu Aug 9 11:41:06 2012 +0100

    Fix build failure on OS X (#7119)
    
    When refactoring this recently I accidentally put the
    dead-strip-preventer symbol (only used on OS X) in the wrong section.

 compiler/nativeGen/X86/Ppr.hs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

  Changed 9 months ago by simonmar

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.