aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-09-21 10:48:02 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-26 13:19:18 +0000
commitf2d8ac47f397fb56f4c3ee9f400af0a97b892c3c (patch)
tree9c9a06758bb4bbb90fa716ec42690083204bd9b1
parentcff1160abb97e3f689ff47b4cf0d48fafb1a0be4 (diff)
build system: Disable checking ICU libs for cross builds
ldd is used to determine the location of the ICU libs, which does not work for cross builds. Fixes: PYSIDE-2060 Change-Id: Idbf8c6e9239f4623b7c11c646a616ef44e8c3ecf Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit a96676f96ae6011c26dd58567d993cebe4d9d6cf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--build_scripts/main.py2
-rw-r--r--build_scripts/platforms/linux.py9
-rw-r--r--build_scripts/platforms/unix.py4
-rw-r--r--build_scripts/utils.py2
4 files changed, 10 insertions, 7 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index daf7d2f70..d69a5324b 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -960,7 +960,7 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin):
_vars['dbg_postfix'] = OPTION["DEBUG"] and "_d" or ""
return prepare_packages_win32(self, _vars)
else:
- return prepare_packages_posix(self, _vars)
+ return prepare_packages_posix(self, _vars, self.is_cross_compile)
except IOError as e:
print('setup.py/prepare_packages: ', e)
raise
diff --git a/build_scripts/platforms/linux.py b/build_scripts/platforms/linux.py
index b0c025bc8..bf4db5664 100644
--- a/build_scripts/platforms/linux.py
+++ b/build_scripts/platforms/linux.py
@@ -46,7 +46,7 @@ from ..utils import (copy_icu_libs, copydir, copyfile, find_files_using_glob,
from ..versions import PYSIDE
-def prepare_standalone_package_linux(self, _vars):
+def prepare_standalone_package_linux(self, _vars, cross_build=False):
built_modules = _vars['built_modules']
constrain_modules = None
@@ -86,10 +86,11 @@ def prepare_standalone_package_linux(self, _vars):
# Qt is built against system ICU, or in the Coin CI where ICU
# libs are in a different directory) try to find out / resolve
# which ICU libs are used by QtCore (if used at all) using a
- # custom written ldd, and copy the ICU libs to the Pyside Qt
- # dir if necessary. We choose the QtCore lib to inspect, by
+ # custom written ldd (non-cross build only), and copy the ICU
+ # libs to the Pyside Qt dir if necessary.
+ # We choose the QtCore lib to inspect, by
# checking which QtCore library the shiboken6 executable uses.
- if not maybe_icu_libs:
+ if not maybe_icu_libs and not cross_build:
copy_icu_libs(self._patchelf_path, resolved_destination_lib_dir)
# Set RPATH for Qt libs.
diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py
index 904ae9c0e..ec0a8bb9c 100644
--- a/build_scripts/platforms/unix.py
+++ b/build_scripts/platforms/unix.py
@@ -74,7 +74,7 @@ def _copy_gui_executable(name, _vars=None):
return _unix_copy_gui_executable(name, _vars)
-def prepare_packages_posix(self, _vars):
+def prepare_packages_posix(self, _vars, cross_build=False):
executables = []
libexec_executables = []
@@ -245,7 +245,7 @@ def prepare_packages_posix(self, _vars):
if sys.platform == 'darwin':
prepare_standalone_package_macos(self, _vars)
else:
- prepare_standalone_package_linux(self, _vars)
+ prepare_standalone_package_linux(self, _vars, cross_build)
if config.is_internal_shiboken_generator_build():
# Copy over clang before rpath patching.
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index 6f44ae5c2..3772a14df 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -947,6 +947,8 @@ def find_qt_core_library_glob(lib_dir):
# ldd for the specified platforms.
# This has less priority because ICU libs are not used in the default
# Qt configuration build.
+# Note: Uses ldd to query shared library dependencies and thus does not
+# work for cross builds.
def copy_icu_libs(patchelf, destination_lib_dir):
"""
Copy ICU libraries that QtCore depends on,