在为Chromium创建构建目录时出现GN错误

时间:2017-10-22 13:24:46

标签: google-chrome build chromium gn

我正在尝试使用GN for Chromium源代码在我的Windows 10笔记本电脑上创建一个构建目录。这就是我所做的:

  1. 设置WIN TOOLCHAIN系统环境变量并将其设置为0
  2. C:\src\depot_tools附加到我的系统Path变量 - C:\src\depot_tools\src是源代码所在的位置
  3. 下载有效的GN.exe二进制文件并将其放在GN.exe.sha1所在的同一文件夹中,该文件夹位于C:\src\depot_tools\src\buildtools\win
  4. 尝试来运行gn gen out\Default,但这会不断被抛出 -

        gn gen out\Default
    Traceback (most recent call last):
      File "c:/src/depot_tools/src/build/vs_toolchain.py", line 493, in <module>
        sys.exit(main())
      File "c:/src/depot_tools/src/build/vs_toolchain.py", line 489, in main
        return commands[sys.argv[1]](*sys.argv[2:])
      File "c:/src/depot_tools/src/build/vs_toolchain.py", line 312, in CopyDlls
        _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True)
      File "c:/src/depot_tools/src/build/vs_toolchain.py", line 292, in _CopyRuntime
        suffix)
      File "c:/src/depot_tools/src/build/vs_toolchain.py", line 206, in _CopyUCRTRuntime
        _CopyRuntimeImpl(target, source)
      File "c:/src/depot_tools/src/build/vs_toolchain.py", line 193, in _CopyRuntimeImpl
        shutil.copy2(source, target)
      File "C:\src\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 130, in copy2
        copyfile(src, dst)
      File "C:\src\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 82, in copyfile
        with open(src, 'rb') as fsrc:
    IOError: [Errno 2] No such file or directory: 'C:\\Windows\\Sysnative\\msvcp140d.dll'
    ERROR at //build/toolchain/win/BUILD.gn:43:3: Script returned non-zero exit code.
      exec_script("../../vs_toolchain.py",
      ^----------
    Current dir: c:/src/depot_tools/src/out/Default/
    Command: C:/src/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe -- c:/src/depot_tools/src/build/vs_toolchain.py copy_dlls c:/src/depot_tools/src/out/Default Debug x64
    Returned 1 and printed out:
    
    Copying C:\Windows\Sysnative\ucrtbase.dll to c:/src/depot_tools/src/out/Default\ucrtbase.dll...
    Copying C:\Windows\Sysnative\msvcp140d.dll to c:/src/depot_tools/src/out/Default\msvcp140d.dll...
    
    See //BUILD.gn:69:1: which caused the file to be included.
    group("gn_all") {
    ^----------------
    

0 个答案:

没有答案