Skip to contentSkip to conversation

meta-toolchain-arago: update executable fixup for Ubuntu 20.04+ compatibility

PATCH New Andreas Dannenberg 1 participant 1 message Oct 13, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta-toolchain-arago: update executable fixup for Ubuntu 20.04+ compatibility

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

---
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(-)
meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb +1 -1
index 95ed3ffa..8fed34f5 100644
@@ -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
Signature · 1 line
2.34.1