Ticket #7559 (closed bug: fixed)

Opened 4 months ago

Last modified 3 months ago

`./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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk".

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

Change History

Changed 4 months ago by altaic

  • status changed from new to patch

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

Changed 4 months ago by igloo

  • cc chak added
  • difficulty set to Unknown
  • priority changed from normal to high
  • owner set to igloo
  • milestone set to 7.8.1

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.

Changed 3 months ago by ian@…

commit cd31b294fcff964ecea6f78f20e7d5743a853631

Author: Ian Lynagh <ian@well-typed.com>
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 -----------------------------
 configure.ac         |   17 -----------------
 mk/config.mk.in      |   21 ---------------------
 rts/ghc.mk           |    5 -----
 utils/lndir/Makefile |    6 ------
 5 files changed, 0 insertions(+), 78 deletions(-)

Changed 3 months ago by igloo

  • status changed from patch to closed
  • resolution set to fixed

I've removed it

Note: See TracTickets for help on using tickets.