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

CMake can't find Qt6WebSocketsConfig.cmake and similar files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1: Critical P1: Critical
    • None
    • dev
    • Build System: CMake
    • None

      CMake can't find Qt6WebSocketsConfig.cmake when configuring qtwebsockets submodules. The file is under build_dir/lib, but CMake searches in wrong locations:

      • install_dir/lib
      • build_dir/CMakeFiles
      • install_dir/lib (yes, this is the same location as the 1st one, which makes me think it's a bug and it should be under build_dir)

      Similar error but with different filenames when configuring other submodules.

      Here is the log with the debug flags enabled.

      $ /home/sanitizer-runs/sanitizer_runs/install_dir/asan/bin/qt-configure-module /home/cc-runs/src/qt/qt5/qtwebsockets  --  --debug-find-pkg=Qt6WebSockets -DQT_DEBUG_FIND_PACKAGE=ON
      
      '/home/sanitizer-runs/sanitizer_runs/install_dir/asan/bin/../libexec/qt-cmake-private' '--debug-find-pkg=Qt6WebSockets' '-DQT_DEBUG_FIND_PACKAGE=ON' '/home/cc-runs/src/qt/qt5/qtwebsockets'
      Running with debug output on for the 'find' commands for package(s) Qt6WebSockets.
      CMake Warning (dev) at /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:423 (message):
        INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
        Please port your module to use declarative type registration.
      Call Stack (most recent call first):
        src/imports/qmlwebsockets/CMakeLists.txt:4 (qt_internal_add_qml_module)
      This warning is for project developers.  Use -Wno-dev to suppress it.
      
      -- Could NOT find Qt6WebSockets (missing: Qt6WebSockets_DIR)
      CMake Debug Log at /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package):
        The internally managed CMAKE_FIND_PACKAGE_REDIRECTS_DIR.
      
          /home/sanitizer-runs/sanitizer_runs/build/qtwebsockets-asan/CMakeFiles/pkgRedirects
      
        Paths specified by the find_package HINTS option.
      
          none
      
        Paths specified by the find_package PATHS option.
      
          /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake
      
        find_package considered the following locations for Qt6WebSockets's Config
        module:
      
          /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6WebSocketsConfig.cmake
          /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/qt6websockets-config.cmake
          /home/sanitizer-runs/sanitizer_runs/build/qtwebsockets-asan/CMakeFiles/pkgRedirects/Qt6WebSocketsConfig.cmake
          /home/sanitizer-runs/sanitizer_runs/build/qtwebsockets-asan/CMakeFiles/pkgRedirects/qt6websockets-config.cmake
          /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6WebSocketsConfig.cmake
          /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/qt6websockets-config.cmake
      
        The file was not found.
      
      Call Stack (most recent call first):
        tests/auto/cmake/CMakeLists.txt:25 (find_package)
      
      
      CMake Error at tests/auto/cmake/CMakeLists.txt:25 (find_package):
        Found package configuration file:
      
          /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/Qt6Config.cmake
      
        but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
        FOUND.  Reason given by package:
      
        Failed to find required Qt component "WebSockets".
      
        Expected Config file at
        "/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6WebSockets/Qt6WebSocketsConfig.cmake"
        does NOT exist
      
      
      
        Configuring with --debug-find-pkg=Qt6WebSockets might reveal details why
        the package was not found.
      
         find_package search path values and other context for the last package that was not found:
          CMAKE_MODULE_PATH: /home/cc-runs/src/qt/qt5/qtbase/cmake;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6BuildInternals/../Qt6;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/platforms;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/3rdparty/kwin;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/3rdparty/kwin;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/3rdparty/kwin;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/3rdparty/kwin
          CMAKE_PREFIX_PATH: /home/sanitizer-runs/sanitizer_runs/build/qtwebsockets-asan/lib/cmake;/home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake
          $ENV{CMAKE_PREFIX_PATH}: 
          CMAKE_FIND_ROOT_PATH: /home/sanitizer-runs/sanitizer_runs/install_dir/asan
          _qt_additional_packages_prefix_paths: 
          _qt_additional_host_packages_prefix_paths: 
          _qt_cmake_dir: /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake
          QT_HOST_PATH: 
          Qt6HostInfo_DIR: 
          Qt6_DIR: /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6
          CMAKE_TOOLCHAIN_FILE: /home/sanitizer-runs/sanitizer_runs/install_dir/asan/libexec/../lib/cmake/Qt6/qt.toolchain.cmake
          CMAKE_FIND_ROOT_PATH_MODE_PACKAGE: 
          CMAKE_SYSROOT: 
          $ENV{PATH}: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
      
      
      
      -- Configuring incomplete, errors occurred!
      CMake Error at /home/sanitizer-runs/sanitizer_runs/install_dir/asan/lib/cmake/Qt6/QtProcessConfigureArgs.cmake:1034 (message):
        CMake exited with code 1.
      

      qtbase config is done with -debug -sanitize address -make tests -prefix /path/to/install_dir and installed successfully.

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

            jbornema Joerg Bornemann
            jimis Dimitrios Apostolou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes