Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebRTC not building for Windows

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

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 component=shared_library'
DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_GENERATORS=msvs
GYP_MSVS_VERSION=2013

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.

like image 986
PropaneAccessories Avatar asked Jan 10 '23 03:01

PropaneAccessories


1 Answers

I have found this possible solution at Google Code

as per [email protected]'s sugestion

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.

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

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

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

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?

like image 72
537mfb Avatar answered Mar 06 '23 07:03

537mfb