WebRTC 不是为 Windows 构建的 [英] WebRTC not building for Windows

查看:15
本文介绍了WebRTC 不是为 Windows 构建的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试为 Windows 构建 WebRTC 时,我都会在运行 gclient runhooks 时收到此错误:

Whenever I try build WebRTC for Windows, I get this error when running gclient runhooks:

    ________ running 'C:\path\to\depot_tools\python276_bin\python.exe src/build
/landmines.py' in 'C:\path\to\webrtc\src\chromium' 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:\path\to\webrtc\src\chromium\src\build\gyp_environment.py", line 33, in
SetEnvironment
    vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
File "C:\path\to\webrtc\src\chromium\src\build\vs_toolchain.py", line 34, in
SetEnvironmentAndGetRuntimeDllDirs
    Update()
File "C:\path\to\webrtc\src\chromium\src\build\vs_toolchain.py", line 179, in
Update
    subprocess.check_call(get_toolchain_args)
File "C:\path\to\depot_tools\python276_bin\lib\subprocess.py", line 540, in
check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\path\\to\\depot_tools\\python276_bin\\python.exe',
'C:\\path\\to\\depot_tools\\win_toolchain\\get_toolchain_if_necessary.py', '--output-json',
'C:\\path\\to\\webrtc\\src\\chromium\\src\\build\\win_toolchain.json', 
'ee7d718ec60c2dc5d255bbe325909c2021a7efef']' returned non-zero exit status 1
Error: Command C:\path\to\depot_tools\python276_bin\python.exe src/build/landmines.py returned non-zero exit status 1 in C:\path\to\webrtc\src\chromium
Hook ''C:\path\to\depot_tools\python276_bin\python.exe' src/build/landmines.py' took 68.55 secs
Error: Command C:\path\to\depot_tools\python276_bin\python.exe - u src/sync_chromium.py --target-revision 271c6cca48a6cef32c0f3add3b17b700707deec 5 returned non-zero exit status 2 in C:\path\to\webrtc
Hook ''C:\path\to\depot_tools\python276_bin\python.exe' -u src/sync_chromium.py --target-revision 271c6cca48a6cef32c0f3add3b17b700707deec5' took 3842.34 secs

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

I'm using 64-bit Windows 7 with VS 2013 installed. I've already tried setting the following variables:

GYP_DEFINES='windows_sdk_path="C:\path\to\windows\sdk" platform=win组件=shared_library'
DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_GENERATORS=msvs
GYP_MSVS_VERSION=2013

GYP_DEFINES='windows_sdk_path="C:\path\to\windows\sdk" platform=win component=shared_library'
DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_GENERATORS=msvs
GYP_MSVS_VERSION=2013

尝试构建 Chromium 也会出现同样的错误.使用 nohooks 获取工作正常,只有当我尝试 gclient sync 或 runhooks 时才会发生错误.我也试过用忍者建造,但也失败了.我已经拥有所有 SDK 和最新版本.对此的任何帮助将不胜感激.

Attempting to build chromium also gives the same error. Fetching with nohooks works fine, it's just when I try gclient sync or runhooks that the error occurs. I've also tried building with ninja, and that fails as well. I've got all SDKs and such all up to date. Any help with this would be greatly appreciated.

推荐答案

我在 谷歌代码

根据 braveyao@webrtc.org 的建议

支持 msvs 不是 Chromium 的重点.你可以试试忍者应该总是工作.你也可以尝试设置GYP_GENERATORS=msvs-ninja,ninja".然后你可以用忍者和用VS2013调试.

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.

此外,Chromium 现在只有 64 位,因此您还需要更改 GYP_DEFINES

Also, chromium is now 64bit only so you need to change GYP_DEFINES aswell

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

so your envirnment variables should be:

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

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

Of course replace 2013 if that's not the version of Visual Studio you have installed

如果您考虑过,您可能需要删除已经下载的内容并在更改后重新fetch webrtc

you may need to delete what you already have downloaded and do a fresh fetch webrtc after that change if you thinkered with it

我还应该补充一点,Windows 必须是英文版本(如果您在安装其他语言包后可以,但它必须是英文原版)-我家里有一个 PT-PT 版本,并且总是出现错误运行 gclient 同步时的一些 python 文件 - 虽然我最初有英文版本并安装了 PT-PT 语言包但它工作正常

I should also add that the Windows must be english version (it's ok if you after install some other language pack but it must be originally english) - i have a PT-PT version at home and that one always gives an error with some python file when running gclient sync - at work though i originally had english version and installed the PT-PT language pack but it works fine

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

This is what worked for me. Does that work for you?

这篇关于WebRTC 不是为 Windows 构建的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆