Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-348

Building Qt for MCU form source for desktop platform does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt for MCUs 2.8.1
    • None

    Description

      I am following this tutorial, trying to build for desktop platform on Windows:
      Building Qt Quick Ultralite from sources | Qt for MCUs 2.8.1

      I believe I have prepared all the tools and environment variables:

      C:\Qt\QtMCUs\2.8.1\test_build>echo %QUL_ROOT%
      C:\Qt\QtMCUs\2.8.1
       
      C:\Qt\QtMCUs\2.8.1\test_build>echo %QUL_TOOLS%
      C:\Qt\Tools\QtMCUs
       
      C:\Qt\QtMCUs\2.8.1\test_build>echo %QT_ROOT%
      C:\Qt\6.2.4\msvc2019_64
       
      C:\Qt\QtMCUs\2.8.1\test_build>cmake --version
      cmake version 3.29.3
      
      CMake suite maintained and supported by Kitware (kitware.com/cmake).
       
      C:\Qt\QtMCUs\2.8.1\test_build>ninja --version
      1.12.0
      

      And the very first problem is at configuration step when executing

      cmake .. -G "Ninja" -DQul_ROOT=%QUL_ROOT% -DCMAKE_BUILD_TYPE=Release -DQUL_GENERATORS=..\lib\cmake\Qul\QulGenerators.cmake -DQUL_PLATFORM=Qt -DCMAKE_PREFIX_PATH=%QUL_ROOT%\bin
      

      CMake complains about:

      CMake Error at compatibility/CMakeLists.txt:48 (find_package):
        By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
        asked CMake to find a package configuration file provided by "Qt6", but
        CMake did not find one.
       
        Could not find a package configuration file provided by "Qt6" (requested
        version 6.2) with any of the following names:
       
          Qt6Config.cmake
          qt6-config.cmake
       
        Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
        to a directory containing one of the above files.  If "Qt6" provides a
        separate development package or SDK, be sure it has been installed.
       
       
      -- Configuring incomplete, errors occurred!
      

      OK, so I change CMAKE_PREFIX_PATH to

      -DCMAKE_PREFIX_PATH=%QUL_ROOT%\bin;C:\Qt\6.2.4\msvc2019_64
      

      Finally the configuration passes. But now I am stuck at building. There are bunch of errors like:

      C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\yvals_core.h:898:1: error: static_assert failed "error STL1000: Unexpected compiler version, expected Clang 17.0.0 or newer."
      Error: static_assert failed "error STL1000: Unexpected compiler version, expected Clang 17.0.0 or newer."
      

      Since I am using MSVC 2022 I also tried to use Qt 6.7.3 as QT_ROOT, which does not work either. Inspired by https://forum.qt.io/topic/157625/how-to-solve-stl1000-error, I also tried to add the clangd (the one shipped with QtC which definitely newer than 17.0.0) to PATH, which does not work either.

      It seem to be a problem of desktop platform though. I also tried building for STM platform and it went well.

      Attachments

        1. MSVC2019_log.log
          23 kB
          Luqiao Chen
        2. MSVC2022_log.txt
          34 kB
          Luqiao Chen
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes