If these directories are removed from binary, it does not find the
needed libraries it may need from recipe-sysroot-native, e.g. when
building with clang+llvm-runtime, it also builds rust-native with
clang-native and links to libc++.so.1 which will be part of
native sysroot but may not be available on build host system install
and it loses that ability to find it in native sysroot and we see errors
like
llvm-config: libc++.so.1 not found.

during rust bootstrap execution.

This patch stops editing the binary, so it can find the dependencies in
native sysroot it
needs for running itself when placed in target directory ( target sysroot )
yet when llvm-config is invoked the reported paths are relative to
taregt sysroot which is what we expect, so functionality remains as it is.

Signed-off-by: Khem Raj <raj.k...@gmail.com>
---
When using libc++ instead of libstdc++, llvm-config is unable to find
libc++.so.1 from native sysroot due to llvm-config copying dance we do.
---
 meta/recipes-devtools/rust/rust_1.70.0.bb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/recipes-devtools/rust/rust_1.70.0.bb 
b/meta/recipes-devtools/rust/rust_1.70.0.bb
index 16d433910f8..98cc56c0c91 100644
--- a/meta/recipes-devtools/rust/rust_1.70.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.70.0.bb
@@ -205,7 +205,6 @@ rust_runx () {
     if [ ${RUST_ALTERNATE_EXE_PATH_NATIVE} != ${RUST_ALTERNATE_EXE_PATH} -a ! 
-f ${RUST_ALTERNATE_EXE_PATH} ]; then
         mkdir -p `dirname ${RUST_ALTERNATE_EXE_PATH}`
         cp ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH}
-        chrpath -d ${RUST_ALTERNATE_EXE_PATH}
     fi
 
     oe_cargo_fix_env

---
base-commit: abf3e54d118139e1fcd952a691b77a0c53db6a30
change-id: 20231114-rust-with-clang-21ace8ddf286

Best regards,
-- 
Khem Raj <raj.k...@gmail.com>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#190511): 
https://lists.openembedded.org/g/openembedded-core/message/190511
Mute This Topic: https://lists.openembedded.org/mt/102585532/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