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

Cannot build a qmlproject having an interface with MinGW toolchain

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • Qt for MCUs 2.5
    • Qt for MCUs 2.5, Qt for MCUs 2.4
    • QUL Team, Tooling Team
    • None

    Description

      This was created from a customer's input via Teams: 
      Sumitabh Ghosh: QUL team and Tooling team A customer is facing the below error while … 
      posted in MCU - Engineering / Qul at Tuesday, May 16, 2023 3:49:45 PM
       
      When MSVC was not installed and MinGW is used for building a qmlproject, qmlprojectexporter gets an error from qmlinterfacegenerator by missing header files like below:

      cmd.exe /C "cd /D C:\Qt\QtMCUs\2.4.0\demos\build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug && C:\Qt\QtMCUs\2.4.0\bin\qmlprojectexporter.exe C:/Qt/QtMCUs/2.4.0/demos/motor_cluster/qmlproject/motor_cluster.qmlproject --boarddefaults=C:/Qt/QtMCUs/2.4.0/lib/cmake/Qul/../../../platform/boards/qt/qt/cmake/BoardDefaults_32bpp_default.qmlprojectconfig --toolchain mingw --platform qt --resource-compiler=C:/Qt/Tools/mingw1120_64/bin/windres.exe --no-export-configuration --no-export-modules --outdir C:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug/CMakeFiles/motor_cluster.dir --qul-dir C:/Qt/QtMCUs/2.4.0/lib/cmake/Qul/../../../ --include-dirs C:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug/CMakeFiles/motor_cluster.dir,C:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug/src/controls,C:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug/CMakeFiles/motor_cluster.dir,C:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug//CMakeFiles/motor_cluster.dir/,C:/Qt/QtMCUs/2.4.0/demos/motor_cluster/src,C:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug/CMakeFiles/motor_cluster.dir,C:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug/src/controls,C:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug/CMakeFiles/motor_cluster.dir,C:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug//CMakeFiles/Lib_motor_cluste3b8b.dir/,C:/Qt/QtMCUs/2.4.0/include,C:/Qt/QtMCUs/2.4.0/demos/motor_cluster/src/3rdparty/etl/include,C:/Qt/QtMCUs/2.4.0/demos/motor_cluster/src/3rdparty/etl/include/etl/profiles --selector small"
      C:/Qt/QtMCUs/2.4.0/include\qul/global.h:23:10: error: 'cstdint' file not found
      C:/Qt/QtMCUs/2.4.0/include\qul/private/compilerdetection.h:983:10: error: 'utility' file not found
      C:/Qt/QtMCUs/2.4.0/include\qul/private/global.h:42:10: error: 'cstddef' file not found
      C:/Qt/QtMCUs/2.4.0/include\qul/private/global.h:43:10: error: 'cassert' file not found
      C:/Qt/QtMCUs/2.4.0/include\qul/private/global.h:44:10: error: 'cmath' file not found
      C:/Qt/QtMCUs/2.4.0/include\qul/private/global.h:45:10: error: 'cfloat' file not found
      C:/Qt/QtMCUs/2.4.0/include\qul/private/global.h:199:26: error: use of undeclared identifier 'std'
      C:/Qt/QtMCUs/2.4.0/include\qul/private/global.h:363:1: error: unknown type name 'ptrdiff_t'
      C:/Qt/QtMCUs/2.4.0/include\qul/property.h:28:10: error: 'type_traits' file not found
      C:/Qt/QtMCUs/2.4.0/include\qul/property.h:555:36: error: use of undeclared identifier 'std'
      C:/Qt/QtMCUs/2.4.0/include\qul/property.h:555:50: error: expected ';' after alias declaration
      C:/Qt/QtMCUs/2.4.0/include\qul/property.h:557:33: error: no template named 'InheritsQulObject'
      Error: 'cstdint' file not found
      qmlinterfacegenerator -xc++ -resource-dir=C:/Qt/QtMCUs/2.4.0/lib/clang/13.0.1 -IC:/Qt/QtMCUs/2.4.0/include -IC:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug//CMakeFiles/motor_cluster.dir/ -IC:/Qt/QtMCUs/2.4.0/demos/motor_cluster/src/3rdparty/etl/include -IC:/Qt/QtMCUs/2.4.0/demos/motor_cluster/src -IC:/Qt/QtMCUs/2.4.0/demos/motor_cluster/src/3rdparty/etl/include/etl/profiles -IC:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug/src/controls -IC:/Qt/QtMCUs/2.4.0/include -IC:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug/CMakeFiles/motor_cluster.dir -IC:/Qt/QtMCUs/2.4.0/demos/build-motor_cluster-Qt_for_MCUs_2_4_Desktop_32bpp_MINGW-Debug//CMakeFiles/Lib_motor_cluste3b8b.dir/ C:/Qt/QtMCUs/2.4.0/demos/motor_cluster/src/simulation/+small/simulationcontroller.h
      Error: process failed with exit code 1. 

      The log was the same as the one in https://bugreports.qt.io/browse/UL-6877 . It was fixed by adding an argument to qmlinterfacegenerator to find correct header files for clang. But the patch was not applied to qmlprojectexporter, but only to cmake-based build.

      Attachments

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

        Activity

          People

            kwkim Kwangsub Kim
            kwkim Kwangsub Kim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes