在外部 SSD 驱动器上编译时编译 v8 时出错

问题描述 投票:0回答:1

我正在尝试在 Windows 11 上编译 v8,使用 VisualStudio 2022 社区版。到目前为止,谷歌搜索和 stackoverflowing 对我没有帮助。我按照v8文档源代码中描述的步骤进行操作。 首先,我在外部 SSD 驱动器上下载并更新 depot_tools。在我解压 depot_tools 并运行 gclient 后,我得到以下信息,根据文档,这不是预期的:

D:\compile\google\depot_tools>gclient
Updating depot_tools...
The filename, directory name, or volume label syntax is incorrect.
Downloading CIPD client for windows-amd64 from https://chrome-infra-packages.appspot.com/client?platform=windows-amd64&version=git_revision:b1f414539ac10cc67a0250890a38712cc06cf102...
error: could not write config file D:/compile/google/depot_tools/bootstrap-2@3_11_8_chromium_35_bin/git/etc/gitconfig: File exists
Traceback (most recent call last):
  File "D:\compile\google\depot_tools\bootstrap\bootstrap.py", line 347, in <module>
    sys.exit(main(sys.argv[1:]))
             ^^^^^^^^^^^^^^^^^^
  File "D:\compile\google\depot_tools\bootstrap\bootstrap.py", line 319, in main
    git_postprocess(template, os.path.join(bootstrap_dir, 'git'))
  File "D:\compile\google\depot_tools\bootstrap\bootstrap.py", line 292, in git_postprocess
    call_if_outdated(os.path.join(git_directory, '.git_postprocess'),
  File "D:\compile\google\depot_tools\bootstrap\bootstrap.py", line 139, in call_if_outdated
    fn()
  File "D:\compile\google\depot_tools\bootstrap\bootstrap.py", line 281, in configure_git_system
    _check_call(
  File "D:\compile\google\depot_tools\bootstrap\bootstrap.py", line 196, in _check_call
    raise subprocess.CalledProcessError(proc.returncode, argv, None)
subprocess.CalledProcessError: Command '['D:\\compile\\google\\depot_tools\\git.bat', 'config', '--system', 'core.autocrlf', 'false']' returned non-zero exit status 4.

我删除了

D:/compile/google/depot_tools/bootstrap-2@3_11_8_chromium_35_bin/git/etc/gitconfig
并再次运行 gclient,显然成功了,但只是显然,永远不知道。但
fetch v8
无论如何都失败了。

在执行

fetch
步骤时,出现以下错误

Error: Command '%ProgramFiles%\\Git\\mingw64\\bin\\git.exe -c color.ui=never config --local --replace-all remote.origin.fetch +refs/branch-heads/*:refs/remotes/branch-heads/* ^\\+refs/branch-heads/\\*:.*$' returned non-zero exit status 128 in D:\compile\google\v8
fatal: --local can only be used inside a git repository

D:
驱动器是外部SSD驱动器,但我预计这不会造成任何问题。过去,我已经成功地在外部 HDD 驱动器和内部 HDD 上进行编译。 这是初始文件夹结构

D:\compile\google\  
D:\compile\google\depot_tools

以及初始环境设置

>set
...
Path=%ProgramFiles%\Git\usr\bin;%ProgramFiles%\Git\mingw64\bin;%ProgramFiles%\Git\cmd;D:\compile\google\depot_tools;......
vs2022_install=%ProgramFiles%\Microsoft Visual Studio\2022\Community
...
8>git config --list --global
user.name=MyAndMyself
[email protected]
safe.directory=D:/compile/google/depot_tools
safe.directory=D:/compile/google/chromium/src
safe.directory=D:/compile/google/v8
safe.directory=D:/compile/google/v8/v8
core.longpaths=true
core.autocrlf=false
core.filemode=false
branch.autosetuprebase=always

然后我按照上述文档中的描述进行操作

cd /D D:\compile\google\
mkdir v8
cd v8

fetch 做了不同的事情,并且还添加了一个新目录

D:\compile\google\v8\v8

D:\compile\google\v8>fetch v8
Updating depot_tools...
Running: '%USERPROFILE%\AppData\Local\.vpython-root\store\python_venv-i6tr2130veudc7mkhurk6h3cao\contents\Scripts\python3.exe' 'D:\compile\google\depot_tools\gclient.py' root
Running: '%USERPROFILE%\AppData\Local\.vpython-root\store\python_venv-i6tr2130veudc7mkhurk6h3cao\contents\Scripts\python3.exe' 'D:\compile\google\depot_tools\gclient.py' config --spec 'solutions = [
  {
    "name": "v8",
    "url": "https://chromium.googlesource.com/v8/v8.git",
    "deps_file": "DEPS",
    "managed": False,
    "custom_deps": {},
  },
]
'
Running: '%USERPROFILE%\AppData\Local\.vpython-root\store\python_venv-i6tr2130veudc7mkhurk6h3cao\contents\Scripts\python3.exe' 'D:\compile\google\depot_tools\gclient.py' sync --with_branch_heads

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/v8/v8.git D:\compile\google\v8\_gclient_v8_kyoywjwd' in 'D:\compile\google\v8'
Cloning into 'D:\compile\google\v8\_gclient_v8_kyoywjwd'...
remote: Total 1136232 (delta 918600), reused 1136232 (delta 918600)
Receiving objects: 100% (1136232/1136232), 1.43 GiB | 19.36 MiB/s, done.
Resolving deltas: 100% (918600/918600), done.

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/v8/v8.git D:\compile\google\v8\_gclient_v8__cglk3b5' in 'D:\compile\google\v8'
Cloning into 'D:\compile\google\v8\_gclient_v8__cglk3b5'...
remote: Total 1136232 (delta 918600), reused 1136232 (delta 918600)
Receiving objects: 100% (1136232/1136232), 1.43 GiB | 19.61 MiB/s, done.
Resolving deltas: 100% (918600/918600), done.
Syncing projects: 100% ( 1/ 1) v8
v8 (ERROR)
----------------------------------------
[0:00:00] Started.
[0:00:01]
[0:03:50] _____ Conflicting directory found in D:\compile\google\v8\v8. Moving to D:\compile\google\v8\_bad_scm\v8clftymnp.
[0:03:50]
----------------------------------------
Error: Command '%ProgramFiles%\\Git\\mingw64\\bin\\git.exe -c color.ui=never config --local --replace-all remote.origin.fetch +refs/branch-heads/*:refs/remotes/branch-heads/* ^\\+refs/branch-heads/\\*:.*$' returned non-zero exit status 128 in D:\compile\google\v8
fatal: --local can only be used inside a git repository



Warnings:
Conflicting directory D:\compile\google\v8\v8 moved to D:\compile\google\v8\_bad_scm\v8clftymnp.

Subprocess failed with return code 1.

D:\compile\google\v8>
git chromium v8 depottools
1个回答
0
投票

这不适用于外部 SSD 驱动器。但适用于内部 SSD。我遵循了仓库工具的所有步骤,但在内部驱动器上,并得到了以下输出:
gclient run result
第二步,

fetch v8
我在外部SSD上进行了操作。结果成功了。

D:\compile\google>md v8

D:\compile\google>cd v8

D:\compile\google\v8>fetch v8
Updating depot_tools...
Running: 'C:\Users\filip\AppData\Local\.vpython-root\store\python_venv-i6tr2130veudc7mkhurk6h3cao\contents\Scripts\python3.exe' 'C:\DiskD\programe\source\depot_tools\gclient.py' root
Running: 'C:\Users\filip\AppData\Local\.vpython-root\store\python_venv-i6tr2130veudc7mkhurk6h3cao\contents\Scripts\python3.exe' 'C:\DiskD\programe\source\depot_tools\gclient.py' config --spec 'solutions = [
  {
    "name": "v8",
    "url": "https://chromium.googlesource.com/v8/v8.git",
    "deps_file": "DEPS",
    "managed": False,
    "custom_deps": {},
  },
]
'
Running: 'C:\Users\filip\AppData\Local\.vpython-root\store\python_venv-i6tr2130veudc7mkhurk6h3cao\contents\Scripts\python3.exe' 'C:\DiskD\programe\source\depot_tools\gclient.py' sync --with_branch_heads

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/v8/v8.git D:\compile\google\v8\_gclient_v8_ebld6x4n' in 'D:\compile\google\v8'
Cloning into 'D:\compile\google\v8\_gclient_v8_ebld6x4n'...
remote: Finding sources: 100% (60/60)           ng objects: 1
remote: Total 1137789 (delta 919626), reused 1137767 (delta 919626)
Receiving objects: 100% (1137789/1137789), 1.44 GiB | 20.19 MiB/s, done.
Resolving deltas: 100% (919626/919626), done.

[0:02:40] Still working on:
[0:02:40]   v8

[0:02:50] Still working on:
[0:02:50]   v8

[0:03:00] Still working on:
[0:03:00]   v8

[0:03:10] Still working on:
[0:03:10]   v8
1>Syncing projects:   0% ( 0/ 2)
[0:03:19] Still working on:
[0:03:19]   v8

[0:03:19] Still working on:
[0:03:19]   v8
Syncing projects: 100% (39/39), done.

________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-spec-tests/tests.tar.gz.sha1' in 'D:\compile\google\v8\v8'
0> Downloading test/wasm-spec-tests/tests.tar.gz@ca113d061aedcf62fd53761337efc73e17fcc5bd...
0> Extracting 1064 entries from test/wasm-spec-tests/tests.tar.gz to test/wasm-spec-tests/tests
Downloading 1 files took 56.756558 second(s)
Hook 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-spec-tests/tests.tar.gz.sha1' took 57.00 secs
Running hooks:  39% ( 9/23) wasm_js
________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-js/tests.tar.gz.sha1' in 'D:\compile\google\v8\v8'
0> Downloading test/wasm-js/tests.tar.gz@bd895cf2be978dd981234ba213e594cf09bfe7a6...
0> Extracting 310 entries from test/wasm-js/tests.tar.gz to test/wasm-js/tests
Downloading 1 files took 6.226099 second(s)
Hook 'vpython3.bat -vpython-spec .vpython3 -vpython-tool install' took 15.53 secs
Running hooks:  95% (22/23) configure_reclient_cfgs
________ running 'python3 buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance projects/rbe-chrome-untrusted/instances/default_instance --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project  --skip_remoteexec_cfg_fetch' in 'D:\compile\google\v8\v8'
generate reproxy.cfg using D:\compile\google\v8\v8\buildtools\reclient_cfgs\reproxy_cfg_templates\reproxy.cfg.template
Running hooks: 100% (23/23), done.
Running: git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
Running: git config diff.ignoreSubmodules dirty

但是我必须编译,并且不知道它会如何表现。至少,第一个准备步骤已经完成,没有错误。

© www.soinside.com 2019 - 2024. All rights reserved.