Opened 3 years ago

Closed 3 years ago

#5543 closed bug (fixed)

Building on OS X 10.5 with XCode 3.4.1 runs into "ld: unknown option: -no_compact_unwind"

Reported by: thorkilnaur Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.3
Keywords: Cc:
Operating System: MacOS X Architecture: x86
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

On the tn23 build slave, which is OS X 10.5, and

$ uname -a
Darwin thorkil-naurs-intel-mac-mini.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
$ xcodebuild -version
Xcode 3.1.4
Component versions: DevToolsCore-1204.0; DevToolsSupport-1186.0
BuildVersion: 9M2809
$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-85.2.1
$

the build of a recent GHC HEAD fails with:

"inplace/bin/ghc-stage1" -o ghc/stage2/build/tmp/ghc-stage2 -H32m -O -hide-all-packages -i -ighc/. -ighc/stage2/build -ighc/stage2/build/autogen -Ighc/stage2/build -Ighc/stage2/build/autogen -optP-DGHCI -optP-include -optPghc/stage2/build/autogen/cabal_macros.h -package array-0.3.0.3 -package base-4.4.0.0 -package bytestring-0.9.2.0 -package directory-1.1.0.1 -package filepath-1.2.0.1 -package ghc-7.3.20111009 -package haskeline-0.6.4.0 -package mtl-1.1.1.1 -package process-1.1.0.0 -package unix-2.5.0.0 -fno-warn-name-shadowing -Wall -XHaskell98 -XForeignFunctionInterface -XUnboxedTuples -XFlexibleInstances -XMagicHash -XNondecreasingIndentation -XCPP -XPatternGuards -O2 -threaded -no-user-package-conf -rtsopts -odir ghc/stage2/build -hidir ghc/stage2/build -stubdir ghc/stage2/build -hisuf hi -osuf o -hcsuf hc ghc/stage2/build/Main.o ghc/stage2/build/InteractiveUI.o ghc/stage2/build/GhciMonad.o ghc/stage2/build/GhciTags.o ghc/stage2/build/hschooks.o
ld: unknown option: -no_compact_unwind
collect2: ld returned 1 exit status
make[1]: *** [ghc/stage2/build/tmp/ghc-stage2] Error 1
make: *** [all] Error 2

See for example http://darcs.haskell.org/ghcBuilder/builders/tn23/451/8.html.

Best regards
Thorkil

Attachments (1)

0001-FIX-BUILD-on-OS-X-10.5-Check-whether-ld-understands-.patch (4.1 KB) - added by thorkilnaur 3 years ago.
FIX BUILD on OS X 10.5: Check whether ld understands -no_compact_unwind

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by thorkilnaur

FIX BUILD on OS X 10.5: Check whether ld understands -no_compact_unwind

comment:1 Changed 3 years ago by thorkilnaur

  • Status changed from new to patch

Uploaded patch for suggested solution to this problem: Validated on Mac OS X 10.5 and Linux. Interestingly, on Linux:

checking whether ld understands -no_compact_unwind... yes

Although not ideal, this is currently harmless, at least given the conditions on -no_compact_unwind use in compiler/main/DriverPipeline.hs. And please note: I have not had the opportunity to test this under circumstances where -no_compact_unwind actually should be used.

Best regards
Thorkil

comment:2 Changed 3 years ago by igloo

  • Resolution set to fixed
  • Status changed from patch to closed

That's great; thanks Thorkil! Applied.

Note: See TracTickets for help on using tickets.