GN 的 v8 构建错误
v8 build error with GN
我已经开始学习 v8 引擎并且在很早的阶段就开始学习了,因为我无法从源代码构建静态库 (link)。
我一步一步地按照本指南进行
但我在执行时出错
python tools/dev/v8gen.py x64.release
我的v8本地拷贝放在D:\root\another\deps\v8
所以错误:
D:\depot_tools\python276_bin\python.exe -u tools\mb\mb.py gen -f infra\mb\mb_config.pyl -m developer_default -b x64.release out.gn/x64.release
Writing """\
is_debug = false
target_cpu = "x64"
""" to D:\root\another\deps\v8\out.gn\x64.release\args.gn.
D:\root\another\deps\v8\buildtools\win\gn.exe gen out.gn/x64.release --check
-> returned 1
ERROR at //build/toolchain/win/BUILD.gn:38:3: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py",
^----------
Current dir: D:/root/another/deps/v8/out.gn/x64.release/
Command: D:/depot_tools/python276_bin/python.exe -- D:/root/another/deps/v8/build/vs_toolchain.py copy_dlls D:/root/another/deps/v8/out.gn/x64.release Release x64
Returned 1 and printed out:
Copying C:\Program Files (x86)\Windows Kits\Debuggers\x64\cdb.exe to D:/root/another/deps/v8/out.gn/x64.release\cdb.exe...
See //BUILD.gn:421:1: which caused the file to be included.
action("js2c") {
^----------------
Traceback (most recent call last):
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 449, in <module>
sys.exit(main())
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 445, in main
return commands[sys.argv[1]](*sys.argv[2:])
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 317, in CopyDlls
_CopyDebugger(target_dir, target_cpu)
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 337, in _CopyDebugger
_CopyRuntimeImpl(target_path, full_path)
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 197, in _CopyRuntimeImpl
shutil.copy2(source, target)
File "D:\depot_tools\python276_bin\lib\shutil.py", line 130, in copy2
copyfile(src, dst)
File "D:\depot_tools\python276_bin\lib\shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe'
GN gen failed: 1
Traceback (most recent call last):
File "tools/dev/v8gen.py", line 304, in <module>
sys.exit(gen.main())
File "tools/dev/v8gen.py", line 298, in main
return self._options.func()
File "tools/dev/v8gen.py", line 166, in cmd_gen
gn_outdir,
File "tools/dev/v8gen.py", line 208, in _call_cmd
stderr=subprocess.STDOUT,
File "D:\depot_tools\python276_bin\lib\subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['D:\depot_tools\python276_bin\python.exe', '-u', 'tools\mb\mb.py', 'gen', '-f', 'infra\mb\mb_config.pyl', '-m', 'developer_default', '-b', 'x64.release', 'out.gn/x64.release']' returned non-zero exit status 1
我已经阅读了 chromium 的构建过程并查看了网上描述的一些类似问题,但没有任何帮助。
确保设置 DEPOT_TOOLS_WIN_TOOLCHAIN=0。另见 Chromium 的 depot tools instructions and requirements.
尝试安装 Windows 10 独立 SDK。
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
即使选择它来安装 Windows 10 SDK,VS2015 似乎也没有安装 cdb.exe。
我已经开始学习 v8 引擎并且在很早的阶段就开始学习了,因为我无法从源代码构建静态库 (link)。 我一步一步地按照本指南进行 但我在执行时出错
python tools/dev/v8gen.py x64.release
我的v8本地拷贝放在D:\root\another\deps\v8 所以错误:
D:\depot_tools\python276_bin\python.exe -u tools\mb\mb.py gen -f infra\mb\mb_config.pyl -m developer_default -b x64.release out.gn/x64.release
Writing """\
is_debug = false
target_cpu = "x64"
""" to D:\root\another\deps\v8\out.gn\x64.release\args.gn.
D:\root\another\deps\v8\buildtools\win\gn.exe gen out.gn/x64.release --check
-> returned 1
ERROR at //build/toolchain/win/BUILD.gn:38:3: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py",
^----------
Current dir: D:/root/another/deps/v8/out.gn/x64.release/
Command: D:/depot_tools/python276_bin/python.exe -- D:/root/another/deps/v8/build/vs_toolchain.py copy_dlls D:/root/another/deps/v8/out.gn/x64.release Release x64
Returned 1 and printed out:
Copying C:\Program Files (x86)\Windows Kits\Debuggers\x64\cdb.exe to D:/root/another/deps/v8/out.gn/x64.release\cdb.exe...
See //BUILD.gn:421:1: which caused the file to be included.
action("js2c") {
^----------------
Traceback (most recent call last):
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 449, in <module>
sys.exit(main())
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 445, in main
return commands[sys.argv[1]](*sys.argv[2:])
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 317, in CopyDlls
_CopyDebugger(target_dir, target_cpu)
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 337, in _CopyDebugger
_CopyRuntimeImpl(target_path, full_path)
File "D:/root/another/deps/v8/build/vs_toolchain.py", line 197, in _CopyRuntimeImpl
shutil.copy2(source, target)
File "D:\depot_tools\python276_bin\lib\shutil.py", line 130, in copy2
copyfile(src, dst)
File "D:\depot_tools\python276_bin\lib\shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe'
GN gen failed: 1
Traceback (most recent call last):
File "tools/dev/v8gen.py", line 304, in <module>
sys.exit(gen.main())
File "tools/dev/v8gen.py", line 298, in main
return self._options.func()
File "tools/dev/v8gen.py", line 166, in cmd_gen
gn_outdir,
File "tools/dev/v8gen.py", line 208, in _call_cmd
stderr=subprocess.STDOUT,
File "D:\depot_tools\python276_bin\lib\subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['D:\depot_tools\python276_bin\python.exe', '-u', 'tools\mb\mb.py', 'gen', '-f', 'infra\mb\mb_config.pyl', '-m', 'developer_default', '-b', 'x64.release', 'out.gn/x64.release']' returned non-zero exit status 1
我已经阅读了 chromium 的构建过程并查看了网上描述的一些类似问题,但没有任何帮助。
确保设置 DEPOT_TOOLS_WIN_TOOLCHAIN=0。另见 Chromium 的 depot tools instructions and requirements.
尝试安装 Windows 10 独立 SDK。 https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
即使选择它来安装 Windows 10 SDK,VS2015 似乎也没有安装 cdb.exe。