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

qml tool fails to build when targeting iOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.3.0 Alpha
    • 6.2.1, 6.3
    • Build System: CMake
    • None
    • iOS/tvOS/watchOS
    • 32bd6ba7e9f854f5e9b0e6e0b5bd3bc23b4668d4 (qt/qtdeclarative/dev) ab5511ca335fe3c4ffeb5d4c222a60c2d02a40b3 (qt/qtdeclarative/6.2)

    Description

      I got two people report in private that building Qt for iOS from dev branch fails at link time when linking the qml app in qtdeclarative.

      [3416/7595] Linking CXX executable qtbase/bin/qml
      
      FAILED: qtbase/bin/qml
      
      : && /usr/bin/clang++ -g -arch arm64 -arch x86_64 -Xarch_arm64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk -Xarch_x86_64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -miphoneos-version-min=13.0 -Wl,-headerpad_max_install_names -Wl,-e,_qt_main_wrapper qtdeclarative/tools/qml/CMakeFiles/qml.dir/qml_autogen/mocs_compilation.cpp.o qtdeclarative/tools/qml/CMakeFiles/qml.dir/main.cpp.o qtdeclarative/tools/qml/CMakeFiles/qml.dir/.rcc/qrc_qml.cpp.o qtdeclarative/tools/qml/CMakeFiles/qml.dir/qml_qmltyperegistrations.cpp.o qtdeclarative/tools/qml/CMakeFiles/qml.dir/.rcc/qrc_qmake_QmlRuntime_Config.cpp.o -o qtbase/bin/qml -Wl,-rpath,@loader_path/../lib qtdeclarative/src/qml/CMakeFiles/Qml_resources_1.dir/./.rcc/qrc_qmake_QtQml.cpp.o qtbase/src/gui/CMakeFiles/Gui_resources_1.dir/./.rcc/qrc_qpdf.cpp.o qtbase/src/widgets/CMakeFiles/Widgets_resources_1.dir/./.rcc/qrc_qstyle.cpp.o qtbase/src/widgets/CMakeFiles/Widgets_resources_2.dir/./.rcc/qrc_qstyle1.cpp.o qtbase/src/widgets/CMakeFiles/Widgets_resources_3.dir/./.rcc/qrc_qmessagebox.cpp.o qtbase/lib/libQt6Core_debug.a qtbase/lib/libQt6Qml_debug.a qtbase/lib/libQt6Gui_debug.a qtbase/lib/libQt6Widgets_debug.a qtbase/lib/libQt6Network_debug.a -framework Security -framework SystemConfiguration qtbase/lib/libQt6Gui_debug.a -framework OpenGLES -framework ImageIO -framework CoreGraphics -framework CoreText qtbase/lib/libQt6BundledHarfbuzz_debug.a qtbase/lib/libQt6BundledFreetype_debug.a qtbase/lib/libQt6BundledLibpng_debug.a -framework Metal qtbase/lib/libQt6Core_debug.a -framework CoreFoundation -framework Foundation -lz -lm qtbase/lib/libQt6BundledPcre2_debug.a -framework MobileCoreServices -framework UIKit && :
      
      Undefined symbols for architecture arm64:
      
      "_qt_main_wrapper", referenced from:
      
      implicit entry/start for main executable
      
      ld: symbol(s) not found for architecture arm64
      
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      

      configure lines were

      ../qt5/configure -developer-build -xplatform macx-ios-clang -debug -qt-host-path ../build/qtbase/ -nomake tests
      
      ./configure -developer-build -confirm-license -opensource -nomake tests -xplatform macx-ios-clang -nomake examples -qt-host-path ../build/qtbase -no-warnings-are-errors -debug-and-release
      

      The issue does not happen on CI, so i'm thinking it might be top-level build related which is not covered in CI when cross-compiling.

      Likely it's a consequence of https://codereview.qt-project.org/c/qt/qtdeclarative/+/372168

      Attachments

        Issue Links

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

          Activity

            People

              alexandru.croitor Alexandru Croitor
              alexandru.croitor Alexandru Croitor
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes