Building webrtc windows Visual Studio 2015

1,549 views
Skip to first unread message

Michael IV

unread,
Oct 28, 2017, 2:45:53 PM10/28/17
to discuss-webrtc
Hi Guys.

I am trying to build WebRTC from sources:

I downloaded and configured everything based on this article:


I use this setup to config the solution:

gn gen out/DebugX64 --ide="vs2015" --args="ffmpeg_branding=\"Chrome\" proprietary_codecs=true is_debug=true target_cpu=\"x64\" is_component_build=false symbol_level=2"

Then when I run 

ninja -C out/DebugX64 

or build via Visual Studio I am getting this error:

 D:/webrtc-builds/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./genstring.exe /PDB:./genstring.exe.pdb @./genstring.exe.rsp
1>LINK : fatal error LNK1104: cannot open file 'advapi32.lib'

C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\um\x64

I also added it to a path, just in case...

But the build still can't see that lib. Then I inspected project properties of some of the libs in
the generated solution and I can see that  TargetPlatform Version is set to 10.0.15063.0

But I don't have this version of Windows SDK. I got the latest one ,which is 10.0.16299.0.

Is this the reason why the toolchain can't find advapi32.lib?

How can I configure the build to use my version of Windows SDK?



And  Is it possible to make the WebRTC building process less like a nightmare?

Thanks!

Alexandre GOUAILLARD

unread,
Oct 28, 2017, 6:24:46 PM10/28/17
to discuss...@googlegroups.com
Hi,


On Sat, Oct 28, 2017 at 11:45 AM, Michael IV <explo...@gmail.com> wrote:
Hi Guys.

I am trying to build WebRTC from sources:

I downloaded and configured everything based on this article:


If you follow this guide, you should ask the authors of that guide for help.

The official way to compile webrtc is described here:

I use this setup to config the solution:

gn gen out/DebugX64 --ide="vs2015" --args="ffmpeg_branding=\"Chrome\" proprietary_codecs=true is_debug=true target_cpu=\"x64\" is_component_build=false symbol_level=2"

I would remove the last two arguments. is_component_build is only used for chrome, and symbol_level is risky when used with debug.
 

Then when I run 

ninja -C out/DebugX64 

But the build still can't see that lib. Then I inspected project properties of some of the libs in
the generated solution and I can see that  TargetPlatform Version is set to 10.0.15063.0

But I don't have this version of Windows SDK. I got the latest one ,which is 10.0.16299.0.

You have to use EXACTLY the version of MSVC and SDK chrome/webrtc provides or it will just not work.

In your case, you are trying apparently to compile the M57 branch which is quite risky as the depot_tools and compilers changed a lot since then. 
For M57, you are supposed to have:

Visual Studio 2015 with updates
( Visual C++, which will select three sub-categories including MFC )
( Universal Windows Apps Development Tools )
Tools (1.4.1) and Windows 10 SDK (10.0.14393)
Windows 10 SDK with Debugging Tools for Windows or Windows Driver Kit 10 installed in the same Windows 10 SDK installation directory.
 

Is this the reason why the toolchain can't find advapi32.lib?

Not sure, I never saw that error. 

How can I configure the build to use my version of Windows SDK?

You cannot. 

And  Is it possible to make the WebRTC building process less like a nightmare?

You could try precompiled libraries and installers we provide as part of our tutorial:

see "webrtc installer". There is only windows and mac, with RTTI, for 62, but if you want I can give you a version that fits your gn args (57, debug, ....)

HTH

Dr. Alex


Michael IV

unread,
Oct 29, 2017, 2:36:26 AM10/29/17
to discuss-webrtc
Hi . Thanks for the info.

I tried this again but this time using VS2015 x64 Native tools command prompt console and it built everything.
Probably it was about admin rights.
BUT,
my build again doesn't work with the debugger. All the break points are not triggered.
I can see all the .pdb files in place so I am not sure what it is.
My build command:

gn gen out/DebugX64 --winsdk="10.0.16299.0" --ide="vs2015" --args="ffmpeg_branding=\"Chrome\" proprietary_codecs=true is_debug=true target_cpu=\"x64\" is_component_build=false "

Michael IV

unread,
Oct 29, 2017, 2:42:44 AM10/29/17
to discuss-webrtc
Btw,

In your case, you are trying apparently to compile the M57

No,I am not.I am building the origin/master. How did you deduce that?

Alexandre GOUAILLARD

unread,
Oct 29, 2017, 2:52:18 AM10/29/17
to discuss...@googlegroups.com
https://github.com/ipop-project/ipop-project.github.io/wiki/Build-WebRTC-Libraries-for-Windows

Download the source code

  1. [...]
  1. Choose the stable release 57 rather than the most recent release by entering:
cd src
git branch -r
git checkout branch-heads/57
  1. Download the code
gclient sync

Note: The download will take a while, but it no longer downloads the Chromium repository after branch-head/57. Do not interrupt this step or you may need to start all over again (a new gclient sync may be enough, but you might also need wipe your webrtc_checkout\src folder and start over).


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/e3442138-4d4c-4e0c-8b47-f3fdca875243%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alex. Gouaillard, PhD, PhD, MBA
------------------------------------------------------------------------------------
President - CoSMo Software Consulting, Singapore
------------------------------------------------------------------------------------

Michael IV

unread,
Oct 29, 2017, 3:58:36 AM10/29/17
to discuss...@googlegroups.com
I omitted that part.I switched to the origin / master.
But that doesn't matter, I tried with 57,58,60, 62
All my debug builds don't stop at break points.
Are you sure I am not missing any  extra arguments?  

You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/Ot0ZHm9E88Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAHgZEq4%3DjmH8w4mTykg%2B0hdaEVLgi0Qd5KZWUZkAvjCJVDMzOg%40mail.gmail.com.

Alexandre GOUAILLARD

unread,
Oct 29, 2017, 11:55:31 AM10/29/17
to discuss...@googlegroups.com
to validate you are compiling in debug mode, just check that you have a multitude of pdb files (one per target in gn).
but i think you mentioned you have them already.

if you followed the website you mentioned, you will note that the JSon utilities are passed as .obj and not has libraries. Those might not have symbol associated then. Just guessing. I have never faced that exact problem.


For more options, visit https://groups.google.com/d/optout.

Sergio Garcia Murillo

unread,
Oct 29, 2017, 2:37:15 PM10/29/17
to discuss...@googlegroups.com
FWIW, I am able to debug libwertc correctly on msvc 2015 with the folowing args.gn :

disable_libfuzzer=true
enable_nacl=false
is_debug=true
is_win_fastlink=true
msvc_use_absolute_paths=true
symbol_level=2
use_rtti=true

Best regards
Sergio
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAHgZEq76sOgTSFyck9hLSwEAhZ4kFQrQ50dBNMAL6RmOTe-5kw%40mail.gmail.com.

Michael IV

unread,
Oct 29, 2017, 2:42:41 PM10/29/17
to discuss...@googlegroups.com
I current see that some of the examples in the build are debuggable, others aren't
.
For example, video loopback example isn't debuggable. 

--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/Ot0ZHm9E88Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages