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. Building Qt 6.9.1 for Android with ssl support.
Forum Updated to NodeBB v4.3 + New Features

Building Qt 6.9.1 for Android with ssl support.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
12 Posts 3 Posters 133 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 Offline
    SMF-QtS Offline
    SMF-Qt
    wrote last edited by
    #1

    I have built Qt 6.9.1 for Android without ssl support but I cannot build it with ssl support.
    I have built openssl 3.5.0 for Android and installed it in /opt/qt-android
    I have chosen this directory to try and keep everything for my Android build in one place.
    I have a configuration script to setup my build:

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

    export PKG_CONFIG_PATH=/opt/qt-android/lib/pkgconfig
    export OPENSSL_ROOT_DIR=/opt/qt-android
    export LD_LIBRARY_PATH=/opt/qt-android/lib

    cd build-qt
    ../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

    exit $?

    with the -openssl-linked option set I get the folowing error

    CMake Error at qtbase/cmake/QtBuildInformation.cmake:554 (message):
    Feature "openssl_linked": Forcing to "ON" breaks its condition:

      TEST_opensslv11 OR TEST_opensslv30
    

    Condition values dump:

      TEST_opensslv11 = "FALSE"
      TEST_opensslv30 = "FALSE"
    

    Call Stack (most recent call first):
    qtbase/cmake/QtFeature.cmake:380 (qt_configure_add_report_error)
    qtbase/cmake/QtFeature.cmake:500 (qt_feature_check_and_save_internal_value)
    qtbase/cmake/QtFeature.cmake:769 (qt_evaluate_feature)
    qtbase/cmake/QtBaseGlobalTargets.cmake:109 (qt_feature_module_end)
    qtbase/cmake/QtBaseHelpers.cmake:186 (include)
    qtbase/CMakeLists.txt:36 (qt_internal_qtbase_build_repo)

    Can anyone suggest what needs to be done to get this build working.
    Thanks.

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

      I have built Qt 6.9.1 for Android without ssl support but I cannot build it with ssl support.
      I have built openssl 3.5.0 for Android and installed it in /opt/qt-android
      I have chosen this directory to try and keep everything for my Android build in one place.
      I have a configuration script to setup my build:

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

      export PKG_CONFIG_PATH=/opt/qt-android/lib/pkgconfig
      export OPENSSL_ROOT_DIR=/opt/qt-android
      export LD_LIBRARY_PATH=/opt/qt-android/lib

      cd build-qt
      ../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

      exit $?

      with the -openssl-linked option set I get the folowing error

      CMake Error at qtbase/cmake/QtBuildInformation.cmake:554 (message):
      Feature "openssl_linked": Forcing to "ON" breaks its condition:

        TEST_opensslv11 OR TEST_opensslv30
      

      Condition values dump:

        TEST_opensslv11 = "FALSE"
        TEST_opensslv30 = "FALSE"
      

      Call Stack (most recent call first):
      qtbase/cmake/QtFeature.cmake:380 (qt_configure_add_report_error)
      qtbase/cmake/QtFeature.cmake:500 (qt_feature_check_and_save_internal_value)
      qtbase/cmake/QtFeature.cmake:769 (qt_evaluate_feature)
      qtbase/cmake/QtBaseGlobalTargets.cmake:109 (qt_feature_module_end)
      qtbase/cmake/QtBaseHelpers.cmake:186 (include)
      qtbase/CMakeLists.txt:36 (qt_internal_qtbase_build_repo)

      Can anyone suggest what needs to be done to get this build working.
      Thanks.

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote last edited by
      #2

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

      TEST_opensslv11 OR TEST_opensslv30

      Looks like OpenSSL version 3.5 is not supported by that Qt version.

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

      1 Reply Last reply
      0
      • SMF-QtS Offline
        SMF-QtS Offline
        SMF-Qt
        wrote last edited by
        #3

        Ok Thanks I will try some earlier versions.

        1 Reply Last reply
        0
        • SMF-QtS Offline
          SMF-QtS Offline
          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 Online
            jsulmJ Online
            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 Offline
                SMF-QtS Offline
                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 Online
                  jsulmJ Online
                  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 Offline
                    SMF-QtS Offline
                    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 Offline
                      SMF-QtS Offline
                      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 Online
                        jsulmJ Online
                        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 Offline
                          SMF-QtS Offline
                          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

                          • Login

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