Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [SOLVED] Building Qt 6.9.1 for Android with ssl support.
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Building Qt 6.9.1 for Android with ssl support.

Scheduled Pinned Locked Moved Solved Installation and Deployment
14 Posts 4 Posters 749 Views
  • 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.
  • SMF-QtS Online
    SMF-QtS Online
    SMF-Qt
    wrote last edited by
    #4

    Tried OpenSSL version 3.0.8 and that failed too.

    jsulmJ 1 Reply Last reply
    0
    • SMF-QtS SMF-Qt

      Tried OpenSSL version 3.0.8 and that failed too.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote last edited by
      #5

      @SMF-Qt With same error?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      S SMF-QtS 2 Replies Last reply
      0
      • jsulmJ jsulm

        @SMF-Qt With same error?

        S Offline
        S Offline
        StudentScripter
        wrote last edited by
        #6

        @jsulm building and compiling OpenSSL is failing for me too with Qt 6.9.0 and 6.9.1, tried OpenSSL 3.5 and 3.0 with LLVM on Windows 10 64bit. It works with MinGW...
        I use conan package manager.

        SMF-QtS 1 Reply Last reply
        0
        • jsulmJ jsulm

          @SMF-Qt With same error?

          SMF-QtS Online
          SMF-QtS Online
          SMF-Qt
          wrote last edited by
          #7

          @jsulm Similar but not exactly the same:

          ERROR: Feature "openssl_linked": Forcing to "ON" breaks its condition:
          TEST_opensslv11 OR TEST_opensslv30
          Condition values dump:
          TEST_opensslv11 = "FALSE"
          TEST_opensslv30 = "FALSE"

          CMake Error at qtbase/cmake/QtBuildInformation.cmake:240 (message):
          Check the configuration messages for an error that has occurred.
          Call Stack (most recent call first):
          qtbase/cmake/QtBuildInformation.cmake:59 (qt_configure_print_summary)
          qtbase/cmake/QtBaseTopLevelHelpers.cmake:97 (qt_print_feature_summary)
          qtbase/cmake/QtBaseTopLevelHelpers.cmake:76 (qt_internal_print_top_level_info)
          CMakeLists.txt:124 (qt_internal_top_level_end)

          -- Configuring incomplete, errors occurred!
          CMake Error at /work/Qt-Android/qt-everywhere-src-6.9.1/qtbase/cmake/QtProcessConfigureArgs.cmake:1143 (message):
          CMake exited with code 1.

          CMake Error at /work/Qt-Android/qt-everywhere-src-6.9.1/cmake/QtIRProcessHelpers.cmake:173 (message):
          /work/Qt-Android/qt-everywhere-src-6.9.1/qtbase/configure -top-level
          -platform android-clang -prefix /opt/qt-android -android-ndk
          /opt/android/sdk/ndk/29.0.13599879 -android-sdk /opt/android/sdk/
          -qt-host-path /opt/qt6/ -android-abis arm64-v8a -skip qtwebengine
          -DANDROID_NATIVE_API_LEVEL=31 -openssl-linked exited with status: 1

          Call Stack (most recent call first):
          /work/Qt-Android/qt-everywhere-src-6.9.1/cmake/QtTopLevelHelpers.cmake:35 (qt_ir_execute_process_and_log_and_handle_error)
          /work/Qt-Android/qt-everywhere-src-6.9.1/cmake/QtTopLevelHelpers.cmake:57 (qt_tl_run_toplevel_configure)
          /work/Qt-Android/qt-everywhere-src-6.9.1/cmake/QtTopLevelConfigureScript.cmake:16 (qt_tl_run_main_script)

          jsulmJ 1 Reply Last reply
          0
          • SMF-QtS SMF-Qt

            @jsulm Similar but not exactly the same:

            ERROR: Feature "openssl_linked": Forcing to "ON" breaks its condition:
            TEST_opensslv11 OR TEST_opensslv30
            Condition values dump:
            TEST_opensslv11 = "FALSE"
            TEST_opensslv30 = "FALSE"

            CMake Error at qtbase/cmake/QtBuildInformation.cmake:240 (message):
            Check the configuration messages for an error that has occurred.
            Call Stack (most recent call first):
            qtbase/cmake/QtBuildInformation.cmake:59 (qt_configure_print_summary)
            qtbase/cmake/QtBaseTopLevelHelpers.cmake:97 (qt_print_feature_summary)
            qtbase/cmake/QtBaseTopLevelHelpers.cmake:76 (qt_internal_print_top_level_info)
            CMakeLists.txt:124 (qt_internal_top_level_end)

            -- Configuring incomplete, errors occurred!
            CMake Error at /work/Qt-Android/qt-everywhere-src-6.9.1/qtbase/cmake/QtProcessConfigureArgs.cmake:1143 (message):
            CMake exited with code 1.

            CMake Error at /work/Qt-Android/qt-everywhere-src-6.9.1/cmake/QtIRProcessHelpers.cmake:173 (message):
            /work/Qt-Android/qt-everywhere-src-6.9.1/qtbase/configure -top-level
            -platform android-clang -prefix /opt/qt-android -android-ndk
            /opt/android/sdk/ndk/29.0.13599879 -android-sdk /opt/android/sdk/
            -qt-host-path /opt/qt6/ -android-abis arm64-v8a -skip qtwebengine
            -DANDROID_NATIVE_API_LEVEL=31 -openssl-linked exited with status: 1

            Call Stack (most recent call first):
            /work/Qt-Android/qt-everywhere-src-6.9.1/cmake/QtTopLevelHelpers.cmake:35 (qt_ir_execute_process_and_log_and_handle_error)
            /work/Qt-Android/qt-everywhere-src-6.9.1/cmake/QtTopLevelHelpers.cmake:57 (qt_tl_run_toplevel_configure)
            /work/Qt-Android/qt-everywhere-src-6.9.1/cmake/QtTopLevelConfigureScript.cmake:16 (qt_tl_run_main_script)

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote last edited by
            #8

            @SMF-Qt Looks like it did not detect your OpenSSL build

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            SMF-QtS 1 Reply Last reply
            0
            • S StudentScripter

              @jsulm building and compiling OpenSSL is failing for me too with Qt 6.9.0 and 6.9.1, tried OpenSSL 3.5 and 3.0 with LLVM on Windows 10 64bit. It works with MinGW...
              I use conan package manager.

              SMF-QtS Online
              SMF-QtS Online
              SMF-Qt
              wrote last edited by
              #9

              @StudentScripter

              My system is Beyond Linux From Scratch StystemD R12.3-71. I have built it specifically for Android development so I can add anything that can be built from source to solve any particular problem. I do have Android studio and QtCreator installed but I have yet to try them. I prefer to build stuff by hand whenever possible.

              1 Reply Last reply
              0
              • jsulmJ jsulm

                @SMF-Qt Looks like it did not detect your OpenSSL build

                SMF-QtS Online
                SMF-QtS Online
                SMF-Qt
                wrote last edited by
                #10

                @jsulm
                I wonder where it is looking, do the configuration tests get logged anywhere ?

                jsulmJ 1 Reply Last reply
                0
                • SMF-QtS SMF-Qt

                  @jsulm
                  I wonder where it is looking, do the configuration tests get logged anywhere ?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote last edited by
                  #11

                  @SMF-Qt said in Building Qt 6.9.1 for Android with ssl support.:

                  configuration tests get logged anywhere

                  Yes. In config.log or pass -v parameter to configure to get more verbose output.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  SMF-QtS 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @SMF-Qt said in Building Qt 6.9.1 for Android with ssl support.:

                    configuration tests get logged anywhere

                    Yes. In config.log or pass -v parameter to configure to get more verbose output.

                    SMF-QtS Online
                    SMF-QtS Online
                    SMF-Qt
                    wrote last edited by
                    #12

                    @jsulm Thanks for the help it gave me ideas and I now have a solution of sorts:

                    I move /usr/bin/cmake to /usr/bin/cmake.bin

                    and created a script /usr/bin/cmake (+x):

                    #! /bin/sh
                    strace cmake.bin $@
                    exit $?

                    I then ran the configure and created a Log file (1.7G!!!)

                    This gave me the details of what cmake was up to and I discovered that for me the important file searches are all relative to:

                    /opt/android/sdk/ndk/29.0.13599879/toolchains/llvm/prebuilt/linux-x86_64/sysroot

                    so I created a link:

                    lrwxrwxrwx 1 root root 5 Jun 26 15:02 /opt/android/sdk/ndk/29.0.13599879/toolchains/llvm/prebuilt/linux-x86_64/sysroot/opt -> /opt/

                    and for good measure added:

                    lrwxrwxrwx 1 root root 3 Jun 26 15:03 /opt/qt-android/lib64 -> lib

                    with these links in place and cmake put back to how it was the configure completed and so has the build.

                    My test application now builds and no longer complains about missing Qt SSL functions.

                    Not an ideal solution but I can live with it for now.

                    1 Reply Last reply
                    1
                    • SMF-QtS SMF-Qt referenced this topic
                    • X Offline
                      X Offline
                      xalioth
                      wrote last edited by
                      #13

                      I had the same problem, and I simply needed to specify the appropriate OPENSSL_ROOT_DIR cmake option after the -- at the end of the configure command, so something like this in your case:

                      ../configure -platform android-clang -prefix /opt/qt-android -android-ndk /opt/android/sdk/ndk/29.0.13599879 -android-sdk /opt/android/sdk/ -qt-host-path /opt/qt6/ -android-abis arm64-v8a -skip qtwebengine -DANDROID_NATIVE_API_LEVEL=31 -openssl-linked -- -DOPENSSL_ROOT_DIR=/opt/android_openssl/ssl_3/x86_64

                      This assumes that you have installed openssl for android (the one from https://github.com/KDAB/android_openssl) in /opt/android_openssl

                      SMF-QtS 1 Reply Last reply
                      0
                      • X xalioth

                        I had the same problem, and I simply needed to specify the appropriate OPENSSL_ROOT_DIR cmake option after the -- at the end of the configure command, so something like this in your case:

                        ../configure -platform android-clang -prefix /opt/qt-android -android-ndk /opt/android/sdk/ndk/29.0.13599879 -android-sdk /opt/android/sdk/ -qt-host-path /opt/qt6/ -android-abis arm64-v8a -skip qtwebengine -DANDROID_NATIVE_API_LEVEL=31 -openssl-linked -- -DOPENSSL_ROOT_DIR=/opt/android_openssl/ssl_3/x86_64

                        This assumes that you have installed openssl for android (the one from https://github.com/KDAB/android_openssl) in /opt/android_openssl

                        SMF-QtS Online
                        SMF-QtS Online
                        SMF-Qt
                        wrote last edited by
                        #14

                        @xalioth

                        Thanks that is the answer I have been looking for.
                        My current script is now as follows and seems to have worked, the build has just finished so I will now see what QtCreator makes of it.

                        #! /bin/sh
                        rm -r build-qt
                        mkdir build-qt
                        cd build-qt

                        ../configure -prefix /opt/qt-android/ -qt-host-path /opt/qt6/ -android-abis arm64-v8a -android-sdk /opt/android/sdk/ -android-ndk /opt/android/sdk/ndk/27.2.12479018 -skip qtwebengine -openssl-linked -- -D OPENSSL_ROOT_DIR="/work/Qt-Android/android_openssl/ssl_3/arm64-v8a"

                        exit $?

                        1 Reply Last reply
                        0
                        • SMF-QtS SMF-Qt referenced this topic
                        • SMF-QtS SMF-Qt has marked this topic as solved

                        • Login

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