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

Linker errors on macOS due to erroneous hardcoded framework paths

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.0.0 Beta1
    • Fix Version/s: 6.0.0 RC
    • Component/s: Build System
    • Labels:
    • Environment:
      macOS Catalina 10.15.7
      Xcode 12.1
      Qt Creator 4.13.2
      Qt 6.0.0 Beta 1

      Description

      I created a basic qmake-based project using the "Qt Quick Application - Empty" template in Qt Creator 4.13.2. The resulting project compiles but fails to link when built with Qt 6.0. It links fine with Qt 5.15.1.

      /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,/Users/cgutman/Qt/6.0.0/clang_64/lib -o Qt6BuildTest.app/Contents/MacOS/Qt6BuildTest main.o qrc_qml.o   -F/Users/cgutman/Qt/6.0.0/clang_64/lib -framework QtQuick /Users/qt/work/install/lib/QtOpenGL.framework/Versions/A/QtOpenGL /Users/qt/work/install/lib/QtGui.framework/Versions/A/QtGui /Users/qt/work/install/lib/QtNetwork.framework/Versions/A/QtNetwork /Users/qt/work/install/lib/QtCore.framework/Versions/A/QtCore -framework QtOpenGL -framework QtGui -framework AppKit -framework ImageIO -framework Metal -framework QtQmlModels -framework QtQml -framework QtNetwork -framework QtCore -framework DiskArbitration -framework IOKit -framework AGL -framework OpenGL   
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtOpenGL.framework/Versions/A/QtOpenGL'
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtGui.framework/Versions/A/QtGui'
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtNetwork.framework/Versions/A/QtNetwork'
      clang: error: no such file or directory: '/Users/qt/work/install/lib/QtCore.framework/Versions/A/QtCore'
      

      Perhaps QTBUG-85240 was only fixed for CMake and not qmake?

      Full error log: Qt6BuildTest.log
      Reproducer: Qt6BuildTestProject.zip

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              alexandru.croitor Alexandru Croitor
              Reporter:
              cgutman Cameron Gutman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes