After upgrading to dev-lang/rust-bin-1.86-r1, almost any rust package cannot be built due to unable to find crates. The build.log is compiling dev-lang/rust-1.86.0-r1 itself: error[E0463]: can't find crate for `clap_derive` --> /run/user/22252/portage/dev-lang/rust-1.86.0-r1/work/rustc-1.86.0-src/vendor/clap-4.5.20/src/lib.rs:91:9 | 91 | pub use clap_derive::{self, Args, Parser, Subcommand, ValueEnum}; | ^^^^^^^^^^^ can't find crate For more information about this error, try `rustc --explain E0463`. error: could not compile `clap` (lib) due to 1 previous error This only occurs on Gentoo Prefix with RHEL8 as host OS. I copied this prefix onto Debian 13 host OS and it works without any issue, so I build dev-lang/rust and copied back to RHEL8. The compiled rust does not have problem on RHEL8, so the issue is with rust-bin. Reproducible: Always Steps to Reproduce: 1. Start from a Gentoo Prefix on RHEL8 or similar distribution 2. emerge -av rust-bin 3. emerge -av rust
Created attachment 927418 [details] build.log for dev-lang/rust
Created attachment 927419 [details] emerge --info output
I believe the problem is that the patchelf interpreter patching of Rust binaries is no longer happening in recent versions. > patchelf --print-interpreter /srv/moritz/gentoo/usr/bin/rustc /lib64/ld-linux-x86-64.so.2 The correct value for my system would be: > patchelf --print-interpreter /srv/moritz/gentoo/bin/bash /srv/moritz/gentoo/lib64/ld-linux-x86-64.so.2 The problem seems to be the `find' command that would normally pull a list of executables: * Changing interpreter to /srv/moritz/gentoo/lib64/ld-linux-x86-64.so.2 for Gentoo prefix at /srv/moritz/gentoo/var/tmp/portage/dev-lang/rust-bin-1.87.0/image/srv/moritz/gentoo/opt/1.87.0/bin ... find: ‘/srv/moritz/gentoo/var/tmp/portage/dev-lang/rust-bin-1.87.0/image/srv/moritz/gentoo/opt/1.87.0/bin’: No such file or directory The correct find path would be: /srv/moritz/gentoo/var/tmp/portage/dev-lang/rust-bin-1.87.0/image/srv/moritz/gentoo/opt/rust-bin-1.87.0/bin It would appear that the unpacked rust binary package was renamed from just the version number to rust-bin-versionnumber somewhat recently.
(In reply to Moritz Brunner from comment #3) > > It would appear that the unpacked rust binary package was renamed from just > the version number to rust-bin-versionnumber somewhat recently. Ah, thanks! Let's fix it
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9b69b495e07f21b8a49f38f87fed5babd3a9476 commit d9b69b495e07f21b8a49f38f87fed5babd3a9476 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2025-05-19 08:13:47 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2025-05-19 08:13:47 +0000 dev-lang/rust-bin-1.87.0: fix patchelf for prefix Fix path to bin-dir. Thanks Moritz Brunner in https://bugs.gentoo.org/955343#c3 Closes: https://bugs.gentoo.org/955343 Signed-off-by: Fabian Groffen <grobian@gentoo.org> dev-lang/rust-bin/rust-bin-1.87.0.ebuild | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)