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

The option "-pkg-config" is required for configure Qt 6.5 on macOS to find protobuf, though docs tell, it is not required

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.5
    • None
    • macOS

    Description

      In opposite to https://doc.qt.io/qt-6/qt6-buildsystem.html  which telss under "Resolving Third-Party Libraries" that pkg-config is only needed on Qt5 and in Qt6 it is all done by cmake, this option is required to macOS to make configure find "protobuf" which is available on the system via brew.

      ➜  qt6-repo git:(6.5) ✗ brew list protobuf    
      /opt/homebrew/Cellar/protobuf/21.12/bin/protoc
      /opt/homebrew/Cellar/protobuf/21.12/bin/protoc-3.21.12.0
      /opt/homebrew/Cellar/protobuf/21.12/include/google/ (130 files)
      /opt/homebrew/Cellar/protobuf/21.12/lib/libprotobuf-lite.3.21.12.0.dylib
      /opt/homebrew/Cellar/protobuf/21.12/lib/libprotobuf.3.21.12.0.dylib
      /opt/homebrew/Cellar/protobuf/21.12/lib/libprotoc.3.21.12.0.dylib
      /opt/homebrew/Cellar/protobuf/21.12/lib/cmake/ (6 files)
      /opt/homebrew/Cellar/protobuf/21.12/lib/pkgconfig/ (2 files)
      /opt/homebrew/Cellar/protobuf/21.12/lib/python3.10/ (54 files)
      /opt/homebrew/Cellar/protobuf/21.12/lib/python3.11/ (54 files)
      /opt/homebrew/Cellar/protobuf/21.12/lib/ (6 other files)
      /opt/homebrew/Cellar/protobuf/21.12/share/emacs/site-lisp/protobuf/protobuf-mode.el
      /opt/homebrew/Cellar/protobuf/21.12/share/protobuf/ (22 files)

      A "configure" from git on the "6.6" branch fails if "-pkg-config" is not used.

      macOS SDK info: 

      ✗ xcodebuild -showsdks                        
      DriverKit SDKs:
          DriverKit 22.4                    -sdk driverkit22.4

      iOS SDKs:
          iOS 16.4                          -sdk iphoneos16.4

      iOS Additional SDKs:
          Asset Runtime SDK for macOS hosts targeting iOS 16.4    -sdk assetruntime.host.macosx.target.iphoneos16.4

      iOS Simulator SDKs:
          Simulator - iOS 16.4              -sdk iphonesimulator16.4

      macOS SDKs:
          macOS 13.3                        -sdk macosx13.3
          macOS 13.3                        -sdk macosx13.3

      tvOS SDKs:
          tvOS 16.4                         -sdk appletvos16.4

      tvOS Additional SDKs:
          Asset Runtime SDK for macOS hosts targeting tvOS 16.4    -sdk assetruntime.host.macosx.target.appletvos16.4

      tvOS Simulator SDKs:
          Simulator - tvOS 16.4             -sdk appletvsimulator16.4

      watchOS SDKs:
          watchOS 9.4                       -sdk watchos9.4

      watchOS Additional SDKs:
          Asset Runtime SDK for macOS hosts targeting watchOS 9.4    -sdk assetruntime.host.macosx.target.watchos9.4

      watchOS Simulator SDKs:
          Simulator - watchOS 9.4           -sdk watchsimulator9.4

      ----------

      ➜  qt6-repo git:(6.5) ✗ cmake --version
      cmake version 3.26.3

       

      CMake suite maintained and supported by Kitware (kitware.com/cmake).
      ➜  qt6-repo git:(6.5) ✗ which cmake    
      /opt/homebrew/bin/cmake
      ➜  qt6-repo git:(6.5) ✗

       

      -- 

      retested on 6.6. It also occurs on 6.6

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            vminenko Vladimir Minenko
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes