pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: macOS SDK selection woes, Darwin.mk out of date



* On 2025-01-11 at 15:46 GMT, Greg Troxel wrote:

 #include <...> search starts here:
  /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1
  /Library/Developer/CommandLineTools/usr/lib/clang/16/include
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
  /Library/Developer/CommandLineTools/usr/include
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)

This seems wrong. On my local system I have MacOSX15.2.sdk and it works ok:

 #include <...> search starts here:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1
  /Library/Developer/CommandLineTools/usr/lib/clang/16/include
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
  /Library/Developer/CommandLineTools/usr/include
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)

Note your '../usr/bin/...' vs my '../usr/include'.  Same compiler:

  Apple clang version 16.0.0 (clang-1600.0.26.6)

Maybe it's a bug in the SDK 15.1 and will be fixed if you update?

For my binary packages I still use clang-13 and the 12.3 SDK. The newer SDKs just keep breaking basic things (see recent problems with m4/yacc), and clearly get zero QA from Apple. Modulo some Swift ABI issues, these binaries work perfectly on all newer releases.

Looking at mk/platform/Darwin.mk, the comments about versions stops at
13.  I remember there used to be a table mapping os version to sdk
version, but I can't find that now.  bootkstrap/README.Darwin mentions
OSX_SDK_MAP, but that's not in mk/platform/Darwin.mk.  I remember there
being more detail in README.Darwin, but perhaps it's all obsolete and
was gc'd.

We stopped doing that, mostly because there is no such thing as a correct mapping between OS and SDK. For example for my binary packages I build against the 12.3 SDK but on Sonoma.

The recommended path is to pick an SDK and stick with it. The bootstrap script supports MACOSX_DEPLOYMENT_TARGET these days to help with that. That way you don't get screwed by Apple on arbitrary upgrades.

--
Jonathan Perkin                    pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index