Bootstrap failed when multilibs are enabled in yocto environment from 1.83 #138983
Labels
C-bug
Category: This is a bug.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
In Yocto, we are attempting to build Rust with multilibs enabled. During the process, due to an additional check introduced in Rust 1.83 (68034f8), the bootstrap process attempts to execute the following command:
rust/build/tmp/work/core2-64-poky-linux/rust/1.83.0/rustc-1.83.0-src/build/x86_64-unknown-linux-gnu/stage1/bin/rustc --target=x86_64-poky-linux-gnu --print=file-names --crate-type=proc-macro
However, it fails with the following error:
rust/build/tmp/work/core2-64-poky-linux/rust/1.83.0/rustc-1.83.0-src/build/x86_64-unknown-linux-gnu/stage1/bin/rustc: error while loading shared libraries: librustc_driver-8f30db6f3d93a748.so: cannot open shared object file: No such file or directory
The failure occurs because the dependent .so files for rustc are placed inside the lib64 directory, but rustc is trying to find them in the lib directory. This issue only happens in Stage 1 of the build process. In Stage 2, the behavior works as expected, with rustc correctly searching in the lib64 directory.
For stage1 :
For stage2 :
During the bootstrapping process, we've noticed that when RPATH is set to true for Rust, it points to
$ORIGIN/../lib
on Linux systems. However, in stage2, it is pointing to$ORIGIN/../lib64
, which seems correct. Is this the expected behavior, or are we missing something?The text was updated successfully, but these errors were encountered: