The Traceback is: For more information about this error, try `rustc --explain E0432`. warning: `serde` (lib) generated 115 warnings error: could not compile `serde` due to 2 previous errors; 115 warnings emitted Caused by: process didn't exit successfully: `CARGO=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rust-stage0/bin/cargo CARGO_CRATE_NAME=serde CARGO_MANIFEST_DIR=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/vendor/serde-1.0.125 CARGO_PKG_AUTHORS='Erick Tryzelaar <erick.tryzelaar@gmail.com>:David Tolnay <dtolnay@gmail.com>' CARGO_PKG_DESCRIPTION='A generic serialization/deserialization framework' CARGO_PKG_HOMEPAGE='https://serde.rs' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=serde CARGO_PKG_REPOSITORY='https://github.com/serde-rs/serde' CARGO_PKG_VERSION=1.0.125 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=125 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/deps:/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rust-stage0/lib:' OUT_DIR=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/build/serde-072b7567022876b6/out /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rust-stage0/bin/rustc --crate-name serde /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/vendor/serde-1.0.125/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=0 --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="serde_derive"' --cfg 'feature="std"' -C metadata=d3a42463248ff26d -C extra-filename=-d3a42463248ff26d --out-dir /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/deps -L dependency=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/deps --extern serde_derive=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/deps/libserde_derive-761745a46e3f99c7.so --cap-lints warn -C linker=x86_64-pc-linux-gnu-gcc -Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros -Dwarnings --cfg ops_bound --cfg core_reverse --cfg de_boxed_c_str --cfg de_boxed_path --cfg de_rc_dst --cfg core_duration --cfg integer128 --cfg range_inclusive --cfg num_nonzero --cfg serde_derive --cfg core_try_from --cfg num_nonzero_signed --cfg systemtime_checked_add --cfg std_atomic64 --cfg std_atomic` (exit status: 1) Traceback (most recent call last): File "/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/./x.py", line 27, in <module> bootstrap.main() File "/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/src/bootstrap/bootstrap.py", line 1195, in main bootstrap(help_triggered) File "/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/src/bootstrap/bootstrap.py", line 1169, in bootstrap build.build_bootstrap() File "/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/src/bootstrap/bootstrap.py", line 899, in build_bootstrap run(args, env=env, verbose=self.verbose) File "/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/src/bootstrap/bootstrap.py", line 190, in run raise RuntimeError(err) RuntimeError: failed to run: /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rust-stage0/bin/cargo build --manifest-path /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/src/bootstrap/Cargo.toml --verbose --verbose --locked --frozen The source of the failure is: warning: `serde_derive` (lib) generated 92 warnings Running `CARGO=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rust-stage0/bin/cargo CARGO_CRATE_NAME=serde CARGO_MANIFEST_DIR=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/ve ndor/serde-1.0.125 CARGO_PKG_AUTHORS='Erick Tryzelaar <erick.tryzelaar@gmail.com>:David Tolnay <dtolnay@gmail.com>' CARGO_PKG_DESCRIPTION='A generic serialization/deserialization framework' CARGO_PKG_HOMEPAGE='https://serde.rs' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=serde CARGO_PKG_REPOSITORY='https://github.com/serde-rs/serde' CARGO_PKG_VERSION=1.0.125 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=125 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/deps:/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rust-stage0/lib:' OUT_DIR=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/build/serde-072b7567022876b6/out /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rust-stage0/bin/rustc --crate-name serde /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/vendor/serde-1.0.125/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=0 --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="serde_derive"' --cfg 'feature="std"' -C metadata=d3a42463248ff26d -C extra-filename=-d3a42463248ff26d --out-dir /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/deps -L dependency=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/deps --extern serde_derive=/storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/deps/libserde_derive-761745a46e3f99c7.so --cap-lints warn -C linker=x86_64-pc-linux-gnu-gcc -Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros -Dwarnings --cfg ops_bound --cfg core_reverse --cfg de_boxed_c_str --cfg de_boxed_path --cfg de_rc_dst --cfg core_duration --cfg integer128 --cfg range_inclusive --cfg num_nonzero --cfg serde_derive --cfg core_try_from --cfg num_nonzero_signed --cfg systemtime_checked_add --cfg std_atomic64 --cfg std_atomic` error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /storage/strogdon/gentoo-rap/var/tmp/portage/dev-lang/rust-1.62.1/work/rustc-1.62.1-src/build/bootstrap/debug/deps/libserde_derive-761745a46e3f99c7.so) Somehow it appears that the host libc is interferring.
Created attachment 799739 [details] build.log
Please always include the full build.log and emerge --info.
Created attachment 799741 [details] emerge --info
I had a suspicion that this issue is similar to https://bugs.gentoo.org/837746 in that the interpreter is set incorrectly for provided ELF files. Following https://bugs.gentoo.org/682370 and adjusting the interpreter of the ELF files under ${WORKDIR}/rust-stage0/bin I'm able to build rust-1.62.1. A minimal patch is attached.
Created attachment 799835 [details, diff] interpreter patch
Just yesterday I ran into the same issue and I can confirm that the patch in comment 5 works for me for rust version 1.66.1.