pkgsrc-Users archive

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

Re: MacOS workaround: No suitable Xcode SDK or Command Line Tools installed.



On May 2, 2019, at 3:03 PM, Hubert Feyrer <hubert%feyrer.de@localhost> wrote:
> 
> 
> FWIW, I've ended up with an environment[1] where pkgsrc doesn't work out of the box, giving me "No suitable Xcode SDK or Command Line Tools installed."
> 
> Apparently this is because OSX_VERSION (derived from "/usr/bin/xcrun --show-sdk-version") is not what is expected in "sw_vers -productVersion":
> 
> 	promise% /usr/bin/xcrun --show-sdk-version
> 	10.14
> 	promise% sw_vers -productVersion
> 	10.13.6

Why does pkgsrc care about this? It should really be passing what it gets from "sw_vers -productVersion” as the value for -mmacosx-version-min=… (unless something in pkgsrc lets you override that to something even lower) and not care about the SDK version.

Background: On Darwin-based platforms, the SDK version represents the highest version of an API that can be used (and becomes, e.g., MACOSX_VERSION_MAX_ALLOWED when building), while “deployment target” represents the earliest version of an OS that can be run on (and becomes, e.g. MACOSX_VERSION_MIN_REQUIRED when building). APIs that are newer than the deployment target get weak-linked so they’re NULL at runtime on the older OS, but can be called (after a runtime version check) at runtime on the newer OS.

  -- Chris




Home | Main Index | Thread Index | Old Index