Webengine Build Tools: How to use system gn(.exe) instead of building from source
-
Hi,
I'm struggling to build qtwebengine using 5.15.11-lts-lgpl on windows.
I can build qt without the webengine module but building with the latter always fails when building the gn.exe needed to build chromium.
I noticed that somehow I can configure the build to use the system gn:
How can this be done? I already downloaded a working gn.exe and it is in the path.
I also checked the different configure.json for a parameter but couldn't find one.
Any hints?
Thanks,
swenp -
@swenp said in Webengine Build Tools: How to use system gn(.exe) instead of building from source:
gn still starts to compile and fails
Posting the error could help
-
Sorry, my bad.
I started building modules qtbase and qtdeclarative.
After that went fine I try to build module-qtwebengine, that stops while in
qtwebengine\src\core:( if not exist Makefile.gn_run C:\qt5-build\qtbase\bin\qmake.exe -o Makefile.gn_run C:\qt5\qtwebengine\src\core\gn_run.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\nmake.exe" -f Makefile.gn_run Project ERROR: Visual Studio compiler version "17.0" is not supported by gn. NMAKE : fatal error U1077: '( if not exist Makefile.gn_run C:\qt5-build\qtbase\bin\qmake.exe -o Makefile.gn_run C:\qt5\qtwebengine\src\core\gn_run.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\nmake.exe" -f Makefile.gn_run' : return code '0x3' Stop. NMAKE : fatal error U1077: 'cd core\ && ( if not exist Makefile C:\qt5-build\qtbase\bin\qmake.exe -o Makefile C:\qt5\qtwebengine\src\core\core.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\nmake.exe" -f Makefile' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd src\ && ( if not exist Makefile C:\qt5-build\qtbase\bin\qmake.exe -o Makefile C:\qt5\qtwebengine\src\src.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\nmake.exe" -f Makefile' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd qtwebengine\ && ( if not exist Makefile C:\qt5-build\qtbase\bin\qmake.exe -o Makefile C:\qt5\qtwebengine\qtwebengine.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\nmake.exe" -f Makefile' : return code '0x2' Stop.
The exact call that produces the error is
( if not exist Makefile.gn_run C:\qt5-build\qtbase\bin\qmake.exe -o Makefile.gn_run C:\qt5\qtwebengine\src\core\gn_run.pro )
I checked the gn_run.pro file and the build stops at the line
gn_args = $$gnWebEngineArgs()
A line with
message($$gnWebEngineArgs())
will also print the message
Project ERROR: Visual Studio compiler version "17.0" is not supported by gn.
and stops the build.
-
@swenp said in Webengine Build Tools: How to use system gn(.exe) instead of building from source:
Project ERROR: Visual Studio compiler version "17.0" is not supported by gn
This seems to be the issue. You need to find out what compiler version gn supports.