与GN的v8构建错误

时间:2017-02-21 14:13:55

标签: v8

我已经开始学习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\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

我已经阅读了铬的构建过程,并检查了互联网上描述的一些类似问题,但没有任何帮助。

2 个答案:

答案 0 :(得分:3)

尝试安装Windows 10独立SDK。 https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk

即使选择安装Windows 10 SDK,VS2015也不会安装cdb.exe。

答案 1 :(得分:0)

确保设置DEPOT_TOOLS_WIN_TOOLCHAIN = 0。另请参阅Chromium的depot tools instructionsrequirements