Qt6.7 Compile Failed From Source In Windows11
-
Hello everyone, I am using Windows 11 and Visual Studio Version 2022 to compile the Qt version 6.7.0 source code. However, I've encountered an issue, and I need your expertise in analyzing it. Thank you for considering my request.
The following code is my batch script
:: refer website
:: https://doc.qt.io/qt-6/windows-building.html
:: https://wiki.qt.io/Building_Qt_6_from_Git
:: https://wiki.qt.io/QtWebEngine**set PATH=C:\Windows\system32;C:\Windows;C:\Users\X\AppData\Local\Programs\Python\Python312;C:\Users\X\AppData\Local\Programs\Python\Python312\Scripts;C:\Program Files\nodejs;C:\GnuWin32\bin;
SET ARCH=amd64
set VC_VER=14.3
set WINDOWS_SDK_VER=10.0.22621.0:: set vs compiler environment
SET VS_ENVIRONMENT="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% %WINDOWS_SDK_VER% -vcvars_ver=%VC_VER%
call %VS_ENVIRONMENT%:: set llvm tool
:: (https://download.qt.io/development_releases/prebuilt/libclang/qt/, download the libclang)
set CMAKE_PREFIX_PATH=c:\libclangSET SRC_DIR="D:\Qt\qt670"
SET BUILD_DIR="qt670-build"
SET INSTALL_DIR="d:\Qt\qt670-vs2022-%ARCH%"
SET CONFIGURE_OPTIONS=-debug-and-release -opensource -confirm-license**
when run above script in windows terminal, it display the error
FAILED: v8_context_snapshot_generator.exe v8_context_snapshot_generator.exe.pdb
"C:/Users/X/AppData/Local/Programs/Python/Python312/python.exe" ../../../../../../qt670/qtwebengine/src/3rdparty/chromium/build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe "/OUT:./v8_context_snapshot_generator.exe" /nologo "/PDB:./v8_context_snapshot_generator.exe.pdb" "@./v8_context_snapshot_generator.exe.rsp"
popen args: ['link.exe', '/OUT:./v8_context_snapshot_generator.exe', '/nologo', '/PDB:./v8_context_snapshot_generator.exe.pdb', '@./v8_context_snapshot_generator.exe.rsp']
link.stdout: <_io.BufferedReader name=3>
line out: b' Creating library .\v8_context_snapshot_generator.lib and object .\v8_context_snapshot_generator.exp\r\n'
line out: b'LibDef: Total time = 0.016s\r\n'
LibDef: Total time = 0.016s
line out: b'blink_core.lib(core_jumbo_253.obj) : error LNK2019: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z) referenced in function "public: static class blink::SVGLengthList * __cdecl cppgc::MakeGarbageCollectedTrait<class blink::SVGLengthList>::Call<>(class cppgc::AllocationHandle &)" (??$Call@$$V@?$MakeGarbageCollectedTrait@VSVGLengthList@blink@@@cppgc@@SAPEAVSVGLengthList@blink@@AEAVAllocationHandle@1@@Z)\r\n'
blink_core.lib(core_jumbo_253.obj) : error LNK2019: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z) referenced in function "public: static class blink::SVGLengthList * __cdecl cppgc::MakeGarbageCollectedTrait<class blink::SVGLengthList>::Call<>(class cppgc::AllocationHandle &)" (??$Call@$$V@?$MakeGarbageCollectedTrait@VSVGLengthList@blink@@@cppgc@@SAPEAVSVGLengthList@blink@@AEAVAllocationHandle@1@@Z)
line out: b'blink_core.lib(core_jumbo_34.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
blink_core.lib(core_jumbo_34.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'animation.lib(animation_jumbo_1.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
animation.lib(animation_jumbo_1.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'exported.lib(exported_jumbo_2.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
exported.lib(exported_jumbo_2.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'blink_core.lib(core_jumbo_17.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
blink_core.lib(core_jumbo_17.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'blink_core.lib(core_jumbo_13.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
blink_core.lib(core_jumbo_13.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'blink_core.lib(core_jumbo_256.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
blink_core.lib(core_jumbo_256.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'blink_core.lib(core_jumbo_37.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
blink_core.lib(core_jumbo_37.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'blink_core.lib(core_jumbo_8.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
blink_core.lib(core_jumbo_8.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'blink_core.lib(core_jumbo_163.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
blink_core.lib(core_jumbo_163.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'blink_core.lib(core_jumbo_160.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
blink_core.lib(core_jumbo_160.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'blink_core.lib(core_jumbo_161.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)\r\n'
blink_core.lib(core_jumbo_161.obj) : error LNK2001: unresolved external symbol "enum blink::CSSPropertyID __cdecl blink::CssPropertyID(class blink::ExecutionContext const *,class WTF::String const &)" (?CssPropertyID@blink@@YA?AW4CSSPropertyID@1@PEBVExecutionContext@1@AEBVString@WTF@@@Z)
line out: b'blink_core.lib(core_jumbo_117.obj) : error LNK2019: unresolved external symbol "enum blink::mojom::CSSSampleId __cdecl blink::GetCSSSampleId(enum blink::CSSPropertyID)" (?GetCSSSampleId@blink@@YA?AW4CSSSampleId@mojom@1@W4CSSPropertyID@1@@Z) referenced in function "public: void __cdecl blink::UseCounterImpl::Count(enum blink::CSSPropertyID,enum blink::UseCounterImpl::CSSPropertyType,class blink::LocalFrame const *)" (?Count@UseCounterImpl@blink@@QEAAXW4CSSPropertyID@2@W4CSSPropertyType@12@PEBVLocalFrame@2@@Z)\r\n'
blink_core.lib(core_jumbo_117.obj) : error LNK2019: unresolved external symbol "enum blink::mojom::CSSSampleId __cdecl blink::GetCSSSampleId(enum blink::CSSPropertyID)" (?GetCSSSampleId@blink@@YA?AW4CSSSampleId@mojom@1@W4CSSPropertyID@1@@Z) referenced in function "public: void __cdecl blink::UseCounterImpl::Count(enum blink::CSSPropertyID,enum blink::UseCounterImpl::CSSPropertyType,class blink::LocalFrame const *)" (?Count@UseCounterImpl@blink@@QEAAXW4CSSPropertyID@2@W4CSSPropertyType@12@PEBVLocalFrame@2@@Z)
line out: b'animation.lib(animation_jumbo_2.obj) : error LNK2001: unresolved external symbol "int __cdecl blink::ResolveCSSPropertyAlias(int)" (?ResolveCSSPropertyAlias@blink@@YAHH@Z)\r\n'
animation.lib(animation_jumbo_2.obj) : error LNK2001: unresolved external symbol "int __cdecl blink::ResolveCSSPropertyAlias(int)" (?ResolveCSSPropertyAlias@blink@@YAHH@Z)...
FAILED: qtwebengine/src/core/Release/AMD64/QtWebEngineCore.stamp qtwebengine/src/core/Release/AMD64/obj/tools/v8_context_snapshot/v8_context_snapshot.stamp qtwebengine/src/core/Release/AMD64/QtWebEngineCore D:/Qt/qt670-build/qtwebengine/src/core/Release/AMD64/QtWebEngineCore.stamp D:/Qt/qt670-build/qtwebengine/src/core/Release/AMD64/obj/tools/v8_context_snapshot/v8_context_snapshot.stamp D:/Qt/qt670-build/qtwebengine/src/core/Release/AMD64/QtWebEngineCore
C:\Windows\system32\cmd.exe /C "cd /D D:\Qt\qt670-build\qtwebengine\src\core && D:\GnuWin32\bin\ninja.exe -C D:/Qt/qt670-build/qtwebengine/src/core/Release/AMD64 QtWebEngineCore"
ninja: build stopped: subcommand failed. -
@thinking The batch file you provide does not actually attempt to configure or build anything. I am going to assume you did something semi-obvious with the last four/five environment variables.
The link errors you are seeing are the result of a missing library or library with missing components.
Seems very similar to this report. Make sure that your source tree contains good copy of the browser engine on a stable branch.This sort of thing can also be caused by a parallel build on source where the dependencies are not entirely captured: it builds something out-of-order and fails.
If you run ninja again, perhaps several times, do the result change?
If you runninja -j 1
does the result change? -
@ChrisW67 Thank you very much! I tried the way you suggested, but the error was still, and have the same wrong message. The remaining command see the following code
if not exist %BUILD_DIR% (
mkdir %BUILD_DIR%
)cd %BUILD_DIR%
call %SRC_DIR%\configure.bat -prefix %INSTALL_DIR% %CONFIGURE_OPTIONS%:: cmake --build . --parallel
cmake --fresh --build .
cmake --install .pause
At last, i installed the qt 6.7.0 using online installer (https://download.qt.io/official_releases/online_installers/) ...
The compilation problem may be caused by the non-normal generation of the file 'css_property_names.cc' that located at 'qt670-build\qtwebengine\src\core\Release\AMD64\gen\third_party\blink\renderer\core\css'. Because the file content is incomplete
-
-
I encountered the same problem. Is there a solution? Or a trick that I have to delete certain files so they are generated again?
-
Seems my gperf version was not correct. When I deleted the file css_property_names.cc I got a message that gperf was not found. I installed it a whiel a go via "pip install gperf". No I did it with "winget install gperf". I have now version 3.1
-
With a complete rebuild it finaly worked.