macOS 12.1 下载编译WebRTC问题记录

一、说在前面,确保网络状态良好,网络环境不好的情况下会出现各种各样奇奇怪怪的问题,

二、环境说明:

系统版本:macOS Monterey 12.1

网络状态:选一个结实耐用的梯子

Xcode:13.2.1

三、操作步骤

需提前进行git config配置,主要作用是配置git缓存区,配置git限速和超时时间,防止网络状态不佳时拉区代码失败,此时失败报错为

[0:03:18] error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly before end of the underlying stream
[0:03:18] error: 46809 bytes of body are still expected
[0:03:18] fetch-pack: unexpected disconnect while reading sideband packet
[0:03:18] fatal: early EOF
[0:03:18] fatal: fetch-pack: invalid index-pack output

git config --global http.postBuffer 1048576000
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
mkdir webrtc && cd webrtc
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

export PATH=$PATH:$PWD/depot_tools
fetch --nohooks webrtc

gclient sync

在gclient sync时候会出现如下warning报错:

6>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src/third_party" "/Users/zxp/webrtc/src/_gclient_third_party__82vl68a"' in /Users/zxp/webrtc failed; will retry after a short nap...
5>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src/testing" "/Users/zxp/webrtc/src/_gclient_testing_c5li5ftv"' in /Users/zxp/webrtc failed; will retry after a short nap...
2>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src/base" "/Users/zxp/webrtc/src/_gclient_base_7tuy5wvd"' in /Users/zxp/webrtc failed; will retry after a short nap...
3>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src/build" "/Users/zxp/webrtc/src/_gclient_build_idaqjb66"' in /Users/zxp/webrtc failed; will retry after a short nap...
7>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/chromium/src/tools" "/Users/zxp/webrtc/src/_gclient_tools_d6v3zqwj"' in /Users/zxp/webrtc failed; will retry after a short nap...

此时需要执行export DEPOT_TOOLS_UPDATE=0,之后在执行gclient sync

ps:在拉取代码的整个过程中,如果出现中断可以多次执行gclient sync 操作

你可能感兴趣的:(webrtc,mac,macos,webrtc)