You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment:
VS 2022 + Windows Server 2022 Datacenter
Tiled failed to build due to 'crash in cl.exe' on windows with MSVC using qbs build steps. 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 here. But it's an underlying issue with the Tiled build steps. Could you please help look at this issue?
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
Expected behavior
Did not cause cl.exe to crash.
Actual behavior
Cause cl.exe to crash.
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].
The text was updated successfully, but these errors were encountered:
Hmm, is this a new issue with VS 2022? I actually have a CI build on AppVeyor using VS 2019 + Qt 6.4 which is working fine.
But it's an underlying issue with the Tiled build steps. Could you please help look at this issue?
Since you've already pointed out it's an issue in Qbs, what makes you say it's an issue with the Tiled build steps? Do you think it's possible to work this around in Tiled project files, rather than patching up Qbs?
Granted, I would not expect Qbs to actually break on VS 2022... somebody would surely have noticed by now?
Sorry for the late reply, not sure if this is a new issue in vs2022, currently our latest CI is VS2022, this issue only occurs in our PR runs, but the manual command line test is fine. In fact, we also reported a source issue to qbs https://bugreports.qt.io/browse/QBS-1743, We reported to Tiled and also informed that this problem will cause the build of Tiled to cause cl to crash.
One difference is that rather than just opening VS2022 cmd and then running qbs build, I am explicitly having Qbs detect the available toolchains with qbs setup-toolchains --detect and then setting the default profile with qbs config defaultProfile MSVC2022-x64, before running qbs build. You may want to give that a try as well.
Hi All,
Environment:
VS 2022 + Windows Server 2022 Datacenter
Tiled failed to build due to 'crash in cl.exe' on windows with MSVC using qbs build steps. 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 here. But it's an underlying issue with the Tiled build steps. Could you please help look at this issue?
Steps to reproduce the behavior:
Expected behavior
Did not cause cl.exe to crash.
Actual behavior
Cause cl.exe to crash.
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].
The text was updated successfully, but these errors were encountered: