Nix 🖤 macOS Monthly

As far as I can tell, the command-line tools (not sure about Xcode) make an exception only for the open-source components (and I have no idea how that works when the open-source components are incomplete or unavailable). What about the other stuff though? How does that work for e.g., Metal or CoreImage?

April 2022

Something that stood out with the _scproxy issue was the involvement of a bootstrap stage Python in the bootstrapped-pip build. This raised my suspicion that something was wrong with the Python build. Turns out there were errors preventing _scproxy.c from being compiled but these errors were silently swallowed and did not result in a failing build.

The reason for the errors was an issue with the Availability macros. Apple stopped updating them in the open source releases, probably because of the combinatorial explosion of macros with each new version of macOS. They’ve since switched to newer macros, which are backed by the availability attribute in modern Clang and GCC.

My fix is redefining the old macros using the new-style availability attribute. This finally fixed the Python build and completed the substitution of configd by SystemConfiguration from the SDK. Now I can continue bumping Apple’s open source releases.

16 Likes

May 2022

With configd out of the way I was finally able to focus on bumping the actual Apple open source releases we rely on to construct our own source-based SDK. This went swimmingly. I’ve updated about half of the source releases and tracked down some of the headers we were missing, so our SDK will be more complete. So far I haven’t encountered any major, new roadblocks—knock on wood.

16 Likes

@toonn: I see these errors popping up again, after switching default python from 3.9 to 3.10 (currently on the staging-next branch). Very many packages seem to be transitively broken by that. Perhaps you could have a look?

1 Like

Has anyone dared to try upgrading to the Ventura developer beta yet? We’ve gotten lucky with the last 1 or 2 upgrades and things have mostly worked out of the box, but prior to that it’s often been a very painful process.

We’ve been talking about this a bit in #macos:nixos.org. I’m looking into this today but there’s only so much I can do because I don’t have access to aarch64-darwin hardware.

What I can already say is that I don’t think the errors are related to the ones I observed. As aarch64-darwin is using SDK 11.0.1 it shouldn’t have issues with the Availability macros.

2 Likes

Right now, x86_64-darwin seems to be broken with the same error message.

1 Like

would you like access? happy to provide

Thanks for the offer, @pjjw, but the Python issue was tracked down to intentionally using python3Minimal for cacert to workaround an infinite recursion issue with mailcap. This has since been rolled back and I believe it was fixed by using fetchurl instead of fetchzip for mailcap, but this hasn’t been confirmed.

I’ll let you know if the need arises again : )

1 Like
Hosted by Flying Circus.