Need help from Darwin users: Syntax errors in `.../Library/Frameworks/Foundation.framework/Headers`?

One other possibility is using darwin.apple_sdk_11_0.callPackage, but it doesn’t do framework substitution or handle propagated inputs.

That’s the backup fix if the refactor doesn’t or can’t address the problem generally.

I could hardly believe it, but I got a working build eventually with stock nixpkgs. This comes from taking a legacy flake which is super complicated as a starting point. As background, I’m rewriting the flake with a flat and simple structure.

I’m still in the process of figuring out why exactly this is working. The main change I made is adding the SDK override and updating nixpkgs to a include a higher version of go to address a _SecTrustEvaluateWithError I got when using SDK 10_12 throughout.

There’s another bit which may have an influence holochain/nix/modules/darwin.nix at 00cf54944968c3bc1b5d9ce0ae9eb0c28529df2e · jost-s/holochain · GitHub.

Once I’ve come to understand it, I’ll report back.

1 Like

This is as far as my understanding goes. I have a minimum working version of the legacy flake that successfully builds on aarch64-darwin, x86_64-darwin and x86_64-linux.

I think the go override is what did the trick. Can you identify anything that needs fixing upstream?

With the new flake I’ve been getting an error unrelated to symbols for aarch64-darwin. It builds correctly on Linux, but on aarch64-darwin in the installPhase it fails with an error xargs: signIfRequired: No such file or directory.

I have no clue where it comes from and even if I copy the working flake above to the new flake’s repo, I get the same error on aarch64-darwin. I couldn’t find anything relevant about this error. Do you know why that is happening?

[edit]
It’s to do with the flake.lock. Some input is causing a problem. I copied the working lock file over and it builds on aarch64-darwin. I’m replacing the inputs one by one to hone in on the faulty one.

[edit2]
Turns out that it was a problem with the revision of crane. I updated the flake input which fixed the build.

Go is already using the 11.0 SDK. It’s surprising that wrapping it would resolve the issue.