-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Error building libstd: with_hasher cannot be (indirectly) exposed to stable #133857
Comments
This also fails if I build it for the host target:
|
Just to make sure: You are building the standard library associated with the version of rustc with which you are building it? |
Yes, that's what I'm doing:
|
Does it work if you add |
Yes, that does solve the issue, thank you. I'll add it to future builds to ensure this doesn't happen again. However, does this mean that |
|
In that case, is there no error here? Curious how it was fine for years and it just became a problem. If it's working as expected then I can close this issue. |
In most cases you can call a function without a stability marker from a tl;dr: This is now working as expected and accidentally worked previously. |
Looks like #133670 may make it work again without |
Hi @bjorn3, thank you for the above helpful pointers.
But, after that I see the following failure when cross-compiling with poky for rust 1.85:
Earlier versions didn't have this error. Does passing the unstable flag causes this issue? |
That is an unrelated error. A bunch of versions of the cc crate hard coded the list of supported targets, which wouldn't include the x86_64-poky-linux-gnu target that you added. Try backporting #137460. |
Oh, I see the issue was caused by pre-generated static list of targets in cc crate. Downgrading the bootstrap cc crate version worked. |
Some of the major changes with v1.85.0 are as follows: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb to prevent user from accessing libstd's hashbrown dependency through 'hashbrown' crate. Fixes: error: `hashbrown::HashMap::<K, V, S>::with_hasher` cannot be (indirectly) exposed to stable --> std/src/collections/hash/map.rs:304:25 error: `hashbrown::HashSet::<T, S>::with_hasher` cannot be (indirectly) exposed to stable --> std/src/collections/hash/set.rs:396:25 rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. This is merged in v1.85.1 can be dropped when upgraded to it. rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. A check was implemented to verify 'llvm_floatabi' in target config json file which yields the following error if not set. Set corresponding 'llvm_floatabi' values for them. Fixes: 'error: Error loading target specification: ARM targets must specify their float ABI.' rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop the unpack:append() which removed it and prevented the bloat. rust-lang/rust@13c3f9b - Drop backported "fix-tidy-check-failure.patch" since it's merged with v1.85.0. - Adapt the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Release notes: https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop the unpack:append() which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. (From OE-Core rev: f9c206acd89da3743167c4e5405ee4bef493d4f2) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop the unpack:append() which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop the unpack:append() which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. (From OE-Core rev: f9c206acd89da3743167c4e5405ee4bef493d4f2) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop the unpack:append() which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. (From OE-Core rev: 8fdc31b150588f14354b7c3d196e2544d5ea2df3) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop the unpack:append() which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. License-Update: Unicode license text is updated to Unicode-3.0 License. rust-lang/rust@6d2a3e9 - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop "remove_gcc_directory" postfunc which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. (From OE-Core rev: f4ae71bc34c7ee7338eb3600dd91bf76bfa6a671) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. License-Update: Unicode license text is updated to Unicode-3.0 License. rust-lang/rust@6d2a3e9 - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop "remove_gcc_directory" postfunc which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. License-Update: Update Unicode license text to Unicode-3.0 License. rust-lang/rust@6d2a3e9 - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop the unpack:append() which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. (From OE-Core rev: ef6e85f0d0caa1ce03e793aeb351c23cee46e19f) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. License-Update: Unicode license text is updated to Unicode-3.0 License. rust-lang/rust@6d2a3e9 - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop "remove_gcc_directory" postfunc which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. (From OE-Core rev: e534966e22a1dd6babed7e1516940dab6e177c08) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. License-Update: Unicode license text is updated to Unicode-3.0 License. rust-lang/rust@6d2a3e9 - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop "remove_gcc_directory" postfunc which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. License-Update: Unicode license text is updated to Unicode-3.0 License. rust-lang/rust@6d2a3e9 - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop "remove_gcc_directory" postfunc which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. (From OE-Core rev: e534966e22a1dd6babed7e1516940dab6e177c08) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Rust stable version updated to 1.85.0 https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html Some of the major updates: - Update LIC_FILES_CHKSUM in libstd-rs and rust recipes. License-Update: Update Unicode license text to Unicode-3.0 License. rust-lang/rust@6d2a3e9 - Pass '-Zforce-unstable-if-unmarked' to RUSTFLAGS in libstd-rs.bb Fix: rust-lang/rust#133857 (comment) - Downgrade bootstrap cc version causing bootstrap to fail on custom targets. (Backported from v1.85.1) Fix: rust-lang/rust@e4ca11f - Explicitly set float ABI for all ARM 32 bits targets. Fix: rust-lang/rust@a51fefc - Rust v1.85.0 tarball doesn't ship gcc tree. Drop the unpack:append() which removed it and prevented the bloat. Fix: rust-lang/rust@13c3f9b Adapted the patch changes with v1.85.0: repro-issue-fix-with-cc-crate-hashmap.patch revert-link-std-statically-in-rustc_driver-feature.patch rust-oe-selftest.patch rv32-cargo-rustix-0.38.40-fix.patch Dropped patches: fix-tidy-check-failure.patch since it's merged with v1.85.0. (From OE-Core rev: a246b197207204d21bdd5c4358b4b61a1e1df22c) Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
As of yesterday's (2024-12-03) release of Rust, I am unable to build libstd for Xous:
Earlier versions did not have this error. Usually when this happens it's something Xous-specific, but in this case it looks like it's entirely within
std::collections::hash
.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: