-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
fix: hurd build, stat64.st_fsid was renamed to st_dev #133515
Conversation
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use |
This comment has been minimized.
This comment has been minimized.
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
Any idea how we can fix the build errors? 🤔 Bumping a dependency to a newer compatible version should not introduce so many errors in my understanding |
libc did have a bad release recently so I'll cc @tgross35 in case this is being fixed on the libc side |
This was a change to a tier3 target done by the target maintainer, so I think fixing std was the intent. Cc @sthibaul |
Right, I'm ok with the hurd change. But look at the CI failures. it looks like |
libc uses The rust-lang/libc#4038 was the PR that added this derive to libc, which presumably broke |
Oh sorry, I didn't realize there were further failures here. This looks to be from a cleanup that started using the I'll revert that change but I'd prefer not to release for another day since we just bumped the edition. Separately this is yet another thing that needs to be added to libc's CI. |
Since libc has an extern crate that's named as core, changing #[derive(Copy, Clone)] to #[::core::prelude::v1::derive(::core::marker::Copy, ::core::clone::Clone)] should probably work. Playground with similar code |
Thanks for all the investigations, regarding this PR, I will wait for another libc release, feel free to ping me if you guys need me to do anything 😆 |
I have a fix in rust-lang/libc#4158, I'll merge that and do a release tomorrow unless anyone has any feedback there. |
Do you want me to test it here using Rust's CI? Update: Just realized that will require your branch to be based on the |
You mean just with |
Gave it a try in 9d939ba, not sure if I did it in the right way ( not familiar with Rust contribution workflows 😶), building it locally gives me different errors. |
This comment has been minimized.
This comment has been minimized.
CI gives the same error I saw locally |
This error looks like something weird with bootstrapping, |
Get it, then I will discard that testing commit and switch to the next libc release tomorrow |
Released in 0.2.167 https://github.com/rust-lang/libc/releases/tag/0.2.167 |
This comment has been minimized.
This comment has been minimized.
|
Just allow the warning, those won't be removed until 1.0 (if at all - I'm not sure an official decision was ever made there, I just added the deprecation warning to be consistent with what's on libc's Edit: better, use |
Hi @ChrisDenton, this patch should be ready for review now:) |
Great! @bors r+ rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#128184 (std: refactor `pthread`-based synchronization) - rust-lang#132047 (Robustify and genericize return-type-notation resolution in `resolve_bound_vars`) - rust-lang#133515 (fix: hurd build, stat64.st_fsid was renamed to st_dev) - rust-lang#133602 (fix: fix codeblocks in `PathBuf` example) - rust-lang#133622 (update link to "C++ Exceptions under the hood" blog) - rust-lang#133660 (Do not create trait object type if missing associated types) - rust-lang#133686 (Add diagnostic item for `std::ops::ControlFlow`) - rust-lang#133689 (Fixed typos by changing `happend` to `happened`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#133515 - SteveLauC:fix/hurd, r=ChrisDenton fix: hurd build, stat64.st_fsid was renamed to st_dev On hurd, `stat64.st_fsid` was renamed to `st_dev` in rust-lang/libc#3785, so if you have a new libc with this patch included, and you build std from source, you get this error: ```sh error[E0609]: no field `st_fsid` on type `&stat64` --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/hurd/fs.rs:301:36 | 301 | self.as_inner().as_inner().st_fsid as u64 | ^^^^^^^ unknown field | help: a field with a similar name exists | 301 | self.as_inner().as_inner().st_uid as u64 | ~~~~~~ ``` Full CI log: https://github.com/nix-rust/nix/actions/runs/12033180710/job/33546728266?pr=2544
On hurd,
stat64.st_fsid
was renamed tost_dev
in rust-lang/libc#3785, so if you have a new libc with this patch included, and you build std from source, you get this error:Full CI log: https://github.com/nix-rust/nix/actions/runs/12033180710/job/33546728266?pr=2544