From 03bcdc9186a5ea4e5ffe466221f899922ba6507b Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 29 Oct 2021 08:56:57 +0200 Subject: [PATCH] Fix RPATH of Qbs binaries when built with Qt 6 The build system for Qt Creator ensures that we have the right relative RPATH to Qt for the packages. We still check if we need to fix the RPATHs when deploying Qt, and the Qbs build relies on that. That part was broken for Qt 6 since it looked for libQt5* to decide if the relative RPATH to Qt must be added. Remove the Qt version number from the check. Change-Id: Ib9d0408943d61364bfe9c8813a55bf60145b7972 Reviewed-by: Ivan Komissarov --- scripts/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/common.py b/scripts/common.py index 7b7936a8add..a04beb27efc 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -164,13 +164,13 @@ def fix_rpaths(path, qt_deploy_path, qt_install_info, chrpath=None): if len(rpath) <= 0: return # remove previous Qt RPATH - new_rpath = list(filter(lambda path: not path.startswith(qt_install_prefix) and not path.startswith(qt_install_libs), - rpath)) + new_rpath = [path for path in rpath if not path.startswith(qt_install_prefix) + and not path.startswith(qt_install_libs)] # check for Qt linking lddOutput = subprocess.check_output(['ldd', filepath]) lddDecodedOutput = lddOutput.decode(encoding) if encoding else lddOutput - if lddDecodedOutput.find('libQt5') >= 0 or lddDecodedOutput.find('libicu') >= 0: + if lddDecodedOutput.find('libQt') >= 0 or lddDecodedOutput.find('libicu') >= 0: # add Qt RPATH if necessary relative_path = os.path.relpath(qt_deploy_path, os.path.dirname(filepath)) if relative_path == '.':