Can't build QtWebEngine on Windows with MSVC 2022
-
I'm attempting to build QtWebEngine using the 6.7.0 source on Windows with the MSVC 2022 compiler. I was successful last time when I built using the 6.6.3 source with the exact same setup, but am having nothing but issues this time around now that I'm trying to upgrade to 6.7.0.
Here's my setup:
- Visual Studio 2022 latest version (17.9.7) on Windows 10
- Qt 6.7.0 with sources obtained via the maintenance tool
- WebEngine specific pre-reqs (bison, flex, gperf, Python 11 with html5lib, perl, nodejs) with relevant binary paths added to Windows PATH
From the x64 Native Tools Command Prompt for VS 2022, I configure WebEngine by running:
C:\Qt\6.7.0\msvc2019_64\bin\qt-configure-module.bat C:\Qt\6.7.0\Src\qtwebengine -webengine-proprietary-codecs -no-webengine-jumbo-build
And build by running:
cmake --build . --parallel 4
I've tried two different times so far and here are the failures I've gotten:
Run 1:
[297/531] Generating .rcc/qmlcache/WebEngineQuickDelegatesQml_PromptDialog_qml.cpp FAILED: src/webenginequick/ui/.rcc/qmlcache/WebEngineQuickDelegatesQml_PromptDialog_qml.cpp C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/qmlcache/WebEngineQuickDelegatesQml_PromptDialog_qml.cpp cmd.exe /C "cd /D C:\Qt\Custom\6.7.0\src\webenginequick\ui && C:\Qt\Tools\CMake_64\bin\cmake.exe -E make_directory C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/qmlcache && C:\Qt\Custom\6.7.0\.qt\bin\qt_setup_tool_path.bat C:/Qt/6.6.2/msvc2019_64/./bin/qmlsc.exe --bare --resource-path /qt-project.org/imports/QtWebEngine/ControlsDelegates/PromptDialog.qml -I C:/Qt/Custom/6.7.0/qml/ -I C:/Qt/Custom/6.7.0/./qml -I C:/Qt/6.7.0/msvc2019_64/./qml -i C:/Qt/Custom/6.7.0/qml/QtWebEngine/ControlsDelegates/qmldir --resource C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/qmake_QtWebEngine_ControlsDelegates.qrc --resource C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/WebEngineQuickDelegatesQml_raw_qml_0.qrc -o C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/qmlcache/WebEngineQuickDelegatesQml_PromptDialog_qml.cpp C:/Qt/6.7.0/Src/qtwebengine/src/webenginequick/ui/PromptDialog.qml" ninja: build stopped: subcommand failed.
Run 2:
[292/531] Generating .rcc/qmlcache/WebEngineQuickDelegatesQml_ConfirmDialog_qml.cpp FAILED: src/webenginequick/ui/.rcc/qmlcache/WebEngineQuickDelegatesQml_ConfirmDialog_qml.cpp C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/qmlcache/WebEngineQuickDelegatesQml_ConfirmDialog_qml.cpp cmd.exe /C "cd /D C:\Qt\Custom\6.7.0\src\webenginequick\ui && C:\Qt\Tools\CMake_64\bin\cmake.exe -E make_directory C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/qmlcache && C:\Qt\Custom\6.7.0\.qt\bin\qt_setup_tool_path.bat C:/Qt/6.6.2/msvc2019_64/./bin/qmlsc.exe --bare --resource-path /qt-project.org/imports/QtWebEngine/ControlsDelegates/ConfirmDialog.qml -I C:/Qt/Custom/6.7.0/qml/ -I C:/Qt/Custom/6.7.0/./qml -I C:/Qt/6.7.0/msvc2019_64/./qml -i C:/Qt/Custom/6.7.0/qml/QtWebEngine/ControlsDelegates/qmldir --resource C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/qmake_QtWebEngine_ControlsDelegates.qrc --resource C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/WebEngineQuickDelegatesQml_raw_qml_0.qrc -o C:/Qt/Custom/6.7.0/src/webenginequick/ui/.rcc/qmlcache/WebEngineQuickDelegatesQml_ConfirmDialog_qml.cpp C:/Qt/6.7.0/Src/qtwebengine/src/webenginequick/ui/ConfirmDialog.qml" ninja: build stopped: subcommand failed.
I'm not really sure what these failures are implying and not sure where I should go from here. I tried building using the VS 2022 preview version, but that gave me compiler errors earlier in the build process so no luck there.
-
I ended up figuring it out... I still had the bin path for my 6.6.2 installation in my Windows PATH and I also had Qt Quick Compiler Extensions installed for 6.6.2, but not for 6.7.0. This caused the build to attempt to use qmlsc.exe from the 6.6.2 install which must have caused the issue, since the build succeeded after removing the Qt Quick Compiler Extensions module from 6.6.2 via the maintenance tool
-