Compile Qt 5.13.2 with QtWebEngine issue
-
Hello!
I want to build
Qt 5.13.2
withMySQL
andQtWebEngine
usingVisual Studio 2019
forx86
andx64
architecture. When building forx86
it displays this error:I have tried to build it using these
Command Prompts
:
x86 Native Tools Command Prompt for VS 2019
x86_x64 Cross Tools Command Prompt for VS 2019But these all failed. Also, I have tried the
x64_x86 Cross Tools Command Prompt for VS 2019
, it does not display any warning but skips to compile theQtWebEngine
. So, how to compileQtWebEngine
forx86
architecture? MaybeQtWebEngine
does not supportVS 2019
compiler? -
From the docs: https://doc.qt.io/qt-5/qtwebengine-platform-notes.html#windows
On Windows, the following additional tools are required: Visual Studio 2017 version 15.8 or later Active Template Library (ATL), usually included in the Visual Studio installation Windows 10 SDK Qt WebEngine can only be built on 64-bit Windows, with a x64-bit toolchain. For building Qt WebEngine for x86 applications, you need to configure and compile Qt with the Visual Studio 2017 x64 to x86 cross-compile toolchain. This toolchain can be set up on the command line by running vcvarsall.bat amd64_x86.
So, I think it could be 2 possible solutions:
- Try to set up toolchain by running
vcvarsamd64_x86.bat
forVS 2019
- Build it using
VS 2017
- Try to set up toolchain by running
-
I have tried these 2 solutions but it failed to compile the
QtWebEngine
. For some reason it compiles onlyQt
and skipsQtWebEngine
. UsingVisual Studio 2017
the same behavior. It is strange issue, no error, nothing is displayed. Any ideas? Thanks. -
I think, I have found the problem. I will investigate it and reply tomorrow.
-
So, the
bison
,flex
... components were missing, I have added the appropriate path to environment variable:..\qt-everywhere-src-5.13.2\gnuwin32\bin
and now it finds all necessary components, but it still skips to buildQtWebEngine
. I think, I will try to build it separately and copy/paste compiledQtWebEngine
files to theQt
directory. -
So, after some testing, when I try to build
QtWebEngine
separately fromqtwebengine-everywhere-src-5.13.2.zip
, I get this error:ninja: build stopped: subcommand failed. jom: C:\QtBuild\QtWebEngine\src\core\Makefile.gn_run.Release [run_ninja] Error 1 jom: C:\QtBuild\QtWebEngine\src\core\Makefile.gn_run [release] Error 2 jom: C:\QtBuild\QtWebEngine\src\core\Makefile [sub-gn_run-pro-make_first] Error 2 jom: C:\QtBuild\QtWebEngine\src\Makefile [sub-core-make_first] Error 2 jom: C:\QtBuild\QtWebEngine\Makefile [sub-src-make_first] Error 2
Screenshot:
It seems that it well know issue: https://bugreports.qt.io/browse/QTBUG-65677?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&showAll=true
-
I have tested it, and results are:
It successfully has been built
debug/release
usingVS 2017
andVS 2019
forx64
architecture but it skipsQtWebEngine
when building usingx64_x86 Cross Tools Command Prompt for VS
. I will report this issue. -
I have reported this issue here: https://bugreports.qt.io/browse/QTBUG-80278
-
Instead posting some screenshots it would be nice to see the actual error which should have happened some lines above.
-
Hello!
Actually, there is no error it just skips to build the
QtWebEngine
when building Qt (all modules). When buildingQtWebEngine
separately it displays only these issues, which I have added in the previous post and in the bug report.ninja: build stopped: subcommand failed. jom: C:\QtBuild\QtWebEngine\src\core\Makefile.gn_run.Release [run_ninja] Error 1 jom: C:\QtBuild\QtWebEngine\src\core\Makefile.gn_run [release] Error 2 jom: C:\QtBuild\QtWebEngine\src\core\Makefile [sub-gn_run-pro-make_first] Error 2 jom: C:\QtBuild\QtWebEngine\src\Makefile [sub-core-make_first] Error 2 jom: C:\QtBuild\QtWebEngine\Makefile [sub-src-make_first] Error 2
For
x64
everything compiles well, I think the problem is withninja
path when usingx64_x86 Cross Tools Command Prompt for VS
. I will try to use the systemninja
fromVS 2019
. Thanks. -
I have added the
ninja
path from VS 2019 to environment variable, but it still skipsQtWebEngine
build and no error is printed:In the
config.log
file I found the following errors:> main.cpp(2): fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\alloca_h\Makefile [main.obj] Error 2 > main.c(5): fatal error C1189: #error: __STDC_VERSION__ must be >= 199901L > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\c99\Makefile [main.obj] Error 2 > main.cpp(3): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\posix_fallocate\Makefile [main.obj] Error 2 > main.cpp(2): fatal error C1083: Cannot open include file: 'sys/eventfd.h': No such file or directory > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\eventfd\Makefile [main.obj] Error 2 > main.cpp(2): fatal error C1083: Cannot open include file: 'sys/inotify.h': No such file or directory > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\inotify\Makefile [main.obj] Error 2 > main.cpp(4): fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\cloexec\Makefile [main.obj] Error 2 > main.cpp(3): fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\getifaddrs\Makefile [main.obj] Error 2 > main.cpp(3): fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\ipv6ifname\Makefile [main.obj] Error 2 > main.cpp(5): fatal error C1083: Cannot open include file: 'linux/input.h': No such file or directory > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\evdev\Makefile [main.obj] Error 2 > main.cpp(2): fatal error C1083: Cannot open include file: 'linux/fb.h': No such file or directory > jom: C:\QtBuild\qt-everywhere-src-5.13.2\config.tests\linuxfb\Makefile [main.obj] Error 2
Qt 5.13.2
compiles successfully, but for some reason it automatically skips theQtWebEngine
build. -
I have checked the
config.log
fromx64
compilation and it displays the same errors butQtWebEngine
compiles successfully. I think, something is missing forx86
.I think, it could be the issue with the latest Windows 10 version 1909 build 18363.476, because it uses Win Dev Kit 18362.1,
Qt 5.13.2
was released: October 31, 2019. So, I think, it was built on previous Win 10 version 1903. I will try tomorrow to build it onVM
. -
@Cobra91151
Could you share how build qt with mysql?
You have a topic about how to build qt with mysql , but it need separately build Openssl and mysql libs .
Now QT5.13.2 has include OPENSSL , do you have simply build steps for qt with mysql? (or mariadb) -
Hello!
Currently, I am busy. I am working to fix the Qt 5.13.2
QtWebEngine
build issue forx86
architecture.I want to combine
mysql-5.7.28
with the latestopenssl-1.1.1d
andQtWebEngine
. Qt 5.13.2 has older OpenSSL included. You can contact me in the chat, so we can discuss it. -
I have checked it on
VM
on Windows 10 version 1903, but it still skips to buildQtWebEngine
when buildingQt 5.13.2
. I think, there is a bug. I will try to buildQt 5.12.X LTS
and check if it compiles or not. -
I have tried to build
Qt 5.12.6 LTS
withQtWebEngine
but the same issue is present forx86
architecture usingx64_x86 Cross Tools Command Prompt for VS
. It compilesQt
and skips theQtWebEngine
build. I will switch back toQt 5.9.8 LTS
. -
Ok. The problem was that older
Qt 5.9.8
mixed up withQt 5.13.2
because I had added paths forQt 5.9.8
in thePATH
environment variable. I have removed these paths and builtQt
and then builtQtWebEngine
module separately, because it still skipsQtWebEngine
module when building allQt
modules. Anyway, I have figured it out and now it is all working except for thewindeployqt.exe
utility, it is missing. Any ideas where to get or how to build thewindeployqt.exe
? Thanks. -
So, I have found that
windeployqt.exe
utility is actually built (it is exists in the..qttools\bin
directory) but for some reason it does not copy to the appropriate directory when I runjom install
command. -
Ok. I have compiled
Qt 5.13.2
forx86
successfully. I have built some tools separately, because it skips them or just do not copy to the appropriate directory usingjom install
command. It is strange, because when building forx64
architecture all tools are built and copied correctly. Anyway, now I haveQt 5.13.2
formsvc2017
,msvc2017_64
,msvc2019
,msvc2019_64
.