phongcao / webrtc-mrvc-sample

WebRTC Mixed Remote View Compositor
MIT License
21 stars 2 forks source link

Setup.cmd fails to build WebRTC #5

Closed adrianimajion closed 6 years ago

adrianimajion commented 6 years ago

When I run Setup.cmd from the command prompt, the development environment sets up successfully and the initial WebRTC build setup proceeds successfully as well. However, it fails when compiling webrtc native libs at 60/2330.

[59/2330] CXX obj/third_party/libyuv/libyuv_internal/convert_argb.obj FAILED: obj/third_party/libyuv/libyuv_internal/convert_argb.obj ninja -t msvc -e environment.winuwp_x86 -- "c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools \msvc\14.15.26726\bin\hostx64\x86\cl.exe" /nologo /showIncludes @obj/third_party/libyuv/libyuv_internal/convert_argb .obj.rsp /c ../../third_party/libyuv/source/convert_argb.cc /Foobj/third_party/libyuv/libyuv_internal/convert_argb.ob j /Fd"obj/third_party/libyuv/libyuv_internal_cc.pdb" c:\program files (x86)\windows kits\10\include\10.0.17134.0\ucrt\corecrt_wstdlib.h(440): error C2375: '_wputenv': redef inition; different linkage [C:\webrtc-mrvc-sample\webrtc\webrtc\windows\projects\msvc\WebRtc.UWP.Native.Builder\ WebRtc.UWP.Native.Builder.vcxproj] C:\webrtc-mrvc-sample\webrtc\webrtc\xplatform\webrtc\third_party\winuwp_compat\winuwp_compat_std.h(91): note: see declaration of '_wputenv' c:\program files (x86)\windows kits\10\include\10.0.17134.0\ucrt\stdlib.h(1191): error C2375: 'getenv': redefinition; d ifferent linkage [C:\webrtc-mrvc-sample\webrtc\webrtc\windows\projects\msvc\WebRtc.UWP.Native.Builder\WebRtc.UWP .Native.Builder.vcxproj] C:\webrtc-mrvc-sample\webrtc\webrtc\xplatform\webrtc\third_party\winuwp_compat\winuwp_compat_std.h(54): note: see declaration of 'getenv' c:\program files (x86)\windows kits\10\include\10.0.17134.0\ucrt\stdlib.h(1208): error C2375: '_dupenv_s': redefinition ; different linkage [C:\webrtc-mrvc-sample\webrtc\webrtc\windows\projects\msvc\WebRtc.UWP.Native.Builder\WebRtc. UWP.Native.Builder.vcxproj]

Afterwards, it fails at most of the other items before printing a large amount of red failure text that's all about the same linkage redefinition issue, reporting around 20 errors in total.

I'm wondering if something is wrong with my environment, but I'm not sure. I should have the latest version of the W10 SDK and Visual Studio.

phongcao commented 6 years ago

Hi Adrian, It seems to be a known issue of WebRTC UWP when using Windows SDK 10.0.17134.0: https://github.com/webrtc-uwp/webrtc-uwp-sdk/issues/57

I believe that Mario encountered the same error and fixed it. Not sure about what he's changed. I'll try to see if I can reproduce it on my side.

adrianimajion commented 6 years ago

Thanks Phong, I replaced the header file as suggested in that issue and the dependencies are building now. I still encountered a type universe resolution error that caused the build script to report failure, but the solution builds fine afterwards.