Skip to content

Commit dab9a73

Browse files
Deepesh Varatharajang-scott-murray
authored andcommitted
rust: Fix for duplicate libstd.so
During the Rust build process, multiple copies of libstd-*.so are generated, as Rust copies the required files from the stage2 build artifacts to the target image directory. When these build binaries are copied to the image, Yocto's do_package step encounters an error. To resolve this, the redundant libstd-*.so files are removed during the do_install step. ----------------------------------------------------------------------------------------------- ERROR: rust-1.81.0-r0 do_package: rust: Multiple shlib providers for libstd-20c3de2d9292cd03.so:.. .... ----------------------------------------------------------------------------------------------- Multiple copies of libstd-*.so are generated during the Rust build process. The redundant files are removed during the do_install step. Signed-off-by: Deepesh Varatharajan <[email protected]> Signed-off-by: Richard Purdie <[email protected]> (adapted from oe-core commit effd4ba4c23cbf53b01116b5cc81d6a29ca3b1a6) Signed-off-by: Scott Murray <[email protected]>
1 parent 67faa3f commit dab9a73

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

recipes-devtools/rust/rust_1.80.1.bb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ rust_do_install:class-nativesdk() {
271271
rm ${D}${libdir}/rustlib/uninstall.sh
272272
rm ${D}${libdir}/rustlib/install.log
273273
rm ${D}${libdir}/rustlib/manifest*
274+
rm ${D}${libdir}/rustlib/${RUST_HOST_SYS}/lib/libstd*.so
274275
}
275276

276277
EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt"
@@ -294,6 +295,7 @@ rust_do_install:class-target() {
294295
rm ${D}${libdir}/rustlib/uninstall.sh
295296
rm ${D}${libdir}/rustlib/install.log
296297
rm ${D}${libdir}/rustlib/manifest*
298+
rm ${D}${libdir}/rustlib/${RUST_HOST_SYS}/lib/libstd*.so
297299
}
298300

299301
addtask do_update_snapshot after do_patch

0 commit comments

Comments
 (0)