Message ID | 20241227065337.1257972-2-Deepesh.Varatharajan@windriver.com |
---|---|
State | Accepted, archived |
Commit | effd4ba4c23cbf53b01116b5cc81d6a29ca3b1a6 |
Headers | show |
Series | [1/3] rust-target-config: Update the data layout for x86 and ppc targets. | expand |
On 12/27/24 14:53, Varatharajan, Deepesh via lists.openembedded.org wrote: > From: Deepesh Varatharajan<Deepesh.Varatharajan@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.Varatharajan@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 (#209095):https://lists.openembedded.org/g/openembedded-core/message/209095 > Mute This Topic:https://lists.openembedded.org/mt/110301947/3616873 > Group Owner:openembedded-core+owner@lists.openembedded.org > Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [changqing.li@windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Fri, 27 Dec 2024 at 07:54, Varatharajan, Deepesh via lists.openembedded.org <deepesh.varatharajan=windriver.com@lists.openembedded.org> wrote: > > From: Deepesh Varatharajan <Deepesh.Varatharajan@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/. What installs the redundant files in the first place? Shouldn't it be adjusted to not do that? Also, as noted elsewhere, you cannot hardcode 'poky', or special-case based on TCLIBC. Alex
On 28-12-2024 00:26, Alexander Kanavin wrote: > CAUTION: This email comes from a non Wind River email account! > Do not click links or open attachments unless you recognize the sender and know the content is safe. > > On Fri, 27 Dec 2024 at 07:54, Varatharajan, Deepesh via > lists.openembedded.org > <deepesh.varatharajan=windriver.com@lists.openembedded.org> wrote: >> From: Deepesh Varatharajan<Deepesh.Varatharajan@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/. > What installs the redundant files in the first place? Shouldn't it be > adjusted to not do that? 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. > Also, as noted elsewhere, you cannot hardcode 'poky', or special-case > based on TCLIBC. Updated the patch https://lists.openembedded.org/g/openembedded-core/topic/patch_v2_2_3_rust_fix_for/110513058 > Alex
On 09-01-2025 15:04, Deepesh Varatharajan wrote: > > > On 28-12-2024 00:26, Alexander Kanavin wrote: >> CAUTION: This email comes from a non Wind River email account! >> Do not click links or open attachments unless you recognize the sender and know the content is safe. >> >> On Fri, 27 Dec 2024 at 07:54, Varatharajan, Deepesh via >> lists.openembedded.org >> <deepesh.varatharajan=windriver.com@lists.openembedded.org> wrote: >>> From: Deepesh Varatharajan<Deepesh.Varatharajan@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/. >> What installs the redundant files in the first place? Shouldn't it be >> adjusted to not do that? > 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. Sorry about the above format 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 image, Yocto's do_package step encounters an error. To resolve this the redundant libstd-*.so file is removed during the do_install step. >> Also, as noted elsewhere, you cannot hardcode 'poky', or special-case >> based on TCLIBC. > Updated the patch > https://lists.openembedded.org/g/openembedded-core/topic/patch_v2_2_3_rust_fix_for/110513058 >> Alex
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 } addtask do_update_snapshot after do_patch