Error while building qtwebengine module from Qt 5.7.0
-
Hello everyone.
I tried to compile Qt 5.7.0 from source (link) with MSVS 2015 in both x86 and x64, but the process failed during the compilation of qtwebengine module.
Errors were the following:[12804/12810] CXX obj\src\core\QtWebEngineCore.web_engine_settings.obj FAILED: ninja -t msvc -e environment.x64 -- cl.exe /nologo /showIncludes /FC @obj\src\core\QtWebEngineCore.web_engine_settings.obj.rsp /c %path_to_qt%\qt-everywhere-opensource-src-5.7.0\qtwebengine\src\core\web_engine_settings.cpp /Foobj\src\core\QtWebEngineCore.web_engine_settings.obj /Fdobj\src\core\QtWebEngineCore.cc.pdb %path_to_qt%\qt-everywhere-opensource-src-5.7.0\qtwebengine\src\core\web_engine_settings.cpp(350): fatal error C1083: Cannot open include file: 'web_engine_settings.moc': No such file or directory [12804/12810] CXX obj\src\core\QtWebEngineCore.location_provider_qt.obj FAILED: ninja -t msvc -e environment.x64 -- cl.exe /nologo /showIncludes /FC @obj\src\core\QtWebEngineCore.location_provider_qt.obj.rsp /c %path_to_qt%\qt-everywhere-opensource-src-5.7.0\qtwebengine\src\core\location_provider_qt.cpp /Foobj\src\core\QtWebEngineCore.location_provider_qt.obj /Fdobj\src\core\QtWebEngineCore.cc.pdb %path_to_qt%\qt-everywhere-opensource-src-5.7.0\qtwebengine\src\core\location_provider_qt.cpp(276): fatal error C1083: Cannot open include file: 'location_provider_qt.moc': No such file or directory [12804/12810] CXX obj\src\core\QtWebEngineCore.web_contents_adapter.obj ninja: build stopped: subcommand failed. NMAKE : fatal error U1077: '%path_to_qt%\qt-build\qtwebengine\src\3rdparty\ninja\ninja.exe' : return code '0x1' Stop.
After that I tried to create web_engine_settings.moc and location_provider_qt.moc manually, and after restarting the compilation process I got another bunch of errors:
QtWebEngineCore.url_request_custom_job_delegate.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QtWebEngineCore::Favico nManager::staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2 UQMetaObject@@B) QtWebEngineCore.url_request_qrc_job_qt.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QtWebEngineCore::FaviconManager: :staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQMetaObj ect@@B) QtWebEngineCore.user_resource_controller_host.obj : error LNK2001: unresolved ex ternal symbol "public: static struct QMetaObject const QtWebEngineCore::FaviconM anager::staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQ MetaObject@@B) QtWebEngineCore.ssl_host_state_delegate_qt.obj : error LNK2001: unresolved exter nal symbol "public: static struct QMetaObject const QtWebEngineCore::FaviconMana ger::staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQMet aObject@@B) QtWebEngineCore.surface_factory_qt.obj : error LNK2001: unresolved external symb ol "public: static struct QMetaObject const QtWebEngineCore::FaviconManager::sta ticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQMetaObject@ @B) QtWebEngineCore.type_conversion.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QtWebEngineCore::FaviconManager::static MetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQMetaObject@@B) QtWebEngineCore.url_request_context_getter_qt.obj : error LNK2001: unresolved ex ternal symbol "public: static struct QMetaObject const QtWebEngineCore::FaviconM anager::staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQ MetaObject@@B) QtWebEngineCore.permission_manager_qt.obj : error LNK2001: unresolved external s ymbol "public: static struct QMetaObject const QtWebEngineCore::FaviconManager:: staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQMetaObje ct@@B) QtWebEngineCore.render_view_observer_host_qt.obj : error LNK2001: unresolved ext ernal symbol "public: static struct QMetaObject const QtWebEngineCore::FaviconMa nager::staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQM etaObject@@B) QtWebEngineCore.render_widget_host_view_qt.obj : error LNK2001: unresolved exter nal symbol "public: static struct QMetaObject const QtWebEngineCore::FaviconMana ger::staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQMet aObject@@B) QtWebEngineCore.resource_dispatcher_host_delegate_qt.obj : error LNK2001: unreso lved external symbol "public: static struct QMetaObject const QtWebEngineCore::F aviconManager::staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCo re@@2UQMetaObject@@B) QtWebEngineCore.javascript_dialog_controller.obj : error LNK2001: unresolved ext ernal symbol "public: static struct QMetaObject const QtWebEngineCore::FaviconMa nager::staticMetaObject" (?staticMetaObject@FaviconManager@QtWebEngineCore@@2UQM etaObject@@B) ...
My configuration file is:
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 SET _ROOT=%path_to_qt%\qt-everywhere-opensource-src-5.7.0 SET PATH=C:\Perl64\bin;C:\Python\Python2711;%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH% SET QMAKESPEC=win32-msvc2015 SET _ROOT= call ../qt-everywhere-opensource-src-5.7.0/configure -mp -ltcg -no-icu -opengl desktop -debug-and-release -force-debug-info -opensource -prefix "C:\Qt\Qt_5.7.0\MSVS_2015_x86\d-rt_d-lib" -confirm-license -nomake examples
Is there a way to solve this problem?
Thanks in advance.
-
I have the same error (also for Qt 5.6.0).
Is there a solution ? -
No. It seems to be a bug in Qt.
-
Found the problem. It looks like during the initial stage of nmake, it was spitting out some errors complaining that the command line is too long. I found this ticket and patched those 3 files into my directory and it fixed the problem: https://codereview.qt-project.org/#/c/160622/
Later down the line I experienced another compile issue (https://bugreports.qt.io/browse/QTBUG-54455) and patching this file fixed it: https://codereview.qt-project.org/#/c/163955/