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
rust: update jobserver-rs for rust platform builds #34505
Conversation
Use upstream deps.
This commit updates the jobserver library used for building the rust platform to version 0.1.9, which fixes the following error that sometimes happens during large builds: ``` thread '<unnamed>' panicked at 'failed to acquire jobserver token: Resource temporarily unavailable (os error 11)', src/librustc_trans/back/write.rs:1619:28 note: Run with `RUST_BACKTRACE=1` for a backtrace. error: failed to acquire jobserver token: Resource temporarily unavailable (os error 11) ```
# patches that apply to both cargo and rustc | ||
commonPatches = [ | ||
# this patch can be removed when rustc is upgraded to 1.23 | ||
./patches/1.22.1-update-vendored-jobserver.patch |
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.
rustc
is released since 4. January.
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.
Yes but I didn't feel confident enough to do a rustc upgrade. If you want to do that instead, go for it. Also note that this bug affects bootstrapping as well, so you'll probably need to use the 1.23 binaries itself for bootstrapping.
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.
Those are necessary now anyway as we have rustc 1.24 now.
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.
Okay we can close the PR then
You're changes are included in #35030 |
`uutils-coreutils` is an a cross-platform rewrite of GNU/coreutils based on Rust. It aims to increase portability and improve Windows support (see https://github.com/uutils/coreutils#why). Since the derivation provides the same binaries as `coreutils` does a `prefix` argument as been added to the function to avoid any conflicts that can be used like this: ``` nix self: super: { uutils-coreutils = self.uutils-coreutils.override { prefix = "uutils"; }; } ``` Resolves NixOS#28114 /cc @NeQuissimus ----- Important notice: the patch depends on NixOS#34505 which needs to be merged *FIRST* as it fixes a bug in the `rustc` setup of nixpkgs (see the PR's discussion and rust-lang/cargo@5c9665f#commitcomment-27271420 for further reference).
Motivation for this change
This fixes the following error that sometimes occurred during rust builds with nix:
I can cleanup the changes to cargo / rust build support before merging if the general idea for these changes is accepted.
Cargo is now built from the rust source tarball as that's the way upstream recommends, see rust-lang/cargo@5c9665f#commitcomment-27271420 and it also needs the patch so it was easiest to just make it use the same source tree.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)