Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Failed to find required Qt component "SerialPort"

Failed to find required Qt component "SerialPort"

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 1.4k Views 1 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.
  • J Offline
    J Offline
    JohnnyEl
    wrote on last edited by
    #1

    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 ?
    a416a10d-9546-49c2-bb39-6aeec3c636ff-image.png

    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 exist

    Configuring 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

    Christian EhrlicherC 1 Reply Last reply
    0
    • J JohnnyEl

      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 ?
      a416a10d-9546-49c2-bb39-6aeec3c636ff-image.png

      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 exist

      Configuring 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

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You can not mix different Qt versions so either install SerialPort for 6.6.2 or Qt 6.6.3

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      J 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        You can not mix different Qt versions so either install SerialPort for 6.6.2 or Qt 6.6.3

        J Offline
        J Offline
        JohnnyEl
        wrote on last edited by JohnnyEl
        #3

        @Christian-Ehrlicher
        Hi Christian, thanks for prompt reply. I tried to go back with just single module installed

        506714d8-6a8e-4036-99fa-f7487265f279-image.png

        but 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

        Christian EhrlicherC J.HilkJ 2 Replies Last reply
        0
        • J JohnnyEl

          @Christian-Ehrlicher
          Hi Christian, thanks for prompt reply. I tried to go back with just single module installed

          506714d8-6a8e-4036-99fa-f7487265f279-image.png

          but 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

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Still the same issue - 6.6.2 <> 6.6.3

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • J JohnnyEl

            @Christian-Ehrlicher
            Hi Christian, thanks for prompt reply. I tried to go back with just single module installed

            506714d8-6a8e-4036-99fa-f7487265f279-image.png

            but 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

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #5

            @JohnnyEl Archive checkbox, probably


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            J 1 Reply Last reply
            2
            • J.HilkJ J.Hilk

              @JohnnyEl Archive checkbox, probably

              J Offline
              J Offline
              JohnnyEl
              wrote on last edited by
              #6

              @J-Hilk
              Hi,
              I am kind of new to Qt and seems I am missing some essentials.

              It worked
              thank you very much.

              1 Reply Last reply
              1
              • J JohnnyEl has marked this topic as solved on

              • Login

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