Some compile & link ERROR on the main branch(commit 9bbfe9e5e)

444 views
Skip to first unread message

Arlen LT

unread,
Feb 22, 2022, 3:34:15 PM2/22/22
to discuss-webrtc
Compile environment:
Platform: windows 10.0.22000
SDK: windows 10.0.22000(with SDK debugger)
MSVC toolchain: v14.31(MFC support installed)

some trial and error tips as below:
1. If using msvc compiler and linker, there will be compile error.
gn gen ./out/default --ide=vs2022 --sln=webrtc --args='use_lld=false is_clang=false treat_warnings_as_errors=false'

src\logging/rtc_event_log/events/rtc_event_alr_state.h(71): error C2327: 'webrtc::RtcEventAlrState::in_alr_': is not a type name, static, or enumerator

2. If using clang compiler and linker, there will be link error.
gn gen ./out/default --ide=vs2022 --sln=webrtc

lld-link: error: procedure symbol record for `operator new` in d:\a01\_work\43\s\Intermediate\vctools\libcmt.nativeproj_1198561531\objd\amd64\new_scalar.obj refers to PDB item index 0x11D1 which is not a valid function ID record

3. The only method to build SUCCESS is using clang to compile and msvc(linker.exe not lld.exe) to link.
gn gen ./out/default --ide=vs2022 --sln=webrtc --args='use_lld=false treat_warnings_as_errors=false'

Another problem is about the demo peerconnection_client.exe. It is a known issue https://bugs.chromium.org/p/webrtc/issues/detail?id=13498.

Muhammad Usman Bashir

unread,
Jun 19, 2022, 6:22:34 PM6/19/22
to discuss-webrtc
Let me try to help you out in this matter. First, you have to make sure that you have all the necessary tools and configurations for the compilation of WebRtc on the windows platform.

Currently, Windows Build Requirements
  • Win 7+ deployment, Win 10+ build system w/ VS2019 16.11.13+, Win 10.0.20348 SDK, Ninja
Please visit to get supported platforms and tools: Current CEF master branch build Requirements

You are using SDK: windows 10.0.22000(with SDK debugger), which doesn't have the necessary tools for the compilation of WebRtc and you will eventually come up with flooded errors from WebRtc Compiler.


Best Practice:

Just try to do simple and small steps to verify if some of the techniques are working; Initially, I request to you do this and check if it is working;
  • gn gen ./out
  • ninja -C ./out
Here WebRtc compiler might load and execute around 5000-6000 files during the compilation process. If that works successfully then please try the following command:
  • gn gen ./out/Debug/x64 --args="is_debug=true use_lld=false is_clang=false rtc_include_tests=true rtc_build_tools=false rtc_build_examples=true enable_libaom=false rtc_enable_protobuf=true use_rtti=true"
  • ninja -C ./out/Debug/x64
I have tested WebRtc compilation using these commands over these branches;
  • branch-heads/main 
  • branch-heads/master 
  • refs/remotes/branch-heads/5005 -> m102 branch
For future reference, if you are facing some issues, then please try to switch other branches to make a good research and commands over errors;

Please also follow these articles:
Please do let me know if you have any other follow-up concerns.

Philipp Hancke

unread,
Jun 20, 2022, 1:04:56 AM6/20/22
to discuss...@googlegroups.com
The MSVC compiler isn't fully supported.

--

---
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-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/4e0b497d-8b79-497a-b0af-78da6a99c027n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages