Force Xcode SDK instead of CLI SDK?

Clemens Lang cal at
Fri Nov 20 13:30:33 UTC 2020

Hi Aaron,

On Fri, Nov 20, 2020 at 04:05:47PM +0900, Aaron Madlon-Kay wrote:
> Sorry, I should have mentioned that I tried that, but the result was
> that it still used the CLI SDK:
> SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'

That's weird. Can you provide the following please:

1. Your configuration value for developer_dir in macports.conf (I'm
   assuming it's the default).

2. Whether
   exists on your system.

I'm guessing your Xcode is new enough to only ship the MacOSX11.0.sdk in
Xcode's developer dir? That would then run through the check at [1] and
continue below, which would run

  xcrun --sdk macosx10.15 --show-sdk-path

which would fail when you only have the 11.0 one in Xcode.

That would then bring you to [2] which as a last resort tries to find
the matching MacOSX10.15.sdk in the command line tools path before
checking for the unversioned one (which would be a symlink to 11.0) in

Maybe we shouldn't run [2] when `use_xcode yes` is set, and rather
prefer the unversioned SDK from Xcode than the matching SDK from the
command line tools.



More information about the macports-dev mailing list