Fixes [YOCTO #15579] Fixes [YOCTO #15735] This commit removes the LD_LIBRARY_PATH wrapper around 'cargo'. Setting the LD_LIBRARY_PATH causes many problems. Some build scripts will not run because the build scripts execute binaries from the host system that are not compatible with the target libraries. Even a simple 'cargo help build' will probably fail because it uses 'less' internally, which should not be linked against the target libraries.
This will break some commands like 'cargo test' and 'cargo run' for some hosts that have the target libraries located in base_libdir, see commit 388e7cac9f90e79ce8c3c1683d8ee0f4df1bc907. Originally, this wrapper was added for the host system tumbleweed-ty-3. I don't know if 'cargo' on the current version of this host still fails without the wrapper. If so, one would have to set the LD_LIBRARY_PATH manually. This tradeoff is acceptable because the wrapper causes more problems than it solves. A current working workaround without this commit would be to always use 'cargo.real' instead of 'cargo', which can lead to confusion. I was not able to use testsdk because it already failed on master. Signed-off-by: Jan Strater-Büddefeld <j...@mbs-solutions.de> --- meta/recipes-devtools/rust/cargo_1.82.0.bb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/meta/recipes-devtools/rust/cargo_1.82.0.bb b/meta/recipes-devtools/rust/cargo_1.82.0.bb index db18ecfda9..05ecc32ae6 100644 --- a/meta/recipes-devtools/rust/cargo_1.82.0.bb +++ b/meta/recipes-devtools/rust/cargo_1.82.0.bb @@ -45,12 +45,6 @@ do_install () { } do_install:append:class-nativesdk() { - # To quote the cargo docs, "Cargo also sets the dynamic library path when compiling - # and running binaries with commands like `cargo run` and `cargo test`". Sadly it - # sets to libdir but not base_libdir leading to symbol mismatches depending on the - # host OS. Fully set LD_LIBRARY_PATH to contain both to avoid this. - create_wrapper ${D}/${bindir}/cargo LD_LIBRARY_PATH=${libdir}:${base_libdir} - ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d mkdir "${ENV_SETUP_DIR}" CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh" -- 2.45.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#211979): https://lists.openembedded.org/g/openembedded-core/message/211979 Mute This Topic: https://lists.openembedded.org/mt/110730216/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-