Skip to content

Commit 94a2769

Browse files
Deepesh Varatharajanrpurdie
authored andcommitted
rust: Fix build failure when multilibs are enabled
When multilibs are enabled, rustc could not find dynamic libraries in the lib64 directory due to the bootstrapping process searching in the lib directory. This commit exports both lib and lib64 paths to ensure correct library detection. dropped: revert-Zdual-proc-macros-additional-check.patch We reverted the previous commit to prevent errors when rustc cannot find dynamic libraries. Since the issue has been resolved by exporting the lib paths, this revert is no longer necessary, as it won't cause any errors moving forward. Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 parent fdb357c commit 94a2769

File tree

3 files changed

+3
-44
lines changed

3 files changed

+3
-44
lines changed

meta/recipes-devtools/rust/files/revert-Zdual-proc-macros-additional-check.patch

Lines changed: 0 additions & 43 deletions
This file was deleted.

meta/recipes-devtools/rust/rust-source.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
77
file://oeqa-selftest-Increase-timeout-in-process-sigpipe-ru.patch;patchdir=${RUSTSRC} \
88
file://0001-src-core-build_steps-tool.rs-switch-off-lto-for-rust.patch;patchdir=${RUSTSRC} \
99
file://revert-link-std-statically-in-rustc_driver-feature.patch;patchdir=${RUSTSRC} \
10-
file://revert-Zdual-proc-macros-additional-check.patch;patchdir=${RUSTSRC} \
1110
"
1211
SRC_URI[rust.sha256sum] = "7b11d4242dab0921a7d54758ad3fe805153c979c144625fecde11735760f97df"
1312

meta/recipes-devtools/rust/rust_1.83.0.bb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ rust_runx () {
223223

224224
oe_cargo_fix_env
225225

226+
# When multilibs are enabled, rustc can't find dynamic libraries in "lib64" because the bootstrapping process looks in "lib". To fix this, export both paths:
227+
export LD_LIBRARY_PATH=${S}/build/${RUST_BUILD_SYS}/stage1/lib:${S}/build/${RUST_BUILD_SYS}/stage1/lib64:$LD_LIBRARY_PATH
228+
226229
python3 src/bootstrap/bootstrap.py ${@oe.utils.parallel_make_argument(d, '-j %d')} "$@" --verbose
227230
}
228231
rust_runx[vardepsexclude] += "PARALLEL_MAKE"

0 commit comments

Comments
 (0)