Installations without Command Line Tools

Joshua Root jmr at macports.org
Mon Sep 24 07:48:02 UTC 2018


Currently, portconfigure::configure_get_sdkroot will return an error if
there is no SDK for the current OS version, and /usr/include also is not
present [1]. A recent change stopped warning about the lack of
/usr/include when using recent Xcode versions [2].

This leaves us in a situation where a user who installs Xcode and
MacPorts but not the Command Line Tools will see errors, with no hint as
to how to resolve them. The three obvious ways forward would be:

1. Go back to recommending having the Command Line Tools installed,
warning if they are not present.
2. Uncomment the code at the end of configure_get_sdkroot that would
fall back to using the "macosx" SDK link if the specific version
requested is not found. This has risks that are explained in the comments.
3. Recommend that users install the SDK for their OS version when Xcode
does not include it. This could involve adding a link in the error
message to a wiki page with download and installation instructions.

- Josh

[1]
<https://github.com/macports/macports-base/blob/v2.5.3/src/port1.0/portconfigure.tcl#L447>
[2]
<https://github.com/macports/macports-base/commit/3da14a607595c0526843ae705a581d02ac735824>


More information about the macports-dev mailing list