Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. need help patching Qt 5.12.0 Android
Forum Updated to NodeBB v4.3 + New Features

need help patching Qt 5.12.0 Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 1.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ekkescornerE Offline
    ekkescornerE Offline
    ekkescorner
    Qt Champions 2016
    wrote on last edited by
    #1

    there's a bug freezing Android Apps in Qt 5.12.0:
    https://bugreports.qt.io/browse/QTBUG-72101
    fortunately there's also a fix:
    https://codereview.qt-project.org/#/c/246816/

    Now I want to patch my Qt Installation (5.12.0, installed on macOS for Android, iOS, macOS)

    Nearly 2 yrs ago J-P Nurmi helped me with scripts to patch QtQuickControls2:
    https://appbus.wordpress.com/2017/02/28/patch-qt-5-8-0-for-qtbug-59026/
    https://appbus.wordpress.com/2017/03/06/patch-qt-5-8-0-for-qtbug-59293/

    If I understand it right, this should work ?
    clone from branch 5.12 is OK ?
    my installation is 5.12.0

    export ANDROID_NDK_ROOT=/your_path_to/android-ndk-r18b
    cd /your-path-to-cloned-repo_android
    git clone --branch 5.12 git://code.qt.io/qt/qtbase.git
    cd qtbase
    git fetch https://codereview.qt-project.org/qt/qtbase refs/changes/16/246816/2 && git cherry-pick FETCH_HEAD
    /your-path-where-qt-is-installed/5.12.0/android_armv7/bin/qmake
    make
    make install
    

    hope this works
    thx for some feedback before ruining my installation ;-)

    ekke ... Qt Champion 2016 | 2024 ... mobile business apps
    5.15 --> 6.9 https://t1p.de/ekkeChecklist
    QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

    aha_1980A 1 Reply Last reply
    0
    • ekkescornerE ekkescorner

      there's a bug freezing Android Apps in Qt 5.12.0:
      https://bugreports.qt.io/browse/QTBUG-72101
      fortunately there's also a fix:
      https://codereview.qt-project.org/#/c/246816/

      Now I want to patch my Qt Installation (5.12.0, installed on macOS for Android, iOS, macOS)

      Nearly 2 yrs ago J-P Nurmi helped me with scripts to patch QtQuickControls2:
      https://appbus.wordpress.com/2017/02/28/patch-qt-5-8-0-for-qtbug-59026/
      https://appbus.wordpress.com/2017/03/06/patch-qt-5-8-0-for-qtbug-59293/

      If I understand it right, this should work ?
      clone from branch 5.12 is OK ?
      my installation is 5.12.0

      export ANDROID_NDK_ROOT=/your_path_to/android-ndk-r18b
      cd /your-path-to-cloned-repo_android
      git clone --branch 5.12 git://code.qt.io/qt/qtbase.git
      cd qtbase
      git fetch https://codereview.qt-project.org/qt/qtbase refs/changes/16/246816/2 && git cherry-pick FETCH_HEAD
      /your-path-where-qt-is-installed/5.12.0/android_armv7/bin/qmake
      make
      make install
      

      hope this works
      thx for some feedback before ruining my installation ;-)

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by aha_1980
      #2

      hi @ekkescorner,

      the mentioned patch is submitted to branch 5.12 (and will appear in 5.12.1 release).

      So if you checkout 5.12 or 5.12.1 branch now, it is already contained and you dont need to cherry-pick.

      I'm only on the phone now, so its hard to review all the commands.

      but you can check the generated libs befor make install ;)

      Regards

      Qt has to stay free or it will die.

      ekkescornerE 2 Replies Last reply
      2
      • aha_1980A aha_1980

        hi @ekkescorner,

        the mentioned patch is submitted to branch 5.12 (and will appear in 5.12.1 release).

        So if you checkout 5.12 or 5.12.1 branch now, it is already contained and you dont need to cherry-pick.

        I'm only on the phone now, so its hard to review all the commands.

        but you can check the generated libs befor make install ;)

        Regards

        ekkescornerE Offline
        ekkescornerE Offline
        ekkescorner
        Qt Champions 2016
        wrote on last edited by
        #3

        @aha_1980 thx.
        I'll remove the cherry-pick cmd.
        will try it out tomorrow
        ekke

        ekke ... Qt Champion 2016 | 2024 ... mobile business apps
        5.15 --> 6.9 https://t1p.de/ekkeChecklist
        QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

        1 Reply Last reply
        1
        • aha_1980A aha_1980

          hi @ekkescorner,

          the mentioned patch is submitted to branch 5.12 (and will appear in 5.12.1 release).

          So if you checkout 5.12 or 5.12.1 branch now, it is already contained and you dont need to cherry-pick.

          I'm only on the phone now, so its hard to review all the commands.

          but you can check the generated libs befor make install ;)

          Regards

          ekkescornerE Offline
          ekkescornerE Offline
          ekkescorner
          Qt Champions 2016
          wrote on last edited by
          #4

          @aha_1980 so this is my script to patch my binary QT 5.12.0 installation:

          export ANDROID_NDK_ROOT=/your_path_to/android-ndk-r18b
          cd /your-path-to-cloned-repo_android
          git clone --branch 5.12.1 git://code.qt.io/qt/qtbase.git
          cd qtbase
          /your-path-where-qt-is-installed/5.12.0/android_armv7/bin/qmake
          make
          

          got an error from qmake: Project ERROR: target architecture detection binary not found
          this is the output of Terminal:

          iMac:qtbase admin$ my_path_to_sdk_5.12.0/5.12.0/android_armv7/bin/qmake
          Info: creating stash file my_path_to_repo/qtbase/.qmake.stash
          Info: creating cache file my_path_to_repo/qtbase/.qmake.cache
          Selecting Qt Edition.
          Type 'c' if you want to use the Commercial Edition.
          Type 'o' if you want to use the Open Source Edition.
          Which edition of Qt do you want to use? c
          This is the Qt Commercial Edition.
          You are licensed to use this software under the terms of
          the QT LICENSE AGREEMENT.
          Type '?' to view the QT LICENSE AGREEMENT.
          Type 'y' to accept this license offer.
          Type 'n' to decline this license offer.
          Do you accept the terms of the license? y
          Running configuration tests...
          Checking for gold linker... no
          Checking for valid makespec... yes
          Checking for target architecture... Project ERROR: target architecture detection binary not found.
          

          any ideas what's missing ?

          ekke ... Qt Champion 2016 | 2024 ... mobile business apps
          5.15 --> 6.9 https://t1p.de/ekkeChecklist
          QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

          kshegunovK 1 Reply Last reply
          0
          • ekkescornerE ekkescorner

            @aha_1980 so this is my script to patch my binary QT 5.12.0 installation:

            export ANDROID_NDK_ROOT=/your_path_to/android-ndk-r18b
            cd /your-path-to-cloned-repo_android
            git clone --branch 5.12.1 git://code.qt.io/qt/qtbase.git
            cd qtbase
            /your-path-where-qt-is-installed/5.12.0/android_armv7/bin/qmake
            make
            

            got an error from qmake: Project ERROR: target architecture detection binary not found
            this is the output of Terminal:

            iMac:qtbase admin$ my_path_to_sdk_5.12.0/5.12.0/android_armv7/bin/qmake
            Info: creating stash file my_path_to_repo/qtbase/.qmake.stash
            Info: creating cache file my_path_to_repo/qtbase/.qmake.cache
            Selecting Qt Edition.
            Type 'c' if you want to use the Commercial Edition.
            Type 'o' if you want to use the Open Source Edition.
            Which edition of Qt do you want to use? c
            This is the Qt Commercial Edition.
            You are licensed to use this software under the terms of
            the QT LICENSE AGREEMENT.
            Type '?' to view the QT LICENSE AGREEMENT.
            Type 'y' to accept this license offer.
            Type 'n' to decline this license offer.
            Do you accept the terms of the license? y
            Running configuration tests...
            Checking for gold linker... no
            Checking for valid makespec... yes
            Checking for target architecture... Project ERROR: target architecture detection binary not found.
            

            any ideas what's missing ?

            kshegunovK Offline
            kshegunovK Offline
            kshegunov
            Moderators
            wrote on last edited by kshegunov
            #5

            From what I could tell you didn't run configure to create the qmake and detection tools. If you run qmake prebuilt it'd try to find the relevant scripts/libraries in the location where they were when it was built. Try getting a clean source tree (since you're building from git) and then running configure to create qmake (which will incidentally also run it for you and prepare the build) and then run make.

            See here for lengthy instructions on building and specifically for android here.

            Read and abide by the Qt Code of Conduct

            ekkescornerE 1 Reply Last reply
            0
            • kshegunovK kshegunov

              From what I could tell you didn't run configure to create the qmake and detection tools. If you run qmake prebuilt it'd try to find the relevant scripts/libraries in the location where they were when it was built. Try getting a clean source tree (since you're building from git) and then running configure to create qmake (which will incidentally also run it for you and prepare the build) and then run make.

              See here for lengthy instructions on building and specifically for android here.

              ekkescornerE Offline
              ekkescornerE Offline
              ekkescorner
              Qt Champions 2016
              wrote on last edited by
              #6

              @kshegunov thx for the hints, but I'm a mobile business app developer and really not a cmdline-guy ;-)
              only using pre-built Qt binaries and doing all my stuff from inside QtC

              because 2 yrs ago (with some help by J-P Nurmi) I did something similar to patch qtquickcontrols2 Qt 5.8 for Android and iOS, I thought it would be easy to do something similar for Qt 5.12 qtbase Android.

              ... will probably wait for 5.12.1 ;-)

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.9 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved