PR 14427: 10.14 tester wanted
fw at fwright.net
Sun Apr 3 04:05:40 UTC 2022
On Sun, 3 Apr 2022, Joshua Root wrote:
> On 2022-4-3 12:00 , Fred Wright wrote:
>> I got a warning about the 10.14 SDK not being installed, which I found
>> surprising since I know I have the CLTs installed. Running the suggested
>> "xcode-select --install" complains that the CLTs are already installed, and
>> suggests Software Update, which doesn't do anything. Looking in the SDKs
>> directory within the Xcode bundle, I see 10.15 but not 10.14, though that
>> ought to work and seems to work. Perhaps the SDK check (which I think is
>> separate from the port itself) is overly picky.
> I don't know about qt6 specifically, but in the general case, the warning is
> precisely as picky as it should be. Building anything that doesn't handle
> weak-linked symbols correctly (which is most things) against an SDK newer
> than the OS it will be run on will result in runtime crashes. This is why we
> always say to install the Command Line Tools, because Xcode doesn't
> necessarily have the SDK matching the current OS version, whereas the CLTs
Building against the newer SDK doesn't cause weak-linking issues as long
as the code uses MIN_REQUIRED instead of MAX_ALLOWED to decide what
references to make. MIN_REQUIRED is the correct choice in most cases, but
code often gets that wrong. Having them the same mostly sweeps that
problem under the rug.
Apple seems to think that using the newer SDK is OK, since it's set up (in
the CLT area) like this:
lrwxr-xr-x 1 root wheel 15 Sep 26 2020 MacOSX.sdk -> MacOSX10.15.sdk
drwxr-xr-x 7 root wheel 224 Sep 26 2020 MacOSX.sdk 1
lrwxr-xr-x 1 root wheel 10 Aug 17 2019 MacOSX10.14.sdk -> MacOSX.sdk
drwxr-xr-x 8 root wheel 256 Nov 7 2019 MacOSX10.15.sdk
I'm pretty sure I never changed anything there, other than by running
Apple installers. I wouldn't be surprised if "MacOSX.sdk 1" is really a
10.14 SDK, but I didn't dig into it.
> SDKs provided by the CLTs would be in
> /Library/Developer/CommandLineTools/SDKs. If you have a 10.14 SDK there but
> qt6 is not finding it, it may only be looking in Xcode, and hopefully it
> knows what it's doing.
Or it's finding it but looking inside to see what version it is. Whether
it knows what it's doing is unknown.
More information about the macports-dev