Failed to find required Qt component "SerialPort"
-
Hi,
I am trying for two days already to add QSerialPort in the project, but the package seems not to be added properly.
I am failing at point
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS SerialPort)I have installed the Qt Serial Port in maintenance tool, different versions, multiple times. Still no change.
I noticed that the package is installed with 0 bytes, why ?
So the maintenance tool downloaded ~250MB of documentation and examples, but not the module itself ? What am I understanding / doing wrong ?,
here is output from the terminal:
C:_lib_c__UTILS\qt_msvc\build-cSim-Desktop_Qt_6_6_2_MSVC2019_64bit-Debug>C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/_lib_c/__UTILS/qt_msvc/cSim -B C:/_lib_c/__UTILS/qt_msvc/build-cSim-Desktop_Qt_6_6_2_MSVC2019_64bit-Debug --debug-find-pkg=Qt6SerialPort -DQT_DEBUG_FIND_PACKAGE=ON
Running with debug output on for the 'find' commands for package(s) Qt6SerialPort.
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Could NOT find Qt6SerialPort (missing: Qt6SerialPort_DIR)
CMake Debug Log at C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake:164 (find_package):
The internally managed CMAKE_FIND_PACKAGE_REDIRECTS_DIR.C:/_lib_c/__UTILS/qt_msvc/build-cSim-Desktop_Qt_6_6_2_MSVC2019_64bit-Debug/CMakeFiles/pkgRedirects
Paths specified by the find_package HINTS option.
none
Paths specified by the find_package PATHS option.
C:/Qt/6.6.2/msvc2019_64/lib/cmake
find_package considered the following locations for Qt6SerialPort's Config
module:C:/_lib_c/__UTILS/qt_msvc/build-cSim-Desktop_Qt_6_6_2_MSVC2019_64bit-Debug/CMakeFiles/pkgRedirects/Qt6SerialPortConfig.cmake C:/_lib_c/__UTILS/qt_msvc/build-cSim-Desktop_Qt_6_6_2_MSVC2019_64bit-Debug/CMakeFiles/pkgRedirects/qt6serialport-config.cmake C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6SerialPortConfig.cmake C:/Qt/6.6.2/msvc2019_64/lib/cmake/qt6serialport-config.cmake
The file was not found.
Call Stack (most recent call first):
CMakeLists.txt:17 (find_package)CMake Error at CMakeLists.txt:17 (find_package):
Found package configuration file:C:/Qt/6.6.2/msvc2019_64/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 "SerialPort".
Expected Config file at
"C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6SerialPort/Qt6SerialPortConfig.cmake"
does NOT existConfiguring with --debug-find-pkg=Qt6SerialPort 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: C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6;C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules;C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6/3rdparty/kwin;C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6;C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules;C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6/3rdparty/kwin;C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6;C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules;C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6/3rdparty/kwin
CMAKE_PREFIX_PATH: C:/Qt/6.6.2/msvc2019_64
$ENV{CMAKE_PREFIX_PATH}:
CMAKE_FIND_ROOT_PATH:
_qt_additional_packages_prefix_paths:
_qt_additional_host_packages_prefix_paths:
_qt_cmake_dir: C:/Qt/6.6.2/msvc2019_64/lib/cmake
QT_HOST_PATH:
Qt6HostInfo_DIR:
Qt6_DIR: C:/Qt/6.6.2/msvc2019_64/lib/cmake/Qt6
CMAKE_TOOLCHAIN_FILE:
CMAKE_FIND_ROOT_PATH_MODE_PACKAGE:
CMAKE_SYSROOT:
$ENV{PATH}: C:\WINDOWS\system32;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Eclipse Adoptium\jdk-17.0.2.8-hotspot\bin;C:\Program Files (x86)\Eclipse Adoptium\jdk-17.0.2.8-hotspot\bin;C:\ProgramFilesUser\GnuWin32\bin;C:\HighTec\toolchains\powerpc\v4.9.3.0-stm-1.1\bin;C:\HighTec\licensemanager;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files (x86)\Sennheiser\SoftphoneSDK;C:\Program Files\TortoiseGit\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\dotnet;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility;C:\ProgramFilesUser\Python311\Scripts;C:\ProgramFilesUser\Python311;C:\Users\jan stanek\AppData\Local\Microsoft\WindowsApps;C:\Users\jan stanek.dotnet\tools-- Configuring incomplete, errors occurred!
Please do you have any idea ?
Thanks in advance -
You can not mix different Qt versions so either install SerialPort for 6.6.2 or Qt 6.6.3
-
@Christian-Ehrlicher
Hi Christian, thanks for prompt reply. I tried to go back with just single module installedbut I see no improvements.
I am curious why the installed size is 0.edit: I just noticed the .2 or .3 version.
Where can I get the right version if it is not listed in the Maintenance tool ?Thanks
Jan -
Still the same issue - 6.6.2 <> 6.6.3
-