Bug 55152 - Apple CoreService Framework configure check uses hard-coded SDK path
Summary: Apple CoreService Framework configure check uses hard-coded SDK path
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: build-system (show other bugs)
Version: unspecified
Hardware: All Mac OS X (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-20 15:09 UTC by Adam
Modified: 2016-05-03 03:21 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch from macports (1.26 KB, patch)
2016-05-02 16:05 UTC, Jeremy Huddleston Sequoia
Details | Splinter Review

Description Adam 2012-09-20 15:09:48 UTC
Recent Xcode versions place CoreServices.h header files within the Xcode application bundle itself rather than /Developer, as such hardcoding the path to /Developer/Headers/FlatCarbon/CoreServices.h in configure.ac is not suitable for those situations. 

The Xcode prefix can be found from the output of `xcode-select -print-path` (for Xcode 4.3+ installations, and where the path has been properly set up by the user), however if that does not exist a set of cascading fallbacks is recommended - then try /Developer if there are files in /Developer/usr/bin; then /Applications/Xcode.app/Contents/Developer, in case xcode-select is broken but Xcode is installed. The SDK path is within the Xcode prefix found above.
Also available is `xcodebuild -version -sdk macosx$(sw_vers -productVersion | grep -o '[0-9]*\.[0-9]*') Path` command which directly gives the SDK Path.
A patch to fix this check should ideally also be compatible with the --with-mac-sysroot command to manually override the SDK path.

An example of where the headers are located on my machine is /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Developer/Headers/FlatCarbon
Comment 1 Misty De Meo 2012-09-20 15:12:32 UTC
Note that running xcodebuild on a system with a broken xcode-select path will cause an infinite loop, so not recommended as a first option!

Unfortunately Mac users who have the "Command Line Tools for Xcode" package don't have a way to set a correct xcode-select path, otherwise xcodebuild would be an ideal solution here.
Comment 2 Misty De Meo 2016-01-02 04:06:37 UTC
A patch for this issue is proposed by Macports: https://trac.macports.org/browser/trunk/dports/audio/pulseaudio/files/patch-configure.ac-coreservices.diff
Comment 3 Arun Raghavan 2016-01-04 05:29:35 UTC
I'd like to merge that patch -- any chance we can get that in git format-patch form (or at least a patch author to whom the commit can be attributed)?
Comment 4 Tanu Kaskinen 2016-04-26 14:07:53 UTC
I believe "Jeremy Huddleston Sequoia <jeremyhu@macports.org>" is the correct author. Here's the original commit in macports: https://trac.macports.org/changeset/137652

That Trac page doesn't show the full email address (at least to me), but the email address appears e.g. here: https://rt.openssl.org/Ticket/Display.html?id=3811
Comment 5 Arun Raghavan 2016-05-02 14:20:14 UTC
(In reply to Tanu Kaskinen from comment #4)
> I believe "Jeremy Huddleston Sequoia <jeremyhu@macports.org>" is the correct
> author. Here's the original commit in macports:
> https://trac.macports.org/changeset/137652
> 
> That Trac page doesn't show the full email address (at least to me), but the
> email address appears e.g. here:
> https://rt.openssl.org/Ticket/Display.html?id=3811

We don't actually know that the committer of the macports patch is the one that wrote the code.
Comment 6 Arun Raghavan 2016-05-02 14:21:05 UTC
(I'll mail the author and ask, though. thanks for the pointer)
Comment 7 Jeremy Huddleston Sequoia 2016-05-02 16:05:47 UTC
Created attachment 123412 [details] [review]
patch from macports
Comment 8 Arun Raghavan 2016-05-03 03:21:21 UTC
Thanks, pushed this now with a trivial commit message change.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.