Opened 5 years ago

Closed 5 years ago

#7559 closed bug (fixed)

`./configure --with-macosx-deployment-target=` doesn't work

Reported by: altaic Owned by: igloo
Priority: high Milestone: 7.8.1
Component: Build System Version: 7.6.1
Keywords: Cc: chak
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


This is tested on HEAD with OS X 10.8.2 using Xcode 4.5.2.

Any version X in ./configure --with-macosx-deployment-target=X results in configure failing with:

checking Mac OS X deployment target... configure: error: Unknown deployment target X

Examining configure reveals that the option appears to have bit rotted since SDK paths all point to "/Developer/...", whereas these days it should point inside the Xcode application bundle.

The SDK path should be gotten by appending "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX<version>.sdk" to the output of xcode-select --print-path, resulting in something like "/Applications/".

If continuing support for systems with old versions of Xcode is desirable, we should first try generating a path using xcode-select, and if that fails we should fall back to trying "/Developer/...".

Attachments (1)

0001-FIX-BUILD-Use-xcode-select-to-determine-the-Mac-OS-X.patch (2.2 KB) - added by altaic 5 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by altaic

Status: newpatch

Attached is a simple fix that pretty much does what I suggested in the bug report.

comment:2 Changed 5 years ago by igloo

Cc: chak added
difficulty: Unknown
Milestone: 7.8.1
Owner: set to igloo
Priority: normalhigh

Thanks for the report, but I think that you are right that we should consider whether this is something that is worth supporting at all.

Am I right in thinking that, rather than having some Darwin-specific variables, that people who want to use this could just add some flags to variables like SRC_CC_OPTS and SRC_LD_OPTS?

If so then (particularly given how few users I expect want to use this) I think we'd be better off just removing this.

comment:3 Changed 5 years ago by ian@…

commit cd31b294fcff964ecea6f78f20e7d5743a853631

Author: Ian Lynagh <>
Date:   Sun Feb 17 17:20:04 2013 +0000

    Remove the MACOSX_DEPLOYMENT stuff; fixes #7559
    If anyone wants to do this in the future, they should just set
    appropriate CC_OPTS/LD_OPTS variables instead.

 aclocal.m4           |   29 -----------------------------         |   17 -----------------
 mk/      |   21 ---------------------
 rts/           |    5 -----
 utils/lndir/Makefile |    6 ------
 5 files changed, 0 insertions(+), 78 deletions(-)

comment:4 Changed 5 years ago by igloo

Resolution: fixed
Status: patchclosed

I've removed it

Note: See TracTickets for help on using tickets.