aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/platforms/linux.py
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2023-07-17 16:50:36 +0200
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2023-07-26 15:38:14 +0200
commit26a006cc76fbc65cae1b688da6f9bf5aa2456867 (patch)
tree87ff321917b850ccd64b913b76e1a5123a77d1da /build_scripts/platforms/linux.py
parentdde6245d58f6af76ec49bb9b509a103374ac4c36 (diff)
Android Deployment: Rpath changes through linker flags
- Using patchelf to modify the binaries for rpath changes corrupts the binary. This leads to binaries not being able to be loaded at startup by the Android runtime which is required for establishing callbacks from C++ back to Python. - Using linker flags -Wl,-rpath='$ORIGIN' -Wl,-rpath='$ORIGIN/Qt/lib' and disabling patchelf for Android cross compilation solves the issue Task-number: PYSIDE-1612 Change-Id: I70e74d3ca2b0bc65e2565268c36038eeb7c47ddd Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'build_scripts/platforms/linux.py')
-rw-r--r--build_scripts/platforms/linux.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/build_scripts/platforms/linux.py b/build_scripts/platforms/linux.py
index 7bb3bdeb9..835cc4dd0 100644
--- a/build_scripts/platforms/linux.py
+++ b/build_scripts/platforms/linux.py
@@ -72,7 +72,8 @@ def prepare_standalone_package_linux(pyside_build, _vars, cross_build=False, is_
copy_icu_libs(pyside_build._patchelf_path, destination_qt_lib_dir)
# Set RPATH for Qt libs.
- pyside_build.update_rpath_for_linux_qt_libraries(destination_qt_lib_dir)
+ if not is_android:
+ pyside_build.update_rpath_for_linux_qt_libraries(destination_qt_lib_dir)
# Patching designer to use the Qt libraries provided in the wheel
if config.is_internal_pyside_build() and not OPTION['NO_QT_TOOLS']:
@@ -120,10 +121,11 @@ def prepare_standalone_package_linux(pyside_build, _vars, cross_build=False, is_
_vars=_vars)
copied_plugins = pyside_build.get_shared_libraries_in_path_recursively(
qml_plugins_target)
- pyside_build.update_rpath_for_linux_plugins(
- copied_plugins,
- qt_lib_dir=destination_qt_lib_dir,
- is_qml_plugin=True)
+ if not is_android:
+ pyside_build.update_rpath_for_linux_plugins(
+ copied_plugins,
+ qt_lib_dir=destination_qt_lib_dir,
+ is_qml_plugin=True)
if copy_translations:
# <qt>/translations/* ->