-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Add bootstrap tools for aarch64-darwin and add to supportedSystems #123557
Add bootstrap tools for aarch64-darwin and add to supportedSystems #123557
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why my hashes don't match what you put here, do you know whats up?
Maybe we could use the hashes I provided here? #105026 (comment)
IIUC when nix hashes an executable file it uses a nested file format to encode the executable metadata, which affects the hash. It should be the difference between |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, my mistake. 👍
This change is not required? (saw it somewhere on the IRC) --- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -180,7 +180,7 @@ let
# Cross compiled bootstrap tools
aarch64-darwin =
let
- bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { system = "x86_64-darwin"; crossSystem = "aarch64-darwin"; };
+ bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { system = "aarch64-darwin"; };
in {
# Distribution only for now
inherit (bootstrap) dist; |
I'd rather keep it cross-built so that in the future we can easily re-bootstrap it without using a known good aarch64-darwin machine. |
The bootstrap tools can be built either cross or native. Currently the cross compiled tools have had more testing, so I’m inclined to keep them for now. I’ve also seen reports that natively rebuilt tools behave slightly differently (shows up as a dylib not found error when building expat), so until I’ve investigated that I think we’re best to stick with the tools that we know to work. |
Maybe we should leave the cross bootstrap job for now and add a native boostrap job as well? At least until we are happy? |
I thought so, thanks for explanation @grahamc @thefloweringash |
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the downloads
$ nix build -f. --argstr system aarch64-darwin stdenv.bootstrapTools
[2 built, 3 copied (0.4 MiB), 75.5 MiB DL]
error: a 'aarch64-darwin' with features {} is required to build '/nix/store/7kcayxwk8khycxw1agmcyfm9vpsqpw4s-bootstrap-tools.drv' ...
and that plain hashes of the resulting paths match what hydra built, by manual sha256sum.
I think this should be merged as soon as possible, to allow for the aarch64-darwin builders to find as many regressions as possible |
@@ -11,7 +11,7 @@ | |||
{ nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; revision = "0000000000000000000000000000000000000000"; } | |||
, officialRelease ? false | |||
# The platforms for which we build Nixpkgs. | |||
, supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ] | |||
, supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right? will this not block channels?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will only block for failing constituents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind. We have an explicit list of jobs + arch here since a while..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will, about as much as x86_64-darwin
, but I'd hope it works out OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, this will just add the aarch64-darwin packages to the jobset. Channel blocking is done by adding certain jobs. We should probably have a follow-up PR which at least has the fundamental packages listed so we don't ship completely broken aarch64-darwin updates. But that can be done in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In particular note that NixOS channels won't be affected, just as they're not affected by x86_64-darwin
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A more interesting question (for later than this PR) is what the nixpkgs-21.05-darwin
channel should include...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A more interesting question (for later than this PR) is what the
nixpkgs-21.05-darwin
channel should include...
probably both x86_64 and aarch64
What tier of support are we shooting for here? https://github.com/NixOS/rfcs/blob/master/rfcs/0046-platform-support-tiers.md |
I would say that this will eventually replace |
I see it in Tier 2 in that non-normative appendix. And I failed to find a current normative table :-) |
If we're going for tier-3 I think we should remove it from |
Tier 2 sounds good. Especially because it will eventually replace |
I think it is too early to add it to supportedSystems today. I think instead we should have it be its own jobset and potentially its own channel until it has some time to simmer, and get full support in to ofborg. My concerns here are:
|
OK, so for this moment I just pushed the bootstrap hashes to staging-next as 5d22db3 (with typo in commit message) and I modified the staging-next jobset to include aarch64-darwin. |
Agreed. My main concern is if we have "Apple M1 Support" in the release notes, I would just like for that platform to be usable. Higher tier support can come later when other pieces are in place. But I would like to mention that Also, shoutout to @stephank for doing 100+ darwin fixes for ZHF 🥳
Perfect, I guess that's what I was wanting to hear. Just concerned about this being usable by release time in 10 days. Get those jobs simmering :) |
👍
Yes, that was no good. I should have asked much sooner for the foundation to fund it. I've also started the process to request an additional x86_64-darwin machine and 2x aarch64-darwin machines for ofborg.
🥳 🎉 yes, thank you! |
Could we reassign 2 aarch64-darwin machines from hydra to ofborg? If that makes it quicker than buying new hardware and wiring it up. |
I've opened #124887 and this PR is no longer needed. |
Motivation for this change
Fully enable aarch64-darwin, follow up to #105026.
Bootstrap tools come from #105026 (comment). The hashes that nix uses for executable files is not the same as the sha256 of their contents, so the executable tools do not match the comment. I applied the regular TOFU approach.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)