The linux devkit installer patches up the cross toolchain executables'
dynamic library dependencies after installation to reflect the actual
installation location. This is done through the 'file' tool which
starting with Ubuntu 20.04 returns a new link type called 'static-pie
 linked' for files that will need to be patched. To accomodate this
change update the command that is used to identify executables requiring
patching with this new link type.

This fixes dynamic loader errors with cross toolchain tools like flex,
qmake, and others similar to the below:

$ make ti_sdk_arm64_release_defconfig
  LEX     scripts/kconfig/lexer.lex.c
/home/user/ti/processor-sdk-linux-am62axx-evm-08.04.00.20/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/flex:
 error while loading shared libraries: libm.so.6: cannot open shared object 
file: No such file or directory
make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127

Signed-off-by: Andreas Dannenberg <[email protected]>
---
I propose this patch to go into all current branches including
'dunfell', even though we don't officially support Ubunut 22.04 yet for
example. Enough folks try and use it. This patch makes it actually work.

 meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb 
b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb
index 95ed3ffa..8fed34f5 100644
--- a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb
+++ b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb
@@ -303,7 +303,7 @@ if [ "$dl_path" = "" ] ; then
        echo "SDK could not be set up. Relocate script unable to find 
ld-linux.so. Abort!"
        exit 1
 fi
-executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111 -exec 
file '{}' \;| grep "\(executable\|dynamically linked\)" | cut -f 1 -d ':')
+executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111 -exec 
file '{}' \;| grep "\(executable\|dynamically linked\|static-pie linked\)" | 
cut -f 1 -d ':')
 
 tdir=`mktemp -d`
 if [ x$tdir = x ] ; then
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14083): 
https://lists.yoctoproject.org/g/meta-arago/message/14083
Mute This Topic: https://lists.yoctoproject.org/mt/94301494/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to