From 6d5111153d0c27f5b3cbaab8cd17545252b6cc70 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Thu, 17 Dec 2020 19:47:59 +0100 Subject: [PATCH] bundler: detect missing libraries --- library-bundler | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/library-bundler b/library-bundler index d5a43971..db2f1ca1 100755 --- a/library-bundler +++ b/library-bundler @@ -2,6 +2,9 @@ set -e +export LANG='C.UTF-8' +export LANGUAGE="${LANG}" + Common::noOp () { true } @@ -53,7 +56,7 @@ Multi::excludeLdd () { | egrep -v '/libatk|/libgdk|/libgtk|/libgio|/libglib|/libgmodule|/libgobject|/libcairo|/libpango|/libfontconfig|/libfreetype' ;; 'windows') - egrep -i '\.dll => [A-Z]:\\msys64\\' \ + egrep -i '\.dll => [A-Z]:\\msys64\\' ;; esac } @@ -182,11 +185,18 @@ Multi::bundleGtkDepsFromFile () { Multi::bundleLibFromFile () { local exe_file="${1}" + local lib_file Multi::printLdd "${exe_file}" \ | Multi::filterLib \ | while read lib_file do + if [ "${lib_file}" = 'not found' ] + then + printf 'ERROR: library not found while bundling %s (but link worked)\n' "${exe_file}" >&2 + Multi::printLdd "${exe_file}" | grep 'not found' + exit 1 + fi lib_basename="$(basename "${lib_file}")" if [ -f "${lib_dir}/${lib_basename}" ] -- 2.39.2