[MacPorts] #58779: base: ports cannot use SDK inside of Developer dir unless using Xcode build type
MacPorts
noreply at macports.org
Mon Aug 5 15:11:36 UTC 2019
#58779: base: ports cannot use SDK inside of Developer dir unless using Xcode build
type
---------------------+-----------------------
Reporter: Ionic | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.5.99
Resolution: | Keywords: tracemode
Port: |
---------------------+-----------------------
Comment (by Ionic):
This snippet clears `${configure.sdk_version}`, yes. And yes, it does so
if the selected SDK version doesn't exist. Qmake is special will use the
default "macosx" SDK value in that case, i.e., figure out which SDK to
use.
Clemens's patch is fine. He's checking whether the developer dir has been
determined as the CLT dir (i.e., is not the [default] Xcode developer dir,
because use_xcode is false and Xcode should hence be avoided) and clears
out `${configure.sdk_version}` if the requested SDK (relative to
determined developer_dir) does not exist.
My original attention call went out because of this line: `if { ![file
exists ${configure.sdkroot}/MacOSX${configure.sdk_version}.sdk] } {`
This will always be true, because `${configure.sdkroot}` will either be
empty (in which case a file like `/MacOSX${configure.sdk_version}.sdk`
will not exist) or set to an SDK root directory, such as
`/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${configure.sdk_version}.sdk`
or
`/Library/Developer/CommandLineTools/SDKs/MacOSX${configure.sdk_version}.sdk`.
Coupled with yet another set of `MacOSX${configure.sdk_version}.sdk`, such
a directory will not exist. You're currently checking for, e.g.,
`/Library/Developer/CommandLineTools/SDKs/MacOSX${configure.sdk_version}.sdk/MacOSX${configure.sdk_version}.sdk`,
which naturally won't exist.
--
Ticket URL: <https://trac.macports.org/ticket/58779#comment:16>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list