Xcode configuration woes
Ryan Schmidt
ryandesign at macports.org
Sat Nov 10 23:02:13 UTC 2018
On Nov 10, 2018, at 02:53, Vincent Habchi wrote:
> Ryan,
>
>> I don't know why Apple is doing this to us. This contradicts what we previously knew about how SDKs were meant to function. The SDKs are supposed to be the same as the system headers of a particular version. We may want to file a bug report with Apple about this. Maybe then they will fix it in a future version of Mojave.
>
> Do you want to proceed as a member of the Apple team, or do you prefer me to do so?
>
>> Unless you do have /usr/include on your system. Do you? For users who have installed /usr/include using the hidden installer package, you might need to have the port set configure.sdkroot to the path of the SDK, even when MacPorts wouldn't otherwise have done so.
>
> Yes, I do. I was not even aware I shouldn’t. TBH, I don’t even remember using a “hidden” installer package.
When Mojave was released, the Xcode command line tools for Mojave did not install /usr/include (unlike all previous versions). They did install an installer pkg somewhere inside /Library/Developer which you could then separately install to get /usr/include. We believed Apple did this because they wanted to phase out the use of /usr/include, and were only keeping this hidden installer pkg around for users who couldn't adapt to its removal so quickly. We assume future versions of Xcode command line tools won't provide this, so we want MacPorts to work when /usr/include isn't there.
However, on my own Mojave test machine, I now have /usr/include. I was playing around with that hidden installer pkg, but I had not intended to install it. Maybe I inadvertently installed it, or maybe a Mojave or Xcode or Xcode command line tools update caused it to be installed automatically. Maybe Apple has changed its mind about removing /usr/include in Mojave. I have not yet updated the Mojave buildbot worker past macOS 10.14.0 and Xcode 10.0, but when I do, I'll check if /usr/include appears there too.
> I will follow your advice and set configure.sdkroot in macports.conf
>
> Thanks for your help, Ryan, as always!
>
> Vincent
On Nov 10, 2018, at 14:19, Vincent Habchi wrote:
> Ryan,
>
>> Unless you do have /usr/include on your system. Do you? For users who have installed /usr/include using the hidden installer package, you might need to have the port set configure.sdkroot to the path of the SDK, even when MacPorts wouldn't otherwise have done so.
>
> Ok, I set configure.sdkroot and it worked fine now. Should I commit it with:
>
> if {${os.platform} eq "darwin" && ${os.major} == 18} {
> configure.sdkroot …
> }
>
> ?
If this code only gets compiled on 10.14, then that would work. But do you think (or have you tested if) this code will compile on 10.13 or earlier without the 10.14 SDK?
\r
More information about the macports-dev
mailing list