我已经开始学习v8引擎了,因为我不能从源代码(link)构建静态库。我按照本指南一步一步地执行了,但在执行时出现错误
python tools/dev/v8gen.py x64.release我的根本地副本放在D:\ v8 \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\10\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我已经阅读了铬的构建过程,并在互联网上查看了一些类似的问题,但都没有真正有帮助。
发布于 2017-03-09 23:53:05
尝试安装Windows 10单机版SDK。https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
似乎VS2015没有安装cdb.exe,即使选择它来安装Windows10SDK。
发布于 2017-02-22 18:55:30
确保设置了DEPOT_TOOLS_WIN_TOOLCHAIN=0。参见Chromium的depot tools instructions和requirements。
https://stackoverflow.com/questions/42369729
复制相似问题