On 12/27/24 14:53, Varatharajan, Deepesh via lists.openembedded.org wrote:
From: Deepesh Varatharajan<deepesh.varathara...@windriver.com>

The `do_package` task fail with below error due to multiple `libstd.so` files 
installed in lib dir.

---------------------------------------------------------------------------------------------------------------------------
ERROR: rust-1.81.0-r0 do_package: rust-rustdoc: Multiple shlib providers for 
libstd-20c3de2d9292cd03.so: rust,
rust (used by files: 
poky/build/tmp/work/core2-64-poky-linux/rust/1.81.0/packages-split/rust-rustdoc/usr/bin/rustdoc)
ERROR: rust-1.81.0-r0 do_package: rust-tools-rustfmt: Multiple shlib providers 
for libstd-20c3de2d9292cd03.so: rust,
rust (used by files: 
poky/build/tmp/work/core2-64-poky-linux/rust/1.81.0/packages-split/rust-tools-rustfmt/usr/bin/rustfmt)
ERROR: rust-1.81.0-r0 do_package: rust: Multiple shlib providers for 
libstd-20c3de2d9292cd03.so: rust,
rust (used by files: 
poky/build/tmp/work/core2-64-poky-linux/rust/1.81.0/packages-split/rust/usr/bin/rustc)
ERROR: rust-1.81.0-r0 do_package: rust: Multiple shlib providers for 
libstd-20c3de2d9292cd03.so: rust,
rust (used by files: 
poky/build/tmp/work/core2-64-poky-linux/rust/1.81.0/packages-split/rust/usr/bin/clippy-driver)
ERROR: rust-1.81.0-r0 do_package: rust: Multiple shlib providers for 
libstd-20c3de2d9292cd03.so: rust,
rust (used by files: 
poky/build/tmp/work/core2-64-poky-linux/rust/1.81.0/packages-split/rust/usr/bin/cargo-clippy)
ERROR: rust-1.81.0-r0 do_package: rust: Multiple shlib providers for 
libstd-20c3de2d9292cd03.so: rust,
rust (used by files: 
poky/build/tmp/work/core2-64-poky-linux/rust/1.81.0/packages-split/rust/usr/lib/
librustc_driver-fc36770e343ef852.so)
---------------------------------------------------------------------------------------------------------------------------

To fix the redundant `libstd.so` files are removed from the usr/lib/.

Signed-off-by: Deepesh Varatharajan<deepesh.varathara...@windriver.com>
---
  meta/recipes-devtools/rust/rust_1.80.1.bb | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/meta/recipes-devtools/rust/rust_1.80.1.bb 
b/meta/recipes-devtools/rust/rust_1.80.1.bb
index eae1f28bb8..2118c2fe9d 100644
--- a/meta/recipes-devtools/rust/rust_1.80.1.bb
+++ b/meta/recipes-devtools/rust/rust_1.80.1.bb
@@ -271,6 +271,7 @@ rust_do_install:class-nativesdk() {
      rm ${D}${libdir}/rustlib/uninstall.sh
      rm ${D}${libdir}/rustlib/install.log
      rm ${D}${libdir}/rustlib/manifest*
+    rm ${D}${libdir}/rustlib/${TARGET_ARCH}-pokysdk-linux-gnu/lib/libstd-*.so
  }
EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt" @@ -294,6 +295,11 @@ rust_do_install:class-target() { rm ${D}${libdir}/rustlib/uninstall.sh rm ${D}${libdir}/rustlib/install.log rm ${D}${libdir}/rustlib/manifest* + if [ "${TCLIBC}" = "musl" ]; then
+       rm -f 
${D}${libdir}/rustlib/${TARGET_ARCH}-poky-linux-musl/lib/libstd-*.so
+    elif [ "${TCLIBC}" = "glibc" ]; then
+       rm -f 
${D}${libdir}/rustlib/${TARGET_ARCH}-poky-linux-gnu/lib/libstd-*.so
+    fi

Hardcode "poky"/"pokysdk" here should not proper.

//Changqing

  }
addtask do_update_snapshot after do_patch



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#209098): 
https://lists.openembedded.org/g/openembedded-core/message/209098
Mute This Topic: https://lists.openembedded.org/mt/110301947/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to