使用 MSVC 在 Windows 10 上编译 V8 引擎时出现编译错误
首先,我运行下一个命令:
python tools/dev/v8gen.py x64.release.sample
所有 GN 文件生成成功。之后我运行以下命令:
ninja -C out.gn/x64.release.sample v8_monolith
经过几分钟的编译,我收到很多编译错误:
[226/1842] LINK bytecode_builtins_list_generator.exe bytecode_builtins_list_generator.exe.pdb
FAILED: bytecode_builtins_list_generator.exe bytecode_builtins_list_generator.exe.pdb
..\..\third_party\llvm-build\Release+Asserts\bin\lld-link.exe /OUT:./bytecode_builtins_list_generator.exe /nologo -libpath:..\..\third_party\llvm-build\Release+Asserts\lib\clang\15.0.0\lib\windows "-libpath:../../../Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/ATLMFC/lib/x64" "-libpath:../../../Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/lib/x64" "-libpath:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64" /MACHINE:X64 /PDB:./bytecode_builtins_list_generator.exe.pdb @./bytecode_builtins_list_generator.exe.rsp
lld-link: error: procedure symbol record for `_CxxThrowException` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\throw.obj refers to PDB item index 0x134F which is not a valid function ID record
lld-link: error: procedure symbol record for `_IsExceptionObjectToBeDestroyed` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\ehhelpers.obj refers to PDB item index 0x1193 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameUnwindFilter` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\ehhelpers.obj refers to PDB item index 0x118E which is not a valid function ID record
lld-link: error: procedure symbol record for `__std_terminate` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\ehhelpers.obj refers to PDB item index 0x1190 which is not a valid function ID record
lld-link: error: procedure symbol record for `_CallSETranslator<__FrameHandler3>` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F7 which is not a valid function ID record
lld-link: error: procedure symbol record for `_CallSETranslator<__FrameHandler4>` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F8 which is not a valid function ID record
lld-link: error: procedure symbol record for `FH4::DecompFuncInfo` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x1151 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::ExecutionInCatch` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12EC which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler4::ExecutionInCatch` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12DF which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler4::FrameUnwindToEmptyState` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12E2 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::GetEstablisherFrame` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F0 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::GetRangeOfTrysToCheck` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F6 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::UnwindNestedFrames` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F1 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler4::UnwindNestedFrames` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12E3 which is not a valid function ID record
lld-link: error: procedure symbol record for `_CreateFrameInfo` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12DD which is not a valid function ID record
lld-link: error: procedure symbol record for `_GetThrowImageBase` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12EB which is not a valid function ID record
lld-link: error: procedure symbol record for `_SetImageBase` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12DB which is not a valid function ID record
lld-link: error: procedure symbol record for `_SetThrowImageBase` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12FB which is not a valid function ID record
lld-link: error: procedure symbol record for `__vcrt_getptd` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\per_thread_data.obj refers to PDB item index 0x1270 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::GetCurrentState` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\ehstate.obj refers to PDB item index 0x12F2 which is not a valid function ID record
lld-link: error: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
[235/1842] CXX obj/torque_base/implementation-visitor.obj
ninja: build stopped: subcommand failed.
是什么导致了这个问题?怎么解决呢?
First of all, I run next command:
python tools/dev/v8gen.py x64.release.sample
All GN files generating successfuly. After that I run following command:
ninja -C out.gn/x64.release.sample v8_monolith
After several minutes of compilation, I receive a lot of compilation error:
[226/1842] LINK bytecode_builtins_list_generator.exe bytecode_builtins_list_generator.exe.pdb
FAILED: bytecode_builtins_list_generator.exe bytecode_builtins_list_generator.exe.pdb
..\..\third_party\llvm-build\Release+Asserts\bin\lld-link.exe /OUT:./bytecode_builtins_list_generator.exe /nologo -libpath:..\..\third_party\llvm-build\Release+Asserts\lib\clang\15.0.0\lib\windows "-libpath:../../../Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/ATLMFC/lib/x64" "-libpath:../../../Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/lib/x64" "-libpath:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "-libpath:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64" /MACHINE:X64 /PDB:./bytecode_builtins_list_generator.exe.pdb @./bytecode_builtins_list_generator.exe.rsp
lld-link: error: procedure symbol record for `_CxxThrowException` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\throw.obj refers to PDB item index 0x134F which is not a valid function ID record
lld-link: error: procedure symbol record for `_IsExceptionObjectToBeDestroyed` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\ehhelpers.obj refers to PDB item index 0x1193 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameUnwindFilter` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\ehhelpers.obj refers to PDB item index 0x118E which is not a valid function ID record
lld-link: error: procedure symbol record for `__std_terminate` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\ehhelpers.obj refers to PDB item index 0x1190 which is not a valid function ID record
lld-link: error: procedure symbol record for `_CallSETranslator<__FrameHandler3>` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F7 which is not a valid function ID record
lld-link: error: procedure symbol record for `_CallSETranslator<__FrameHandler4>` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F8 which is not a valid function ID record
lld-link: error: procedure symbol record for `FH4::DecompFuncInfo` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x1151 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::ExecutionInCatch` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12EC which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler4::ExecutionInCatch` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12DF which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler4::FrameUnwindToEmptyState` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12E2 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::GetEstablisherFrame` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F0 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::GetRangeOfTrysToCheck` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F6 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::UnwindNestedFrames` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12F1 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler4::UnwindNestedFrames` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12E3 which is not a valid function ID record
lld-link: error: procedure symbol record for `_CreateFrameInfo` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12DD which is not a valid function ID record
lld-link: error: procedure symbol record for `_GetThrowImageBase` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12EB which is not a valid function ID record
lld-link: error: procedure symbol record for `_SetImageBase` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12DB which is not a valid function ID record
lld-link: error: procedure symbol record for `_SetThrowImageBase` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\risctrnsctrl.obj refers to PDB item index 0x12FB which is not a valid function ID record
lld-link: error: procedure symbol record for `__vcrt_getptd` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\per_thread_data.obj refers to PDB item index 0x1270 which is not a valid function ID record
lld-link: error: procedure symbol record for `__FrameHandler3::GetCurrentState` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\ehstate.obj refers to PDB item index 0x12F2 which is not a valid function ID record
lld-link: error: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
[235/1842] CXX obj/torque_base/implementation-visitor.obj
ninja: build stopped: subcommand failed.
What could be causing this problem? How to solve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,我是这样解决的:
希望这会有所帮助。
I encountered the same problem, and I solved it like this:
Hope this helps.