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
913 stars 283 forks source link

Building from latest sources LINK error for 2 out of 3 build targets #703

Open astaikos316 opened 3 years ago

astaikos316 commented 3 years ago

Describe the bug Attempting to build from sources recent pull from repo, i get a LINK error showing cannot open input file mrwebrtc.lib for x86 and ARM build targets. I get no errors for x64 build target.

To Reproduce Cloned latest source from master. Ran Powershell scripts for each of the 3 build targets. Open visual studio solution and try to build for each of the 3 build target architectures. X64 fully succeeds, x86 and ARM have 1 failure (cannot open input file mrwebrtc.lib)

Expected behavior Clean build for all three build target architectures.

Environment

Kawottex commented 3 years ago

Hello, is there any news on this issue ? I've got the same problem with master branch but not with release/2.0.

djee-ms commented 3 years ago

I tried from a fresh clone and everything works as intended.

git clone --recursive https://github.com/microsoft/MixedReality-WebRTC.git -b master mr-webrtc-temp
powershell
cd tools\build
.\build.ps1 -BuildConfig Debug -BuildArch x64 -BuildPlatform Win32
.\build.ps1 -BuildConfig Debug -BuildArch x86 -BuildPlatform UWP
.\build.ps1 -BuildConfig Debug -BuildArch ARM -BuildPlatform UWP

then switch to Visual Studio and build:

cannot open input file mrwebrtc.lib

I assume you mean webrtc.lib and not mrwebrtc.lib.

x86 and ARM have 1 failure

If Visual Studio complains it cannot find webrtc.lib it's because it's not built. Use the build.ps1 script to build the variant you're missing, or provide more details about exactly what you are trying to do and what you are building in Visual Studio (exact project and solution configuration and platform). ARM is only supported with UWP (and so only for mrwebrtc-uwp, not mrwebrtc-win32), but x86 is for both Desktop and UWP, though you need to build both with ./build.ps1 if you intend to use both. Though in general there is little reason to build Desktop x86.

astaikos316 commented 3 years ago

@djee-ms the LINk error in Visual Studio definitely shows cannot open input file mrwebrtc.lib when building solution for x86 and ARM Release targets. I ran the powershell script for all three architectures before opening the solution in Visual Studio

djee-ms commented 3 years ago

What project is failing?

astaikos316 commented 3 years ago

mrwebrtc-unityplugin-win32.vcxproj fails

djee-ms commented 3 years ago

Alright! So, 1) This obviously won't work on ARM 2) There's a bug indeed that I can repro. I thought I had fixed it with #677 and it went away and now came back, I have no idea why this keeps failing.

Do you need the Unity native renderer plugin though? Because if you don't then you can ignore the error.

djee-ms commented 3 years ago

Actually, there's no bug. I tried in x86 Debug :

After building all items in order everything works as expected.

I don't know about the ARM issue because mrwebrtc-unityplugin-win32.vcxproj doesn't support ARM.

astaikos316 commented 3 years ago

I am building to Release configs, not Debug configs. I just reverified by running the build script again and trying to build solution for x86 Release and the same project fails.

djee-ms commented 3 years ago
1>------ Build started: Project: mrwebrtc-unityplugin-win32, Configuration: Release Win32 ------
1>   Creating library xxxxxx\mr-webrtc-temp\tools\build\mrwebrtc\..\..\..\bin\Win32\x86\Release\mrwebrtc-unityplugin.lib and object xxxxxx\mr-webrtc-temp\tools\build\mrwebrtc\..\..\..\bin\Win32\x86\Release\mrwebrtc-unityplugin.exp
1>Generating code
1>Previous IPDB not found, fall back to full compilation.
1>All 889 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
1>Finished generating code
1>mrwebrtc-unityplugin-win32.vcxproj -> xxxxxx\mr-webrtc-temp\bin\Win32\x86\Release\mrwebrtc-unityplugin.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
astaikos316 commented 3 years ago

Source I pulled was from March 12th. It looks like this commit was from the 18th?

djee-ms commented 3 years ago

3d15d1624604a99cdcf40ce11603279177fb4f9c is from March 19th.