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

Building examples with qmake / cmake using Qt 6.0.0 snapshot fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 6.0
    • Build System: CMake

    Description

      Building the qtquickcontrols2 gallery fails on macOS with

      $ /Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/bin/qmake /Volumes/T3/Dev/qt/official_qt/Examples/Qt-6.0.0/quickcontrols2/gallery/
      
      $ make
      
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++1z  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -Wall -Wextra -fPIC -DGL_SILENCE_DEPRECATION -DQT_NO_DEBUG -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../../qt/official_qt/Examples/Qt-6.0.0/quickcontrols2/gallery -I. -I../../../qt/official_qt/6.0.0/clang_64/lib/QtQuickControls2.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtQuick.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtOpenGL.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtGui.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtQmlModels.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtQml.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtNetwork.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/Applications/Xcode11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework -I../../../qt/official_qt/6.0.0/clang_64/mkspecs/macx-clang -F/Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/lib -o gallery.o ../../../qt/official_qt/Examples/Qt-6.0.0/quickcontrols2/gallery/gallery.cpp
      /Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/bin/rcc -name qmake_qmake_immediate qmake_qmake_immediate.qrc -o qrc_qmake_qmake_immediate.cpp
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++1z  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -Wall -Wextra -fPIC -DGL_SILENCE_DEPRECATION -DQT_NO_DEBUG -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../../qt/official_qt/Examples/Qt-6.0.0/quickcontrols2/gallery -I. -I../../../qt/official_qt/6.0.0/clang_64/lib/QtQuickControls2.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtQuick.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtOpenGL.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtGui.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtQmlModels.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtQml.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtNetwork.framework/Headers -I../../../qt/official_qt/6.0.0/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/Applications/Xcode11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework -I../../../qt/official_qt/6.0.0/clang_64/mkspecs/macx-clang -F/Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/lib -o qrc_qmake_qmake_immediate.o qrc_qmake_qmake_immediate.cpp
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/lib -o gallery.app/Contents/MacOS/gallery gallery.o qrc_qmake_qmake_immediate.o   -F/Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/lib -framework QtQuickControls2 /Users/qt/work/install/lib/QtQuick.framework/Versions/6/QtQuick /Users/qt/work/install/lib/QtQmlModels.framework/Versions/6/QtQmlModels /Users/qt/work/install/lib/QtOpenGL.framework/Versions/6/QtOpenGL /Users/qt/work/install/lib/QtGui.framework/Versions/6/QtGui /Applications/Xcode11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd /Users/qt/work/install/lib/QtQml.framework/Versions/6/QtQml /Users/qt/work/install/lib/QtNetwork.framework/Versions/6/QtNetwork /Users/qt/work/install/lib/QtCore.framework/Versions/6/QtCore -framework QtQuick /Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/lib/QtQmlModels.framework/Versions/6/QtQmlModels /Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/lib/QtQml.framework/Versions/6/QtQml -framework QtOpenGL /Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/lib/QtGui.framework/Versions/6/QtGui /Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64/lib/QtCore.framework/Versions/6/QtCore -framework QtGui -framework AppKit -framework ImageIO -framework Metal -framework QtQmlModels -framework QtQml -framework QtNetwork -framework QtCore -framework DiskArbitration -framework IOKit
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtQuick.framework/Versions/6/QtQuick'
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtQmlModels.framework/Versions/6/QtQmlModels'
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtOpenGL.framework/Versions/6/QtOpenGL'
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtGui.framework/Versions/6/QtGui'
      clang: error: no such file or directory: '/Applications/Xcode11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd'
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtQml.framework/Versions/6/QtQml'
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtNetwork.framework/Versions/6/QtNetwork'
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtCore.framework/Versions/6/QtCore'
      make: *** [gallery.app/Contents/MacOS/gallery] Error 1
      

      Looks like the .prl files have hardcoded framework paths to what they were on the CI.
      In contrast qmake build .prl files have something like

      -F/Volumes/T3/Dev/qt/qt60_built_fw/qtbase/lib -framework QtGui -framework AppKit -framework Metal -framework QtCore
      -framework DiskArbitration -framework IOKit
      

      Building the same gallery app with CMake fails with a different error:

      $ cmake -DCMAKE_PREFIX_PATH=/Volumes/T3/Dev/qt/official_qt/6.0.0/clang_64 /Volumes/T3/Dev/qt/official_qt/Examples/Qt-6.0.0/quickcontrols2/gallery
      # ....
      -- Build files have been written to: /Volumes/T3/Dev/projects/qmake/qt6snapshot_examples
      
      $ ninja
      makeobj[0]: Entering directory `/Volumes/T3/Dev/projects/qmake/qt6snapshot_examples'
      ninja: error: '/Applications/Xcode11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/DiskArbitration.framework', needed by 'gallery_controls2.app/Contents/MacOS/gallery_controls2', missing and no known rule to make it
      makeobj[0]: Leaving directory `/Volumes/T3/Dev/projects/qmake/qt6snapshot_examples'
      

      Looks like hardcoded framework paths are included, to an Xcode that only exists on the CI (the Xcode11.app name)

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: