-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
darwin.diskdev_cmds: fix build on m1 by bumping xnu version #155077
Conversation
This should fix #145168 |
This breaks x86_64-darwin stdenv that relies on Also see a prior PR #110840 |
@veprbl can you check if its fixed for x86_64-darwin? It still fails on aarch64-darwin with the error message
The arch was merged on Dec 3, 2020, while clang 11.1 was released on Feb 25, 2021. |
cd24a5d
to
0eb0c73
Compare
@veprbl I ended up just pulling the latest xnu tarball for the headers, so this shouldn't cause any issues for x86_64-darwin. |
In our experience from #153441, it takes llvmPackages_13 to get arm64e support, plus our cc-wrapper may not handle well the |
That's fine. Judging from reduced number of rebuilds, this should just work. @GrahamcOfBorg build darwin.diskdev_cmds |
Result of 360 packages marked as broken and skipped:
5 packages failed to build:
25 packages built:
|
cc: @NixOS/darwin-maintainers for review and merge |
Result of 50 packages marked as broken and skipped:
8 packages failed to build:
29 packages built:
|
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.
The expression you're touching here is for x86_64-darwin. IIRC aarch64-darwin apple source releases are defined in apple-source-releases/macos-11.0.1.nix
.
That file seems to be auto-generated from the |
0eb0c73
to
b35446f
Compare
I just forced pushed a commit which added a small |
What I mean is that we need to take into account the repercussions for x86_64-darwin. Unless the latest sources happen to build completely fine on macOS 10.12 and the interaction with system libraries is compatible the least we'll have to do is branch on the architecture to apply/not these changes. I'm also unsure why a newer tarball is needed? Ideally the Apple source releases are kept somewhat in sync because they interdepend. The way to update XNU would still be to edit that file I mentioned though, IMO. |
a178e10
to
09cc54c
Compare
So I've done a bit of digging, and |
Not entirely sure if this is helpful, but I was curious anyways: Result of 364 packages marked as broken and skipped:
30 packages failed to build:
|
09cc54c
to
3c15b95
Compare
@abathur I think I fixed the issue, please try again |
I started this late, since I figured I would want to walk away while it ran, but I went ahead and stopped it since diskdev_cmds failed pretty quickly:
I'll try to check back in before bed just in case there's another... :) |
3c15b95
to
c74a784
Compare
@abathur my bad, I forgot to remove the nonexistent arm directory for x86_64 😅. Now it should work. |
I get |
Yes, that's ideal. cc: @toonn thoughts on these updates? Obviously it's not the best solution, but I'm unsure of how to access any of the macos_11_0 packages from anywhere. They're overwritten by apple_source_releases default.nix |
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.
The changes look good to me now.
Does this actually build the macOS 11 version of diskdev_cmds on aarch64-darwin though, since all the source releases are merged with the 10.12 (or older) versions set?
The source releases weren't made available for M1 at the time indeed. @thefloweringash went with the SDK instead for the stdenv so there wasn't great need and it's a lot of work getting them to even build. I'm not sure how to move forward on that. Making them accessible at all seems like a pretty important step and then trying to get them to build. Eventually we could switch back to an open-source based stdenv.
Result of 50 packages marked as broken and skipped:
7 packages failed to build:
30 packages built:
|
Would you say this is eligible to be backported to 21.11? |
Motivation for this change
diskdev_cmds
failed to build, causing issues with nix-darwin configurations.Things done
Bumped
xnu
version and copied overarm/
headers fordiskdev_cmds
.xnu
still fails to build, and I'm not sure how to fix it. This might be relevant to m1 only as the error issandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes