microsoft / MixedReality-WebRTC

MixedReality-WebRTC is a collection of components to help mixed reality app developers integrate audio and video real-time communication into their application and improve their collaborative experience
https://microsoft.github.io/MixedReality-WebRTC/
MIT License
908 stars 282 forks source link

It's fail to Building the core WebRTC implementation #642

Open CHRIS-GIN opened 3 years ago

CHRIS-GIN commented 3 years ago

I've been trying to build libraries from source (MixedReality-WebRTC, master branch). I've installed all of the pre-requisites, according to the documentation. When I run,

cd tools\build .\build.ps1 -BuildConfig Release -BuildArch x64 -BuildPlatform Win32 # Desktop x64, e.g. Unity Editor

show the following error : D:/mr-webrtc/external/webrtc-uwp-sdk/webrtc/xplatform/depot_tools && gn gen .\out\webrtc_win_x64_release --ide=vs2017 -v (utility.py:573) [ERROR ] - [Utility ] - runSubprocess - [Error 5] (utility.py:597) [ERROR ] - [Prepare ] - __generateProjects - local variable 'process' referenced before assignment (prepare.py:217) [DEBUG ] - [Utility ] - popd - popd D:\mr-webrtc\tools\build (utility.py:395)

======================= Script execution STARTED =============================

================== Prepare webrtc win x64 release STARTED ========================= ====================== Failed preparing webrtc win x64 release ENDED=====================================

Build cannot run because preparation has failed for webrtc win x64 release

====================================== Build not run for webrtc win x64 release ENDED ======================================

========================================= SUMMARY =========================================

ACTION: prepare FAILED: webrtc win x64 release execution time: 0:00:00.034000


Total execution time: 0:00:01.774000 Aborting build due to error while building core WebRTC

I also tried to Building the MixedReality-WebRTC libraries according to doc show the following error

![Uploading 图片.png…]()

djee-ms commented 3 years ago

This is the first time I see this. Are you using Python 2.x? (this will not work with Python 3.x)

Qualcuno commented 3 years ago

Similar problem here.

PS C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\tools\build> .\build.ps1 -BuildConfig Release -BuildArch x64 -BuildPlatform Win32
Windows SDK 1803 10.0.17134 (April 2018)   : OK
Windows SDK 1809 10.0.17763 (October 2018) : OK
[INFO             ] - [System         ] - __updateDepotToolsPath         - Adding depot tools path 'C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\external\webrtc-uwp-sdk\scripts\..\.\webrtc\xplatform\depot_tools' to the PATH. (system.py:424)
[INFO             ] - [System         ] - __determineVisualStudioPath    - Visual studio path is C:\Program Files (x86)\Microsoft Visual Studio\2017\Community (system.py:487)
[DEBUG            ] - [System         ] - __determineVisualStudioPath    - MSVC tools path is C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC (system.py:488)
[DEBUG            ] - [System         ] - __determineVisualStudioPath    - MSVC tools bin path is C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26405\bin\Hostx64 (system.py:489)
[DEBUG            ] - [Utility        ] - runSubprocess                  - Running subprocess:
pip install pywin32 (utility.py:572)
[ERROR            ] - [Utility        ] - runSubprocess                  - [Error 2] Impossibile trovare il file specificato (utility.py:592)
Traceback (most recent call last):
  File "..\..\external\webrtc-uwp-sdk\scripts\run.py", line 350, in <module>

    ===================================== Script execution STARTED =====================================main()

  File "..\..\external\webrtc-uwp-sdk\scripts\run.py", line 271, in main
    System.setUp()

  File "C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\external\webrtc-uwp-sdk\scripts\system.py", line 92, in setUp
    cls.installPythonModules(config.PYTHON_PACKAGES_TO_INSTALL)
  File "C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\external\webrtc-uwp-sdk\scripts\system.py", line 123, in installPythonModules
    result = Utility.runSubprocess([cmd], Settings.logLevel == 'DEBUG')
  File "C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\external\webrtc-uwp-sdk\scripts\utility.py", line 594, in runSubprocess
    if process != None:
UnboundLocalError: local variable 'process' referenced before assignment
PS C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\tools\build> .\build.ps1 -BuildConfig Release -BuildArch x64 -BuildPlatform Win32
Windows SDK 1803 10.0.17134 (April 2018)   : OK
Windows SDK 1809 10.0.17763 (October 2018) : OK
[INFO             ] - [System         ] - __updateDepotToolsPath         - Adding depot tools path 'C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\external\webrtc-uwp-sdk\scripts\..\.\webrtc\xplatform\depot_tools' to the PATH. (system.py:424)
[INFO             ] - [System         ] - __determineVisualStudioPath    - Visual studio path is C:\Program Files (x86)\Microsoft Visual Studio\2017\Community (system.py:487)
[DEBUG            ] - [System         ] - __determineVisualStudioPath    - MSVC tools path is C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC (system.py:488)
[DEBUG            ] - [System         ] - __determineVisualStudioPath    - MSVC tools bin path is C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26405\bin\Hostx64 (system.py:489)
[DEBUG            ] - [Utility        ] - runSubprocess                  - Running subprocess:
pip install pywin32 (utility.py:572)
[ERROR            ] - [Utility        ] - runSubprocess                  - [Error 2] Impossibile trovare il file specificato (utility.py:592)
Traceback (most recent call last):
  File "..\..\external\webrtc-uwp-sdk\scripts\run.py", line 350, in <module>

===================================== Script execution STARTED =====================================
    main()

  File "..\..\external\webrtc-uwp-sdk\scripts\run.py", line 271, in main
    System.setUp()
  File "C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\external\webrtc-uwp-sdk\scripts\system.py", line 92, in setUp
    cls.installPythonModules(config.PYTHON_PACKAGES_TO_INSTALL)
  File "C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\external\webrtc-uwp-sdk\scripts\system.py", line 123, in installPythonModules
    result = Utility.runSubprocess([cmd], Settings.logLevel == 'DEBUG')
  File "C:\Users\sisinflab\Desktop\WebrtcUWP\MixedReality-WebRTC\external\webrtc-uwp-sdk\scripts\utility.py", line 594, in runSubprocess
    if process != None:
UnboundLocalError: local variable 'process' referenced before assignment

Build on windows10 and python 2.7.16

Qualcuno commented 3 years ago

Ok i solved replacing line 594 of utiliy.py def runSubprocess(cls, commands, shouldLog = False, userEnv = None): with def runSubprocess(cls, commands, shouldLog = False, userEnv = None, process = None): and build process now run but failed with

ACTION: prepare
         FAILED: webrtc   win   x86   release      execution time: 0:00:01.120000

with following errors:

......... others output lines ..........
[Running //third_party/abseil-cpp/absl/utility/BUILD.gn with toolchain //build/toolchain/win:x86ERROR] - [Utility] - runSubprocess - None (utility.py:590)

[Defining target //third_party/abseil-cpp/absl/utility:utility(//build/toolchain/win:x86)ERROR] - [Utility] - runSubprocess - Subprocess execution has failed! (utility.py:600)

[ERROR] - [Prepare] - __generateProjects - Projects generation has failed! (prepare.py:212)

......... others output lines ..........

ERROR at //build/config/compiler/BUILD.gn:1397:9: Script returned non-zero exit code.
        exec_script("../../win_is_xtree_patched.py", [], "value") == 0) {
        ^----------
Current dir: C:/mr-webrtc/external/webrtc-uwp-sdk/webrtc/xplatform/webrtc/out/webrtc_win_x86_release/
Command: C:/Users/sisinflab/AppData/Local/Microsoft/WindowsApps/python.exe C:/mr-webrtc/external/webrtc-uwp-sdk/webrtc/xplatform/webrtc/build/win_is_xtree_patched.py
Returned 9009.
See //build/config/BUILDCONFIG.gn:534:3: which caused the file to be included.
  "//build/config/compiler:default_stack_frames",
  ^---------------------------------------------
......... others output lines ..........