Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Could not find a configuration file
Forum Updated to NodeBB v4.3 + New Features

Could not find a configuration file

Scheduled Pinned Locked Moved Unsolved Qt 6
8 Posts 4 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kais Ahmad
    wrote on last edited by
    #1

    Hello, I am still fairly new to working with Qt and am currently running into an issue. I am trying to build kArchive using these docs but keep running into issues. After some debugging I found out that I needed to downgrade Qt to version 6.5.0 so I did that. After running the command: `cmake . -G “NMake Makefiles” -DCMAKE_INSTALL_PREFIX=C:Qt release -DCMAKE_BUILD_TYPE=release -DCMAKE_PREFIX_PATH=C:Qt release;C:Qt.

    I get this error:

    Installing in C:/kderoot. Run C:/Nextcloud/karchive/build/prefix.sh to set the environment for KArchive.
    CMake Warning at C:/kderoot/share/ECM/kde-modules/KDEFrameworkCompilerSettings.cmake:51 (find_package):
      Could not find a configuration file for package "Qt6Core" that is
      compatible with requested version "".
    
      The following configuration files were considered but not accepted:
    
        C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake, version: 6.5.0 (64bit)
    
    Call Stack (most recent call first):
      CMakeLists.txt:39 (include)
    
    
    -- Looking for __GLIBC__
    -- Looking for __GLIBC__ - not found
    -- Could not set up the appstream test. appstreamcli is missing.
    CMake Error at CMakeLists.txt:46 (find_package):
      Could not find a configuration file for package "Qt6Core" that is
      compatible with requested version "6.5.0".
    
      The following configuration files were considered but not accepted:
    
        C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake, version: 6.5.0 (64bit)
    
    
    
    -- Configuring incomplete, errors occurred!
    

    Does anyone have any idea what I am doing wrong and how to fix the issue? Thanks!

    1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      Looks like glibc headers are missing,

      Software Engineer
      The Qt Company, Oslo

      K 1 Reply Last reply
      0
      • Axel SpoerlA Axel Spoerl

        Looks like glibc headers are missing,

        K Offline
        K Offline
        Kais Ahmad
        wrote on last edited by
        #3

        @Axel-Spoerl Just to double-check. glibc headers are Linux-specific, are they not? I'm using a Windows machine to build

        1 Reply Last reply
        0
        • Axel SpoerlA Offline
          Axel SpoerlA Offline
          Axel Spoerl
          Moderators
          wrote on last edited by
          #4

          Well, we don’t know what you build where, unless you show some code.

          Software Engineer
          The Qt Company, Oslo

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Kais Ahmad
            wrote on last edited by
            #5

            My bad!

            ECMQueryQt.cmake
            This file normally already errors out becuase it can't find the Qt6paths executable. I have added the QUERY_EXECUTABLE manually

            Code:

            function(ecm_query_qt result_variable qt_variable)
                set(options TRY)
                set(oneValueArgs)
                set(multiValueArgs)
            
                cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
            
                set(QUERY_EXECUTABLE "C:/Qt/6.5.0/msvc2019_64/bin/qtpaths.exe")
            
                if(NOT EXISTS ${QUERY_EXECUTABLE})
                    if(ARGS_TRY)
                        set(${result_variable} "" PARENT_SCOPE)
                        message(STATUS "No ${_exec_name_text} executable found. Can't check ${qt_variable}")
                        return()
                    else()
                        message(FATAL_ERROR "No ${_exec_name_text} executable found. Can't check ${qt_variable} as required")
                    endif()
                endif()
            
                execute_process(
                    COMMAND ${QUERY_EXECUTABLE} ${_cli_option} "${qt_variable}"
                    RESULT_VARIABLE return_code
                    OUTPUT_VARIABLE output
                )
            
                if(return_code EQUAL 0)
                    string(STRIP "${output}" output)
                    file(TO_CMAKE_PATH "${output}" output_path)
                    set(${result_variable} "${output_path}" PARENT_SCOPE)
                else()
                    message(WARNING "Failed call: ${QUERY_EXECUTABLE} ${_cli_option} ${qt_variable}")
                    message(FATAL_ERROR "${_exec_name_text} call failed: ${return_code}")
                endif()
            endfunction()
            

            Error before adding it manually:

            C:\Nextcloud\karchive\build>cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\kderoot -DCMAKE_BUILD_TYPE=release -DCMAKE_PREFIX_PATH=C:\kderoot;C:\Qt\6.5.0\msvc2019_64;C:\Nextcloud\karchive\zlib;C:\Nextcloud\karchive\bzip2;C:\Nextcloud\karchive\libLZMA -DQT_INSTALL_PREFIX="C:\Qt\6.5.0\msvc2019_64"
            --
            
            CMake Error at C:/kderoot/share/ECM/modules/ECMQueryQt.cmake:84 (message):
              No Qt6 qtpaths executable found.  Can't check QT_INSTALL_PREFIX as required
            Call Stack (most recent call first):
              C:/kderoot/share/ECM/kde-modules/KDEInstallDirs6.cmake:197 (ecm_query_qt)
              C:/kderoot/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
              CMakeLists.txt:38 (include)
            
            
            -- Configuring incomplete, errors occurred!
            

            After manually adding the QUERY_EXECUTABLE, I get the following error:

            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(4):  set(__qt_disable_package_version_check FALSE )
            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(7):  if(QT_NO_PACKAGE_VERSION_CHECK )
            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(15):  if(( NOT PACKAGE_VERSION_COMPATIBLE ) OR PACKAGE_VERSION_UNSUITABLE )
            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(16):  set(__qt_package_version_incompatible TRUE )
            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(21):  if(__qt_disable_package_version_check )
            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(46):  elseif(QT_REPO_MODULE_VERSION AND __qt_package_version_incompatible )
            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(62):  unset(__qt_disable_package_version_check )
            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(63):  unset(__qt_disable_package_version_check_due_to_developer_build )
            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(64):  unset(__qt_package_version_message_prefix )
            C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(65):  unset(__qt_package_version_incompatible )
            CMake Error at CMakeLists.txt:46 (find_package):
              Could not find a configuration file for package "Qt6Core" that is
              compatible with requested version "6.5.0".
            
              The following configuration files were considered but not accepted:
            
                C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake, version: 6.5.0 (64bit)
            
            
            
            -- Configuring incomplete, errors occurred!
            

            And this is included in my CMakeLists.txt:

            set(REQUIRED_QT_VERSION 6.5.0)
            find_package(Qt6Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
            

            (It could be that I am currently looking at the wrong place completely wrong. For that I apologize in advance! I need to build and compile an open-source program but there is little up to date information on this online)

            artwawA 1 Reply Last reply
            0
            • K Kais Ahmad

              My bad!

              ECMQueryQt.cmake
              This file normally already errors out becuase it can't find the Qt6paths executable. I have added the QUERY_EXECUTABLE manually

              Code:

              function(ecm_query_qt result_variable qt_variable)
                  set(options TRY)
                  set(oneValueArgs)
                  set(multiValueArgs)
              
                  cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
              
                  set(QUERY_EXECUTABLE "C:/Qt/6.5.0/msvc2019_64/bin/qtpaths.exe")
              
                  if(NOT EXISTS ${QUERY_EXECUTABLE})
                      if(ARGS_TRY)
                          set(${result_variable} "" PARENT_SCOPE)
                          message(STATUS "No ${_exec_name_text} executable found. Can't check ${qt_variable}")
                          return()
                      else()
                          message(FATAL_ERROR "No ${_exec_name_text} executable found. Can't check ${qt_variable} as required")
                      endif()
                  endif()
              
                  execute_process(
                      COMMAND ${QUERY_EXECUTABLE} ${_cli_option} "${qt_variable}"
                      RESULT_VARIABLE return_code
                      OUTPUT_VARIABLE output
                  )
              
                  if(return_code EQUAL 0)
                      string(STRIP "${output}" output)
                      file(TO_CMAKE_PATH "${output}" output_path)
                      set(${result_variable} "${output_path}" PARENT_SCOPE)
                  else()
                      message(WARNING "Failed call: ${QUERY_EXECUTABLE} ${_cli_option} ${qt_variable}")
                      message(FATAL_ERROR "${_exec_name_text} call failed: ${return_code}")
                  endif()
              endfunction()
              

              Error before adding it manually:

              C:\Nextcloud\karchive\build>cmake .. -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\kderoot -DCMAKE_BUILD_TYPE=release -DCMAKE_PREFIX_PATH=C:\kderoot;C:\Qt\6.5.0\msvc2019_64;C:\Nextcloud\karchive\zlib;C:\Nextcloud\karchive\bzip2;C:\Nextcloud\karchive\libLZMA -DQT_INSTALL_PREFIX="C:\Qt\6.5.0\msvc2019_64"
              --
              
              CMake Error at C:/kderoot/share/ECM/modules/ECMQueryQt.cmake:84 (message):
                No Qt6 qtpaths executable found.  Can't check QT_INSTALL_PREFIX as required
              Call Stack (most recent call first):
                C:/kderoot/share/ECM/kde-modules/KDEInstallDirs6.cmake:197 (ecm_query_qt)
                C:/kderoot/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
                CMakeLists.txt:38 (include)
              
              
              -- Configuring incomplete, errors occurred!
              

              After manually adding the QUERY_EXECUTABLE, I get the following error:

              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(4):  set(__qt_disable_package_version_check FALSE )
              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(7):  if(QT_NO_PACKAGE_VERSION_CHECK )
              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(15):  if(( NOT PACKAGE_VERSION_COMPATIBLE ) OR PACKAGE_VERSION_UNSUITABLE )
              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(16):  set(__qt_package_version_incompatible TRUE )
              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(21):  if(__qt_disable_package_version_check )
              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(46):  elseif(QT_REPO_MODULE_VERSION AND __qt_package_version_incompatible )
              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(62):  unset(__qt_disable_package_version_check )
              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(63):  unset(__qt_disable_package_version_check_due_to_developer_build )
              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(64):  unset(__qt_package_version_message_prefix )
              C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfigVersion.cmake(65):  unset(__qt_package_version_incompatible )
              CMake Error at CMakeLists.txt:46 (find_package):
                Could not find a configuration file for package "Qt6Core" that is
                compatible with requested version "6.5.0".
              
                The following configuration files were considered but not accepted:
              
                  C:/Qt/6.5.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake, version: 6.5.0 (64bit)
              
              
              
              -- Configuring incomplete, errors occurred!
              

              And this is included in my CMakeLists.txt:

              set(REQUIRED_QT_VERSION 6.5.0)
              find_package(Qt6Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
              

              (It could be that I am currently looking at the wrong place completely wrong. For that I apologize in advance! I need to build and compile an open-source program but there is little up to date information on this online)

              artwawA Offline
              artwawA Offline
              artwaw
              wrote on last edited by
              #6

              @Kais-Ahmad said in Could not find a configuration file:

              set(REQUIRED_QT_VERSION 6.5.0)

              you might want to comment it out or adjust to cover your Qt version. Just be aware, developers might've put that for a reason.

              For more information please re-read.

              Kind Regards,
              Artur

              K 1 Reply Last reply
              0
              • artwawA artwaw

                @Kais-Ahmad said in Could not find a configuration file:

                set(REQUIRED_QT_VERSION 6.5.0)

                you might want to comment it out or adjust to cover your Qt version. Just be aware, developers might've put that for a reason.

                K Offline
                K Offline
                Kais Ahmad
                wrote on last edited by
                #7

                @artwaw That's the weird part.. 6.5.0 is installed. (https://ibb.co/6rQRy4J). I'm going to try removing the check in a moment and then come back here.

                jsulmJ 1 Reply Last reply
                0
                • K Kais Ahmad

                  @artwaw That's the weird part.. 6.5.0 is installed. (https://ibb.co/6rQRy4J). I'm going to try removing the check in a moment and then come back here.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Kais-Ahmad Are you by any chance mixing MSVC and MinGW? MinGW Qt build requires GLibC.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved