From 6c6bea26adb26ec71e45adba8db30e6abaa4f460 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 5 Apr 2020 23:52:26 +0200 Subject: [PATCH] Fix Linux installer - #7977 ldd may not print errors to stderr (Debian GLIBC 2.28-10 doesn't), and hence the current check did nothing on debian and derivative systems. While on other GNU/Linux distros (e.g. openSuSe), other errors do show up (e.g. checking session-utils shell script -> "not a dynamic executable") This explicitly checks for missing libraries hopefully in a distro independent way. --- tools/linux_packaging/stage2.run.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/linux_packaging/stage2.run.in b/tools/linux_packaging/stage2.run.in index 470ecccc07..25fef8d4f7 100755 --- a/tools/linux_packaging/stage2.run.in +++ b/tools/linux_packaging/stage2.run.in @@ -488,8 +488,8 @@ echo "" LIB_ERROR="F" LD_PATH=`pwd`/${BUNDLE_DIR}/lib -# check the main App -LDD_RESULT=$(LD_LIBRARY_PATH=${LD_PATH} ldd ${BUNDLE_DIR}/*/${PGM_NAME_LOWER}-* 2>&1 > /dev/null | grep -v "no version information") +# check the main App(s) +LDD_RESULT=$(LANG=C LD_LIBRARY_PATH=${LD_PATH} ldd ${BUNDLE_DIR}/*/${PGM_NAME_LOWER}-* 2>&1 | grep "not found/") if [ -n "$LDD_RESULT" ]; then @@ -502,7 +502,7 @@ LIB_FILES=$(find ${BUNDLE_DIR}/lib -name "*.so" -type f) for path in $LIB_FILES do - LDD_RESULT=$(LD_LIBRARY_PATH=${LD_PATH} ldd $path 2>&1 > /dev/null | grep -v "no version information") + LDD_RESULT=$(LANG=C LD_LIBRARY_PATH=${LD_PATH} ldd $path 2>&1 | grep "not found") if [ -n "$LDD_RESULT" ]; then echo "$LDD_RESULT"