加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

WebRTC不适用于Windows

发布时间:2020-12-14 02:05:43 所属栏目:Windows 来源:网络整理
导读:每当我尝试为 Windows构建WebRTC时,运行gclient runhooks时会出现此错误: ________ running 'C:pathtodepot_toolspython276_binpython.exe src/build/landmines.py' in 'C:pathtowebrtcsrcchromium' Please follow the instructionsat http://www
每当我尝试为 Windows构建WebRTC时,运行gclient runhooks时会出现此错误:

________ running 'C:pathtodepot_toolspython276_binpython.exe src/build
/landmines.py' in 'C:pathtowebrtcsrcchromium' Please follow the instructions
at http://www.chromium.org/developers/how-tos/bui ld-instructions-windows
Traceback (most recent call last):
File "src/build/landmines.py",line 215,in <module> 
    sys.exit(main())
File "src/build/landmines.py",line 202,in main
    gyp_environment.SetEnvironment()
File "C:pathtowebrtcsrcchromiumsrcbuildgyp_environment.py",line 33,in
SetEnvironment
    vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
File "C:pathtowebrtcsrcchromiumsrcbuildvs_toolchain.py",line 34,in
SetEnvironmentAndGetRuntimeDllDirs
    Update()
File "C:pathtowebrtcsrcchromiumsrcbuildvs_toolchain.py",line 179,in
Update
    subprocess.check_call(get_toolchain_args)
File "C:pathtodepot_toolspython276_binlibsubprocess.py",line 540,in
check_call
    raise CalledProcessError(retcode,cmd)
subprocess.CalledProcessError: Command '['C:pathtodepot_toolspython276_binpython.exe','C:pathtodepot_toolswin_toolchainget_toolchain_if_necessary.py','--output-json','C:pathtowebrtcsrcchromiumsrcbuildwin_toolchain.json','ee7d718ec60c2dc5d255bbe325909c2021a7efef']' returned non-zero exit status 1
Error: Command C:pathtodepot_toolspython276_binpython.exe src/build/landmines.py returned non-zero exit status 1 in C:pathtowebrtcsrcchromium
Hook ''C:pathtodepot_toolspython276_binpython.exe' src/build/landmines.py' took 68.55 secs
Error: Command C:pathtodepot_toolspython276_binpython.exe - u src/sync_chromium.py --target-revision 271c6cca48a6cef32c0f3add3b17b700707deec 5 returned non-zero exit status 2 in C:pathtowebrtc
Hook ''C:pathtodepot_toolspython276_binpython.exe' -u src/sync_chromium.py --target-revision 271c6cca48a6cef32c0f3add3b17b700707deec5' took 3842.34 secs

我正在使用安装了VS 2013的64位Windows 7.我已经尝试过设置以下变量:

GYP_DEFINES=’windows_sdk_path=”C:pathtowindowssdk” platform=win
component=shared_library’
DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_GENERATORS=msvs
GYP_MSVS_VERSION=2013

试图制造铬也会产生同样的错误.使用nohooks获取工作正常,就在我尝试gclient sync或runhooks时发生错误.我也试过用忍者建造,但也失败了.我已经拥有所有SDK,所有这些都是最新的.任何有关这方面的帮助将不胜感激.

解决方法

我在 Google Code找到了这个可能的解决方案

根据braveyao@webrtc.org的消息

Supporting msvs is not the focus of Chromium. You can try ninja which
should always work. Also you could try to set the
“GYP_GENERATORS=msvs-ninja,ninja”. Then you could build with ninja and
debug with VS2013.

此外,铬现在只有64位,所以你需要改变GYP_DEFINES

所以你的环境变量应该是:

GYP_DEFINES=target_arch=x64
DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_GENERATORS=msvs-ninja,ninja
GYP_MSVS_VERSION=2013

当然,如果不是您安装的Visual Studio版本,请替换2013

您可能需要删除已下载的内容,并在更改后再执行一次新的获取webrtc,如果您使用它进行了细化

我还应该补充一点,Windows必须是英文版(如果你安装了一些其他语言包之后没关系,但它必须是英文版) – 我家里有一个PT-PT版本,而且一个python文件总是出错当运行gclient同步 – 在工作虽然我最初有英文版并安装了PT-PT语言包,但它工作正常

这对我有用.那对你有用吗?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读