Message ID | 20221013114104.144903-1-dannenberg@ti.com |
---|---|
State | Accepted, archived |
Delegated to: | Ryan Eatmon |
Headers | show |
Series | [master/kirkstone/dunfell] meta-toolchain-arago: update executable fixup for Ubuntu 20.04+ compatibility | expand |
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
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 <dannenberg@ti.com> --- 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(-)