Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-32179

Syntax Error When Using Incredibuild Plugin for Build Execution

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 15.0.0
    • None
    • Environment:
      Tool version: Qt Creator 15.0.0
      Qt: 6.8.1
      Windows 11
    • Windows

    Description

      Environment:
      Tool version: Qt Creator 15.0.0
      Qt: 6.8.1
      Windows 11

      We are trying to use the Incredibuild plugin (IncrediBuild for Windows) for build acceleration, but it stops with the error below.

      ====================================================
      14:22:31: Running steps for project coffee...
      14:22:31: Skipping disabled step Build.
      14:22:31: Starting: "C:\Program Files (x86)\Incredibuild\BuildConsole.exe" /Command="C:\Program Files\CMake\bin\cmake.exe" --build C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug --target all – -j 200 "/AvoidLocal=OFF"

      -----------------------------------------------------------------------
      Build Acceleration Console 10.20.1 (build 14297)
      Copyright (C) 2001-2024 Incredibuild Software Ltd. All rights reserved.
      -----------------------------------------------------------------------

      Fatal Error: Only one filename to build can be specified
      14:22:31: The process "C:\Program Files (x86)\Incredibuild\BuildConsole.exe" exited with code 3.
      14:22:31: Error while building/deploying project coffee (kit: Desktop Qt 6.8.1 MinGW 64-bit)
      14:22:31: When executing step "IncrediBuild for Windows"
      14:22:31: Elapsed time: 00:00.
      ====================================================

      After some investigation, we found that it was a syntax error due to a missing escape character. Running the command as shown below works as expected.

      ====================================================
      "C:\Program Files (x86)\Incredibuild\BuildConsole.exe" /Command="\"C:\Program Files\CMake\bin\cmake.exe\" --build \"C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug\" --target all – -j 200" /AvoidLocal=OFF                                   
                                                                                                                                                                                                                                                                                                                                                               
      -----------------------------------------------------------------------                                                                                                                                                                                                                                                                                  
      Build Acceleration Console 10.20.1 (build 14297)
      Copyright (C) 2001-2024 Incredibuild Software Ltd. All rights reserved.
      -----------------------------------------------------------------------

       
      Build ID: {A9698F4D-A300-46BA-8B88-75CC132EF1BB}

      [1/64] Automatic MOC and UIC for target coffeemachine
      ====================================================

      It was also found that we were missing a call to qtenv2.bat before calling IncrediBuild. 
      ====================================================
      Before:

      "C:\Program Files (x86)\Incredibuild\BuildConsole.exe" /Command="\"C:\Program Files\CMake\bin\cmake.exe\" --build \"C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug\" --target all – -j 200" /AvoidLocal=OFF
                                                                                                                                                                                                                                                                                            -----------------------------------------------------------------------                                                                                                                                                                                                               Build Acceleration Console 10.20.1 (build 14297)
      Copyright (C) 2001-2024 Incredibuild Software Ltd. All rights reserved.
      -----------------------------------------------------------------------

       
      Build ID: {A9698F4D-A300-46BA-8B88-75CC132EF1BB}

      [1/64] Automatic MOC and UIC for target coffeemachine
      FAILED: coffeemachine_autogen/timestamp coffeemachine_autogen/mocs_compilation.cpp C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug/coffeemachine_autogen/timestamp C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug/coffeC:\WINDOWS\system32\cmd.exe /C "cd /D C:\Qt\Examples\Qt-6.8.1\demos\coffee\build\Desktop_Qt_6_8_1_MinGW_64_bit-Debug && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_autogen C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug/CMakeFiles/coffeemachincmake.exe" -E touch C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug/coffeemachine_autogen/timestamp && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_transform_depfile Ninja gccdepfile C:/Qt/Examples/Qt-6.8.1/demos/coffee C:/Qt/Examples/Qt-6.8.1/_8_1_MinGW_64_bit-Debug C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug/coffeemachine_autogen/deps C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_2628964eaaa81d1185e.d"

      AutoMoc subprocess error
      ------------------------
      The content generation command for "SRC:/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug/coffeemachine_autogen/moc_predefs.h" failed.
      Process failed with return value 1

      Command
      -------
      C:/Qt/Tools/mingw1310_64/bin/g+.exe -dM -E -c "C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeCXXCompilerABI.cpp" -DMINGW_HAS_SECURE_API=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NEEDS_QMAIN -DQT_NETWORK_LIB -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMETA_LIB -DQT_QMLMODELS-DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -IC:/Qt/Examples/Qt-6.8.1/demos/coffee -IC:/Qt/6.8.1/mingw_64/include/QtQml/6.8.1 -IC:/Qt/6.8.1/mingw_64/include/QtQml/6.8.1/QtQml -IC:/Qt/6.8.1/mingw_64/include/QtCore/6.8.1 -IC:/Qt/6.8.1/mingw_64/include/Q.1/mingw_64/include -IC:/Qt/6.8.1/mingw_64/mkspecs/win32-g+ -IC:/Qt/6.8.1/mingw_64/include/QtQml -IC:/Qt/6.8.1/mingw_64/include/QtQmlIntegration -IC:/Qt/6.8.1/mingw_64/include/QtNetwork -IC:/Qt/6.8.1/mingw_64/include/QtGui -IC:/Qt/6.8.1/mingw_64/include/QtQuick -IC:/Qt/6.8.1/m -IC:/Qt/6.8.1/mingw_64/include/QtQmlWorkerScript -IC:/Qt/6.8.1/mingw_64/include/QtOpenGL -IC:/Qt/Tools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++ -IC:/Qt/Tools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/x86_64-w64-mingw32 -IC:/Qt/Tools/mingw1310ools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0/include -IC:/Qt/Tools/mingw1310_64/lib/gcc/x86_64-w64-mingw32/13.1.0/include-fixed -IC:/Qt/Tools/mingw1310_64/x86_64-w64-mingw32/include

      Output
      ------

      ninja: build stopped: subcommand failed.

      After:

      call "C:\Qt\6.8.1\mingw_64\bin\qtenv2.bat"
      Setting up environment for Qt usage...

      >"C:\Program Files (x86)\Incredibuild\BuildConsole.exe" /Command="\"C:\Program Files\CMake\bin\cmake.exe\" --build \"C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug\" --target all – -j 200" /AvoidLocal=OFF

      -----------------------------------------------------------------------
      Build Acceleration Console 10.20.1 (build 14297)
      Copyright (C) 2001-2024 Incredibuild Software Ltd. All rights reserved.
      -----------------------------------------------------------------------

       
      Build ID: {3500F987-4517-47B8-B6E4-DFA7BA76DF7A}

      [1/113] Copying ApplicationFlow.qml to C:/Qt/Examples/Qt-6.8.1/demos/coffee/build/Desktop_Qt_6_8_1_MinGW_64_bit-Debug/demos/coffee/ApplicationFlow.qml
      ...
      [113/113] Linking CXX executable coffeemachine.exe
      ====================================================

      Hence, here is a summary of the required fixes:

      #1. Correct the syntax error when using the Incredibuild plugin for the build.
      #2. Add a space between the double quotation mark (") and /AvoidLocal.
      #3. Call qtenv2.bat before running the build command with IncrediBuild.

      Attachments

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

        Activity

          People

            orkunst Or Kunst
            ib-kaz Kaz Kaneko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes