Skip to content
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 crash at launch on Android < 23 #23659

Closed

Conversation

kambala-decapitator
Copy link
Contributor

Specify library name and version: Qt/5.15.13

Support of Android 21 & 22 is broken in Qt 5.15.13, this patch fixes it.

https://bugreports.qt.io/browse/QTBUG-120627


Copy link
Contributor

🤖 Beep Boop! This pull request is making changes to 'recipes/qt//'.

👋 @ericLemanissier @jwillikers @MartinDelille @paulharris you might be interested. 😉

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 1 (dc79231a882d45603921b2a69bd60e17bfa61aac):

  • qt/5.15.11:
    Didn't run or was cancelled before finishing

  • qt/5.15.12:
    Didn't run or was cancelled before finishing

  • qt/5.15.13:
    CI failed to create some packages (All logs)

    Logs for packageID 17d79bfffb1dd90b1d2c2f1a3e17acc5f61a8305:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=5
    os=Linux
    [options]
    qt:shared=False
    
    [...]
    dpkg-query: no packages found matching xkb-data
    debconf: delaying package configuration, since apt-utils is not installed
    dpkg-query: no packages found matching libfontenc-dev
    dpkg-query: no packages found matching libice-dev
    dpkg-query: no packages found matching libsm-dev
    dpkg-query: no packages found matching libxaw7-dev
    dpkg-query: no packages found matching libxcomposite-dev
    dpkg-query: no packages found matching libxcursor-dev
    dpkg-query: no packages found matching libxi-dev
    dpkg-query: no packages found matching libxinerama-dev
    dpkg-query: no packages found matching libxkbfile-dev
    dpkg-query: no packages found matching libxmu-dev
    dpkg-query: no packages found matching libxmuu-dev
    dpkg-query: no packages found matching libxpm-dev
    dpkg-query: no packages found matching libxrandr-dev
    dpkg-query: no packages found matching libxrender-dev
    dpkg-query: no packages found matching libxres-dev
    dpkg-query: no packages found matching libxss-dev
    dpkg-query: no packages found matching libxt-dev
    dpkg-query: no packages found matching libxv-dev
    dpkg-query: no packages found matching libxcb-render-util0-dev
    dpkg-query: no packages found matching libxcb-xkb-dev
    dpkg-query: no packages found matching libxcb-icccm4-dev
    dpkg-query: no packages found matching libxcb-image0-dev
    dpkg-query: no packages found matching libxcb-keysyms1-dev
    dpkg-query: no packages found matching libxcb-xinerama0-dev
    dpkg-query: no packages found matching uuid-dev
    dpkg-query: no packages found matching libxcb-cursor-dev
    dpkg-query: no packages found matching libxcb-composite0-dev
    dpkg-query: no packages found matching libxcb-ewmh-dev
    dpkg-query: no packages found matching libxcb-res0-dev
    debconf: delaying package configuration, since apt-utils is not installed
    dpkg-query: no packages found matching libxcb-util-dev
    debconf: delaying package configuration, since apt-utils is not installed
    WARN: *** Conan 1 is legacy and on a deprecation path ***
    WARN: *** Please upgrade to Conan 2 ***
    WARN: openssl/3.2.1: requirement zlib/[>=1.2.11 <2] overridden by qt/5.15.13 to zlib/1.3.1 
    WARN: pcre2/10.42: requirement zlib/[>=1.2.11 <2] overridden by qt/5.15.13 to zlib/1.3.1 
    WARN: freetype/2.13.2: requirement libpng/[>=1.6 <2] overridden by qt/5.15.13 to libpng/1.6.42 
    WARN: freetype/2.13.2: requirement zlib/[>=1.2.10 <2] overridden by qt/5.15.13 to zlib/1.3.1 
    WARN: libpng/1.6.42: requirement zlib/[>=1.2.11 <2] overridden by freetype/2.13.2 to zlib/1.3.1 
    WARN: libxml2/2.12.6: requirement zlib/[>=1.2.11 <2] overridden by xkbcommon/1.5.0 to zlib/1.3.1 
    WARN: wayland/1.22.0: requirement libxml2/[>=2.12.5 <3] overridden by xkbcommon/1.5.0 to libxml2/2.12.6 
    qt/5.15.13: WARN: /home/conan/workspace/prod-v1/bsr/27017/dcefd/.conan/data/qt/5.15.13/_/_/source/patches/5.15.13-android-21-22.diff: file 2/2:	 b'src/android/jar/src/org/qtproject/qt5/android/QtLayout.java'
    qt/5.15.13: WARN: /home/conan/workspace/prod-v1/bsr/27017/dcefd/.conan/data/qt/5.15.13/_/_/source/patches/5.15.13-android-21-22.diff:  hunk no.1 doesn't match source file at line 106
    qt/5.15.13: WARN: /home/conan/workspace/prod-v1/bsr/27017/dcefd/.conan/data/qt/5.15.13/_/_/source/patches/5.15.13-android-21-22.diff:   expected: b'       final WindowManager windowManager = activity.getWindowManager();'
    qt/5.15.13: WARN: /home/conan/workspace/prod-v1/bsr/27017/dcefd/.conan/data/qt/5.15.13/_/_/source/patches/5.15.13-android-21-22.diff:   actual  : b'        final WindowManager windowManager = activity.getWindowManager();'
    ERROR: qt/5.15.13: Error in source() method, line 470
    	apply_conandata_patches(self)
    	ConanException: Failed to apply patch: /home/conan/workspace/prod-v1/bsr/27017/dcefd/.conan/data/qt/5.15.13/_/_/source/patches/5.15.13-android-21-22.diff
    
  • qt/5.15.10:
    Didn't run or was cancelled before finishing

  • qt/5.15.9:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 1 (dc79231a882d45603921b2a69bd60e17bfa61aac):

  • qt/5.15.10:
    Didn't run or was cancelled before finishing

  • qt/5.15.9:
    Didn't run or was cancelled before finishing

  • qt/5.15.13:
    CI failed to create some packages (All logs)

    Logs for packageID 3257a71c6b9d9cab1dd43ae85cdacae7c427a54b:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    automake/1.16.5: Retrieving package 9a4eb3c8701508aa9458b1a73d0633783ecc2270 from remote 'conan-center' 
    automake/1.16.5: Package installed 9a4eb3c8701508aa9458b1a73d0633783ecc2270
    automake/1.16.5: Downloaded package revision 9719e51a6a62041af6a63e00eef35434
    freetype/2.13.2: Retrieving package 739e41967cd8e90e567861f59c4c6a1087fe7977 from remote 'conan-center' 
    freetype/2.13.2: Package installed 739e41967cd8e90e567861f59c4c6a1087fe7977
    freetype/2.13.2: Downloaded package revision 9ec38a53fe729b5396239d0007e34808
    libmysqlclient/8.1.0: Retrieving package b855f15ef0b1072f19129b3d782929ed6e024271 from remote 'conan-center' 
    libmysqlclient/8.1.0: Downloading 15.2MB conan_package.tgz
    libmysqlclient/8.1.0: Decompressing 15.2MB conan_package.tgz
    libmysqlclient/8.1.0: Package installed b855f15ef0b1072f19129b3d782929ed6e024271
    libmysqlclient/8.1.0: Downloaded package revision bad2712a516073e176cfb25dc98e782e
    wayland/1.22.0: Retrieving package 9ef61cfe051f69b8cce843b72e11408e15171fab from remote 'conan-center' 
    wayland/1.22.0: Package installed 9ef61cfe051f69b8cce843b72e11408e15171fab
    wayland/1.22.0: Downloaded package revision 2f4a3f922deed888a7661360b8094ee3
    fontconfig/2.15.0: Retrieving package 1168b4ee03edca1ebd09dc801dea3887715d7b46 from remote 'conan-center' 
    fontconfig/2.15.0: Package installed 1168b4ee03edca1ebd09dc801dea3887715d7b46
    fontconfig/2.15.0: Downloaded package revision ea183a96cff3493459b24e41b73c1b6e
    libtool/2.4.7: Retrieving package b647c43bfefae3f830561ca202b6cfd935b56205 from remote 'conan-center' 
    libtool/2.4.7: Package installed b647c43bfefae3f830561ca202b6cfd935b56205
    libtool/2.4.7: Downloaded package revision f4c8da5bffcf49cdf1b4ce011cab7737
    xkbcommon/1.5.0: Retrieving package 24060eb1e52f1ce13c6102f08ed64ce54503c767 from remote 'conan-center' 
    xkbcommon/1.5.0: Package installed 24060eb1e52f1ce13c6102f08ed64ce54503c767
    xkbcommon/1.5.0: Downloaded package revision 4e65c470c8faadb1d7e5431a965dc603
    odbc/2.3.11: Retrieving package 64f133e39b3766eba575e24f9b8c59906d2f5117 from remote 'conan-center' 
    odbc/2.3.11: Package installed 64f133e39b3766eba575e24f9b8c59906d2f5117
    odbc/2.3.11: Downloaded package revision 634241dfddb0bd2235f9031236e68d5a
    pcre2/10.42: Appending PATH environment variable: /home/conan/workspace/prod-v2/bsr/24030/daaac/p/pcre2d184a55a6d726/p/bin
    libxml2/2.12.6: Appending PATH environment variable: /home/conan/workspace/prod-v2/bsr/24030/daaac/p/libxm6ac9ae515615e/p/bin
    libtool/2.4.7: WARN: The use of 'unix_path_legacy_compat' is deprecated in Conan 2.0 and does not perform path conversions. This is retained for compatibility with Conan 1.x and will be removed in a future version.
    libtool/2.4.7: WARN: The use of 'unix_path_legacy_compat' is deprecated in Conan 2.0 and does not perform path conversions. This is retained for compatibility with Conan 1.x and will be removed in a future version.
    qt/5.15.13: Calling source() in /home/conan/workspace/prod-v2/bsr/24030/daaac/p/qt74a4200141b28/s
    qt/5.15.13: Downloading 660.8MB 9550ec8fc758d3d8d9090e261329700ddcd712e2dda97e5fcfeabfac22bea2ca
    qt/5.15.13: Sources for ['https://download.qt.io/official_releases/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz', 'https://download.qt.io/archive/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz', 'https://mirrors.cloud.tencent.com/qt/archive/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz'] found in remote backup https://c3i.jfrog.io/artifactory/conan-center-backup-sources/
    qt/5.15.13: Apply patch (file): patches/aa2a39dea5.diff
    qt/5.15.13: Apply patch (file): patches/c72097e.diff
    qt/5.15.13: Apply patch (file): patches/fix-macdeployqt.diff
    qt/5.15.13: Apply patch (file): patches/0001-Find-fontconfig-using-pkg-config.patch
    qt/5.15.13: Apply patch (file): patches/android-backtrace.diff
    qt/5.15.13: Apply patch (file): patches/android-openssl.diff
    qt/5.15.13: Apply patch (portability): Fix qmake build with apple-clang>=15
    qt/5.15.13: Apply patch (portability): Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14
    qt/5.15.13: Apply patch (portability): Fix crash at launch on Android < 23
    qt/5.15.13: WARN: /home/conan/workspace/prod-v2/bsr/24030/daaac/p/qt74a4200141b28/s/patches/5.15.13-android-21-22.diff: file 2/2:	 b'src/android/jar/src/org/qtproject/qt5/android/QtLayout.java'
    qt/5.15.13: WARN: /home/conan/workspace/prod-v2/bsr/24030/daaac/p/qt74a4200141b28/s/patches/5.15.13-android-21-22.diff:  hunk no.1 doesn't match source file at line 106
    qt/5.15.13: WARN: /home/conan/workspace/prod-v2/bsr/24030/daaac/p/qt74a4200141b28/s/patches/5.15.13-android-21-22.diff:   expected: b'       final WindowManager windowManager = activity.getWindowManager();'
    qt/5.15.13: WARN: /home/conan/workspace/prod-v2/bsr/24030/daaac/p/qt74a4200141b28/s/patches/5.15.13-android-21-22.diff:   actual  : b'        final WindowManager windowManager = activity.getWindowManager();'
    qt/5.15.13: /home/conan/workspace/prod-v2/bsr/24030/daaac/p/qt74a4200141b28/s/patches/5.15.13-android-21-22.diff: source file is different - b'src/android/jar/src/org/qtproject/qt5/android/QtLayout.java'
    ERROR: qt/5.15.13: Error in source() method, line 470
    	apply_conandata_patches(self)
    	ConanException: Failed to apply patch: /home/conan/workspace/prod-v2/bsr/24030/daaac/p/qt74a4200141b28/s/patches/5.15.13-android-21-22.diff
    
  • qt/5.15.12:
    Didn't run or was cancelled before finishing

  • qt/5.15.11:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks a lot for providing the patch and the link to upstream's report so that it can be traced back there - Let's wait on upstream's decision on how to fix this, see if they approve the patch, before merging it here too as a backport - feel free to ping me once something new comes up on that side :)

@AbrilRBS AbrilRBS added the blocked Affected by an external issue and waiting until it is solved label Apr 20, 2024
@kambala-decapitator
Copy link
Contributor Author

@RubenRBS upstream bug was simply closed as a duplicate, but apparently the original bug's patch is accessible only to commercial license holders

Copy link
Contributor

@ericLemanissier ericLemanissier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work @kambala-decapitator, unfortunately I am not able to review this patch, because IIUC it was created by you, and there is no sign of review from qt team.
The actual upstream fix is in https://codereview.qt-project.org/c/qt/tqtc-qtbase/+/473563, which is under a commercial license, so we pretty much have to wait until qt 5.15.14 is released under LGPL, which has to be done one year after the commercial release,so it should be before the end of the may 2024.

@kambala-decapitator
Copy link
Contributor Author

for anyone stumbling on this: this fix didn't make it into .14 fully, only the getRootWindowInsets() call was removed. The rest of the patch is still required for Android 21-22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Affected by an external issue and waiting until it is solved Failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants