-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure: zig_0_11 #299091
Comments
Can confirm, zig also doesn't build on aarch64-darwin, breaking many packages that are built with it.
|
I get a different build error on current master, though:
EDIT: This seems to be the same issue as described here: #287861 (comment) EDIT: Ok after further investigation, this seems to be a two part problem. Zig fails to build on darwin if sandboxing is enabled, which is bad, but a separate problem. My build error above was with
Going further, I can now build the commit that was identified in #290512 (comment) to be the last working one:
And then build the next one that broke the build:
Well, that's running now, I have rebuild stdenv for it. EDIT: While that is running, I've also tried to build zig on the commit that hydra failed for the first time, as that has most dependencies cached:
Hmm. This is very annoying. Zig not building in the sandbox means it's impure, so if the darwin build agents for hydra differ in their local setup from my machine, that could be the reason for the build failing. I also built on ae10a6d, the commit of the latest eval, and the inputs to zig didn't change, so nix just used the already-built derivation. EDIT: After looking at the hydra logs (should've done that before), the failure is precisely the one I got when sandbox was still enabled. So we do need to fix the build in sandbox if we want to fix this build issue. The exact errors in the original post happened without sandbox, so was likely caused by the local setup. |
Looks like Zig builds on darwin now? https://hydra.nixos.org/eval/1805832?filter=zig&compare=1805823&full=#tabs-still-succeed? |
Hmm, I don't know why that could be. Indeed, hydra built successfully, and $ checkout 92d295f
$ nix build --print-out-paths --no-link .#zig
/nix/store/divv53p9wjrsqvi3g6v3c0vabvhcb3z3-zig-0.11.0
$ nix build --rebuild .#zig
error: builder for '/nix/store/93wiqvqj0xm7bw8difdzdixjxb0rx26y-zig-0.11.0.drv' failed with exit code 2;
last 10 log lines:
> static inline bool zig_subo_u64(uint64_t *res, uint64_t lhs, uint64_t rhs, uint8_t bits) {
> ^
> 44 warnings generated.
> [ 94%] Linking CXX executable zig2
> [ 94%] Built target zig2
> [100%] Building stage3
> error: unable to create compilation: DarwinSdkNotFound
> make[2]: *** [CMakeFiles/stage3.dir/build.make:73: stage3/bin/zig] Error 1
> make[1]: *** [CMakeFiles/Makefile2:196: CMakeFiles/stage3.dir/all] Error 2
> make: *** [Makefile:136: all] Error 2
For full logs, run 'nix log /nix/store/93wiqvqj0xm7bw8difdzdixjxb0rx26y-zig-0.11.0.drv'.
$ nix-shell -p nix-info --run "nix-info -m" | grep sandbox
- sandbox: `yes` I also tried to check out the commit of the very first successful build that all the subsequent ones were cached from (3118b08), but that had the exact same result. So it seems the build is very much not reproducible, meaning any change to zig's inputs might cause a rebuild that fails. The derivation path on hydra ( There's some impurity here, but I can't say what it might be. |
Ok, it seems 0.12 builds successfully and reproducibly now, apparently there was an upstream fix for this. I opened a PR. |
This upgrades the default version of zig to zig_0_12, which builds reproducibly on darwin. Fixes NixOS#299091. Also upgrades all packages compatible with zig 0.12 to that version. I tried to upgrade packages currently pinning 0.11 as well, but only a few worked.
This upgrades the default version of zig to zig_0_12, which builds reproducibly on darwin. Fixes #299091. Also upgrades all packages compatible with zig 0.12 to that version. I tried to upgrade packages currently pinning 0.11 as well, but only a few worked. Co-authored-by: Weijia Wang (wegank) <[email protected]>
I'm not sure if this should be closed, since the issue still persists for Zig 0.11... |
Depending on how you look at it. Hydra itself built 0.11 (and 0.10 and 0.9) fine and they're cached, so for the majority of users, this issue is fixed. zig <0.12 fails to reproduce on some (AFAICT newer) versions of macOS, but because this only affects rebuilds, only new macOS and has been fixed by upstream in 0.12, I don't see much reason to invest any time in trying to fix the old versions. |
This upgrades the default version of zig to zig_0_12, which builds reproducibly on darwin. Fixes NixOS#299091. Also upgrades all packages compatible with zig 0.12 to that version. I tried to upgrade packages currently pinning 0.11 as well, but only a few worked. Co-authored-by: Weijia Wang (wegank) <[email protected]>
can confirm that
I have no comments here, just confirming that the linked PR seems to fix my particular issue. |
Probably not, then! Sorry, I didn't catch that the commit would close the issue. |
I just updated my nixpkgs (unstable) and zig_0_11 gives the following failure
|
Adds a zigpkgs input to use zig from a past rev of nixpkgs, as the 0.11 version in latest does not seem to work. related: NixOS/nixpkgs#299091
Adds a zigpkgs input to use zig from a past rev of nixpkgs, as the 0.11 version in latest does not seem to work. related: NixOS/nixpkgs#299091 Updates credo to 1.7.7-rc.0 as it supports Elixir 1.17.0
Adds a zigpkgs input to use zig from a past rev of nixpkgs, as the 0.11 version in latest does not seem to work. related: NixOS/nixpkgs#299091 Updates credo to 1.7.7 as it supports Elixir 1.17.0
Steps To Reproduce
Steps to reproduce the behavior:
nix-shell -p zig
Build log
full logs at https://gist.github.com/CrepeGoat/d4b5f983afd3268fafe175834bfb0bf0
Additional context
Add any other context about the problem here.
Notify maintainers
@andrewrk @AndersonTorres @figsoda
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.-> this is a fairly old system. is it not supported? (my impression was that zig should be portable to ~all targets, as long as the target wasn't from the 1960's or something.)
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: