Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
1.20
-
None
-
VS 2022 + Windows Server 2022 Datacenter
-
-
7867c6aaa (2.2)
Description
Building tiled with qbs causes cl.exe to crash on windows. The issue is that qbs attempts to use 'cl /Bx cmd.exe' to attempt to get the implied command line arguments passed to cl. This is not the intended purpose of the /Bx flag. Qbs should be using the flags /Bd (for defines and includes) and /Be (for environment variables). The relevant buggy source code in qbs is https://github.com/qbs/qbs/blob/master/src/lib/corelib/tools/msvcinfo.cpp#L156C20-L156C34. Could you please help look at this issue?
Steps to reproduce the behavior:
- git clone https://github.com/mapeditor/tiled F:\gitP\mapeditor\tiled
- Open a VS2022 x64 cmd && cd F:\gitP\mapeditor\tiled
- set PATH=F:\tools\qt5\qt\Tools\QtCreator\bin;%PATH%
- set PATH=F:\tools\qt5\qt\5_15_2\msvc2019_64\bin;%PATH%
- qbs build config:release
Error Message:
**********************************************************************
-
- Visual Studio 2022 Developer Command Prompt v17.6.5
- Copyright (c) 2022 Microsoft Corporation
**********************************************************************
##[debug] Command #0 exited with code [0].
##[command] Command #1 (Output in "build.log"): cd F:\gitP\mapeditor\tiled
##[debug] Command #1 exited with code [0].
##[command] Command #2 (Output in "build.log"): set PATH=F:\tools\qt5\qt\Tools\QtCreator\bin;%PATH%
##[debug] Command #2 exited with code [0].
##[command] Command #3 (Output in "build.log"): set PATH=F:\tools\qt5\qt\5_15_2\msvc2019_64\bin;%PATH%
##[debug] Command #3 exited with code [0].
##[command] Command #4 (Output in "build.log"): qbs build config:release 2>&1
Build graph does not yet exist for configuration 'release'. Starting from scratch.
Resolving project for configuration release
Detecting Qt installations...
Found Qt at 'F:\tools\qt5\qt\5_15_2\msvc2019_64\bin\qmake.exe'.
Setting up Qt at 'F:\tools\qt5\qt\5_15_2\msvc2019_64\bin\qmake.exe'...
Qt was set up successfully.
WARNING: PYTHONHOME not set. The Python plugin will not be available.
ERROR: F:\gitP\mapeditor\tiled\src\libtiled\libtiled.qbs:3:1 Error while handling product 'libtiled':
F:\tools\qt5\qt\Tools\QtCreator\share\qtcreator\qbs\share\qbs\imports\qbs\Probes\MsvcProbe.qbs:52:16 Error: Could not run C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/bin/HostX64/x64/cl.exe (Process crashed)
F:\gitP\mapeditor\tiled\src\qtpropertybrowser\qtpropertybrowser.qbs:1:1 Error while handling product 'qtpropertybrowser':
F:\tools\qt5\qt\Tools\QtCreator\share\qtcreator\qbs\share\qbs\imports\qbs\Probes\MsvcProbe.qbs:52:16 Error: Could not run C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/bin/HostX64/x64/cl.exe (Process crashed)
F:\gitP\mapeditor\tiled\src\qtsingleapplication\qtsingleapplication.qbs:1:1 Error while handling product 'qtsingleapplication':
F:\tools\qt5\qt\Tools\QtCreator\share\qtcreator\qbs\share\qbs\imports\qbs\Probes\MsvcProbe.qbs:52:16 Error: Could not run C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/bin/HostX64/x64/cl.exe (Process crashed)
F:\gitP\mapeditor\tiled\src\tiled\libtilededitor.qbs:5:1 Error while handling product 'libtilededitor':
F:\tools\qt5\qt\Tools\QtCreator\share\qtcreator\qbs\share\qbs\imports\qbs\Probes\MsvcProbe.qbs:52:16 Error: Could not run C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/bin/HostX64/x64/cl.exe (Process crashed)
F:\gitP\mapeditor\tiled\translations\translations.qbs:1:1 Error while handling product 'translations':
F:\tools\qt5\qt\Tools\QtCreator\share\qtcreator\qbs\share\qbs\imports\qbs\Probes\MsvcProbe.qbs:52:16 Error: Could not run C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/bin/HostX64/x64/cl.exe (Process crashed)
##[debug] Command #4 exited with code [1].
##[error] Detected error code [1].
Attachments
For Gerrit Dashboard: QBS-1743 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
520568,2 | MSVC support: Prevent cl.exe from crashing | 2.2 | qbs/qbs | Status: MERGED | +2 | -1 |