-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt5: fix some Android and iOS errors #15539
Merged
conan-center-bot
merged 8 commits into
conan-io:master
from
kambala-decapitator:package/qt
Apr 12, 2023
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
362baf0
iOS: link to IOKit when building with apple-clang >= 14
kambala-decapitator 696ecc7
Android doesn't require CROSS_COMPILE option
kambala-decapitator ae68382
Android: disable backtrace properly
kambala-decapitator 94b95a9
Android: link to ssl and crypto libs without arch suffix
kambala-decapitator 19896eb
Android: add option for Android SDK path
kambala-decapitator b5c4396
Android: add patch to support NDK >= 23
kambala-decapitator 1d287aa
Android: use correct lib suffix
kambala-decapitator 3639383
Android: use android_abi() instead of hardcoding
kambala-decapitator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp | ||
index 89f49324c..dedf78fe5 100644 | ||
--- a/src/corelib/global/qlogging.cpp | ||
+++ b/src/corelib/global/qlogging.cpp | ||
@@ -107,7 +107,13 @@ | ||
# define QLOGGING_HAVE_BACKTRACE | ||
# endif | ||
# elif (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>)) | ||
-# define QLOGGING_HAVE_BACKTRACE | ||
+# ifdef __ANDROID_API__ | ||
+# if __ANDROID_API__ >= 33 | ||
+# define QLOGGING_HAVE_BACKTRACE | ||
+# endif | ||
+# else | ||
+# define QLOGGING_HAVE_BACKTRACE | ||
+# endif | ||
# endif | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From 49f62e8c5a8aef4c0b7fd6867a30e653d2f5dd98 Mon Sep 17 00:00:00 2001 | ||
From: Alexey Edelev <alexey.edelev@qt.io> | ||
Date: Mon, 21 Nov 2022 15:03:17 +0100 | ||
Subject: [PATCH] Remove QMAKE_RANLIB and QMAKE_LINK_SHLIB from android/default_pre.prf | ||
|
||
The values should come from android-clang mkspecs. The hardcoded | ||
values don't work correctly with recent Android NDKs. | ||
|
||
Pick-to: 6.4 6.2 5.15 | ||
Fixes: QTBUG-108662 | ||
Change-Id: Ie153a50ee0c49bd4f0704b588a4e2c87a05c1063 | ||
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> | ||
--- | ||
|
||
diff --git a/mkspecs/features/android/default_pre.prf b/mkspecs/features/android/default_pre.prf | ||
index 9f90dcb..2328b72 100644 | ||
--- a/mkspecs/features/android/default_pre.prf | ||
+++ b/mkspecs/features/android/default_pre.prf | ||
@@ -76,8 +76,6 @@ | ||
else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android- | ||
else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi- | ||
|
||
-QMAKE_RANLIB = $${CROSS_COMPILE}ranlib | ||
-QMAKE_LINK_SHLIB = $$QMAKE_LINK | ||
QMAKE_LFLAGS = | ||
|
||
QMAKE_LIBS_PRIVATE = -llog -lz -lm -ldl -lc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri | ||
index 230c45c26..d7527949e 100644 | ||
--- a/src/network/ssl/ssl.pri | ||
+++ b/src/network/ssl/ssl.pri | ||
@@ -117,7 +117,7 @@ qtConfig(ssl) { | ||
|
||
qtConfig(openssl-linked): { | ||
android { | ||
- build_pass|single_android_abi: LIBS_PRIVATE += -lssl_$${QT_ARCH} -lcrypto_$${QT_ARCH} | ||
+ build_pass|single_android_abi: LIBS_PRIVATE += -lssl -lcrypto | ||
} else: QMAKE_USE_FOR_PRIVATE += openssl | ||
} else: \ | ||
QMAKE_USE_FOR_PRIVATE += openssl/nolink |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have have a link to an issue on bugreports.qt.io or to a patch on codereview.qt-project.org?
This level of android api should supported out of the box https://doc.qt.io/qt-5/android.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately, no such issue has been raised yet. I've also checked backports in https://invent.kde.org/qt/qt/qtbase/-/commits/kde/5.15 but there's also no such fix.
according to https://doc.qt.io/qt-5/android-getting-started.html Qt 5.15 has been tested only with NDK 20b and 21, pretty sure those toolchain versions don't have
backtrace
functions orexecinfo.h
.I only found https://bugreports.qt.io/browse/QTBUG-108054 but that applies to Qt 6 only, and the patch can't be applied to Qt 5 because of heavy changes that Qt 6 made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thanks for the clarifications