Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-120602

Cannot build Qt modules standalone for iOS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 6.5.3, 6.6.1
    • Build System: CMake
    • None
    • Qt 6.6.1 on macOS Sonoma
    • iOS/tvOS/watchOS
    • 9932f2dd4 (dev), ea47b017d (6.7), e823118c0 (6.6), cbf8da766 (tqtc/lts-6.5)

      Trying to build a Qt module standalone for iOS (i.e. static) using CMake as opposed to building it as part of a full qtbase configure step creates all static libraries in locations the install target does not expect.

      The project is opened and configuered in Qt Creator. The build succeeds but cmake --install . fails finding all static libraries, for example:

      CMake Error at src/plugins/opcua/open62541/cmake_install.cmake:86 (file):
        file INSTALL cannot find
        ".../build-qtopcua-Qt_6_5_3_for_iOS/src/plugins/opcua/open62541/QtOpcUa.build/Release/QOpen62541Plugin_init.build/Objects-normal/arm64/QOpen62541Plugin_init.o":
        No such file or directory.
      

      The file is built but is created in a different path:

      .../build-qtopcua-Qt_6_5_3_for_iOS/src/plugins/opcua/open62541/QtOpcUa.build/Release-iphoneos/QOpen62541Plugin_init.build/Objects-normal/arm64/QOpen62541Plugin_init.o

      Note the install script expecting it in Release whereas the builld created it in Release-iphoneos. Debug build also exhibits the same behavior.

      It affects all static libraries in the project, be it the QML plug-in, the QRC plug-in, or this custom plug-in.

      A similar issue can be observed with other Qt modules, too, in this case Qt Svg:

      CMake error at src/svg/cmake_install.cmake:74 (file):
        file INSTALL cannot find
        ".../build-qtsvg-Qt_6_6_1_for_iOS/lib/libQt6Svg.a": No such file or directory.
      

      The file is actually called libQt6Svg_debug.a.

      This is of particular importance for Qt modules that cannot be easily obtained using the Qt Maintenance Tool or not in the build configuration needed.

      All of the above works perfectly fine for a macOS (i.e. non-static) build.

        For Gerrit Dashboard: QTBUG-120602
        # Subject Branch Project Status CR V

            qtbuildsystem Qt Build System Team
            basyskom-broulik Kai Uwe Broulik
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes