-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Tracking issue: Update Darwin bootstrap files #222717
Comments
One reason to update bootstrap tools is it allows the x86_64-darwin stdenv to be bootstrapped with a newer SDK since that needs I’ve also started experimenting with exposing an Update: I should add that #180931 needs revised to break out the SDK changes into its own PR since many of the packages have been updated separately. |
I believe almost all the packages in #180931 now build on x86_64-darwin, or at least at some point. In the meantime, it is currently difficult to build GTK-dependent packages with nixpkgs/pkgs/development/libraries/gtk/3.x.nix Lines 151 to 152 in 6566705
And I think bumping everything to 11.0 is the most direct way to solve this... |
I wouldn’t be surprised. I lost momentum when I got blocked on bootstrap-tools stuff. Doing them separately was probably the right approach anyway.
MoltenVK has a similar problem. It can’t currently be used with any library that propagates SDK-based build inputs (like
The reason why I’m exploring exposing |
I can upload new bootstrap tarballs if needed. |
I'm not sure I follow. By 'override-based approach', do you mean the
Thanks for the offer. I deliberately didn't ping, because I expected some discussion first, but can ping when there is a decision, if you'd rather not stay subscribed. 🙂 |
I’m referring to the The I have a proof of concept working. It builds Wine just by referencing As far as whether it’s desirable to build an 11.0 Hopefully that helps clarify. If not, please let me know. |
@reckenrode I think you explained it well, thanks, and I won't dive in too much further here. Some specific questions for this issue:
|
My apologies for the slow reply. I meant to reply earlier but got sidetracked.
The current state of One thing I’d like to explore is using the linker in LLVM instead of
Correct.
That would also result in a bump in the clang used in the You’re right that we don’t know what clang is needed to bootstrap the 13.0 SDK. I wouldn’t proactively bump clang just for that, though there may be other reasons to do it (that don’t come to my mind but others might have).
The separate bootstrapped |
While working on an LLVM bump to LLVM 15 (in support of #229210), I ran into the following issues. They can be worked around, and I have, but it’s preferable if the bootstrap tools were updated to make the workarounds unneeded.
Those are all I have found so far that have been blockers. My modifications for the bump allow it to use a different bootstrap compiler from the final one. It’s also written to play nicely with LLVM 11 even after #166401 is addressed. |
After doing some more work, I don’t think any of the changes above are needed. I reworked the stdenv bootstrap to (re)build what it needs in stage 1. It may not even be necessary to include Regarding the two bullets in the issue: I also handle #166401 in the bootstrap. If the clang is bootstrap, it assumes the clang version is older than 12 and overrides the build flags. For clang in nixpkgs, it uses the flags defined in I don’t think the changes to |
With the stdenv rework merged, I can confirm no changes or additions are required from the bootstrap tools. I think the place for the platform optimization stuff is in cc-wrapper like it’s done for GCC. Doing it in the stdenv is too brittle and not the correct place anyway. |
Should this move forward again? We've waited quite a while for updates to group. Maybe the LLVM bump @reckenrode is working on? |
It’s not needed for the LLVM update, so it should probably wait until after #241692 is merged to minimize the risk of breaking something and blocking the PR. |
@reckenrode wrong PR link? |
Thanks, fixed it. I messed up transcribing it while replying on my phone. |
I'm working on a couple of changes to update the bootstrap tools. I made some modifications to the llvm toolchain for versions 12+ and thus would like to drop llvm11. also, stdenvBuildTools is now broken on staging-next and unpinning llvm11 will fix.
So far i've only tested on x64 darwin with the sandbox enabled. things i've done
Tested on aarch64 and x64 darwin thx |
closed by #302387 |
Closing, assumed indeed closed by #302387. If this is inaccurate, please re-open and (or) add a comment detailing why. |
I'm opening a tracking issue for updating the Darwin bootstrap files to document pending changes, and to see if/when we have enough reasons to perform an update.
The last update was in 2021 as part of #105026. I've been told updates to bootstrap-files are supposed to be rare, and there should be good rationale. Once we have that, plus some thumbs up from @NixOS/darwin-maintainers, we should be able to find help getting tarballs.nixos.org updated via #infra:nixos.org.
Currently pending changes:
stdenvBootstrapTools: native aarch64-darwin build #202347
This PR changed the structure of the bootstrap files. Currently, there is the main bootstrap-tools archive, plus some separate executables required to unpack it (sh, bzip2, mkdir, cpio). The new structure is just an archive, and uses the builtin Nix support for
.nar.xz
unpacking. The PR contains more rationale, plus there's an example commit.apple-m1 compiler optimisations for aarch64-darwin? #166401
Maybe(?) update LLVM and change arch flags for Apple Silicon.
Anything else?
Reasons to delay:
master
, the pending changes do not significantly affect the resulting stdenv.Reasons to move forward:
The text was updated successfully, but these errors were encountered: