Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-31194

"Could not find a package configuration file provided by "Qt6" with any of[cmake] the following names" when building manual test

    XMLWordPrintable

Details

    • 412eeefaf (14.0)

    Description

      I was trying to build qtdeclarative/tests/manual/quickcontrols/menus/CMakeLists.txt with a fresh dev build of Qt, but running into this familiar error message:

      [cmake] Running /usr/bin/cmake -S /home/mitch/dev/qt-dev2/qtdeclarative/tests/manual/quickcontrols/menus -B /home/mitch/dev/qt-dev2-debug/qtdeclarative/tests/manual/quickcontrols/menus in /home/mitch/dev/qt-dev2-debug/qtdeclarative/tests/manual/quickcontrols/menus.
      [cmake] CMake Error at CMakeLists.txt:10 (find_package):
      [cmake]   By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
      [cmake]   asked CMake to find a package configuration file provided by "Qt6", but
      [cmake]   CMake did not find one.
      [cmake] 
      [cmake]   Could not find a package configuration file provided by "Qt6" with any of
      [cmake]   the following names:
      [cmake] 
      [cmake]     Qt6Config.cmake
      [cmake]     qt6-config.cmake
      [cmake] 
      [cmake]   Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
      [cmake]   to a directory containing one of the above files.  If "Qt6" provides a
      [cmake]   separate development package or SDK, be sure it has been installed.
      [cmake] 
      [cmake] 
      [cmake] -- Configuring incomplete, errors occurred!
      [cmake] See also "/home/mitch/dev/qt-dev2-debug/qtdeclarative/tests/manual/quickcontrols/menus/CMakeFiles/CMakeOutput.log".
      [cmake] 
      [cmake] The command "/usr/bin/cmake -S /home/mitch/dev/qt-dev2/qtdeclarative/tests/manual/quickcontrols/menus -B /home/mitch/dev/qt-dev2-debug/qtdeclarative/tests/manual/quickcontrols/menus" terminated with exit code 1.
      [cmake] 
      [cmake] Elapsed time: 00:00.
      

      Auto tests build fine. I also tested a throwaway Qt Quick project with the same kit and it builds fine.

      Creator doesn't report any issues with the Qt version or kit.

      I've attached the output of the command mentioned at https://wiki.qt.io/Qt_Build_System_Glossary#CMake_project_quick_troubleshooting_recipe (although there is no CMakeConfigureLog.yaml - there is a CMakeOutput.log...)

      After wiping the build directory and building with qt-cmake, everything started working and I was unable to reproduce it after that point.

      The Qt version in that kit was built per-repo, with the following configure flags:

      -DCMAKE_BUILD_TYPE=Debug -DFEATURE_developer_build=ON -DQT_BUILD_TESTS=ON -DQT_BUILD_TESTS_BY_DEFAULT=OFF -DQT_BUILD_EXAMPLES=ON -DQT_BUILD_EXAMPLES_BY_DEFAULT=OFF -DFEATURE_sanitize_address=ON
      
      Product: Qt Creator 14.0.0-beta1 (13.0.82)
      Based on: Qt 6.7.2 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64)
      Built on: Jun 13 2024 11:39:07
      From revision: b66a800045
      

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-31194
        # Subject Branch Project Status CR V

        Activity

          People

            cadam Cristian Adam
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes