Build webrtc for gcc, ubuntu 20.04

592 views
Skip to first unread message

Peter Arnold

unread,
Apr 4, 2022, 11:06:23 AM4/4/22
to discuss-webrtc
Hi developers community, I try to build webrtc version 4467.
I installed webrtc, after I did 
 - git checkout  branch-heads/4467
after that I did 
 - gclient sync , 
all have passed done without errors


After I configured my gn as 
 - gn gen out/Default --args="use_custom_libcxx=false use_custom_libcxx_for_host=false"
It's generated file succesfully, after I did 

 - ninja -C out/Default

but when I started building I received an error

 In file included from ../../net/dcsctp/public/strong_alias_test.cc:11:
../../net/dcsctp/public/strong_alias.h:74:19: error: no member named 'hash' in namespace 'std'
      return std::hash<UnderlyingType>()(id.value());
             ~~~~~^
../../net/dcsctp/public/strong_alias.h:74:24: error: 'UnderlyingType' does not refer to a value
      return std::hash<UnderlyingType>()(id.value());
                       ^
../../net/dcsctp/public/strong_alias.h:25:38: note: declared here
template <typename TagType, typename UnderlyingType>
                                     ^
../../net/dcsctp/public/strong_alias.h:74:40: error: expected expression
      return std::hash<UnderlyingType>()(id.value());
                                       ^
3 errors generated.

I don't know how to fix that, pls can somebody explain, how to reconfigure ninja or gn for avoiding that problem


Peter Arnold

unread,
Apr 4, 2022, 12:18:26 PM4/4/22
to discuss-webrtc
Also when I use this flags for generating , still trying to avoid problem
gn gen out/Default --args='is_debug=true is_component_build=false rtc_use_h264=true use_rtti=true use_custom_libcxx=false treat_warnings_as_errors=false enable_libaom=true rtc_include_tests=false use_custom_libcxx_for_host=false'


It's falled with errors

../../base/profiler/stack_copier_signal.cc:125:3: error: use of undeclared identifier 'memcpy'; did you mean 'wmemcpy'?
  memcpy(params->context, &ucontext->uc_mcontext, sizeof(mcontext_t));
  ^~~~~~
  wmemcpy
../../build/linux/debian_sid_amd64-sysroot/usr/include/wchar.h:262:17: note: 'wmemcpy' declared here
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
                ^
../../base/profiler/stack_copier_signal.cc:125:10: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'mcontext_t *'
  memcpy(params->context, &ucontext->uc_mcontext, sizeof(mcontext_t));
         ^~~~~~~~~~~~~~~
../../build/linux/debian_sid_amd64-sysroot/usr/include/wchar.h:262:46: note: passing argument to parameter '__s1' here
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
                                             ^
../../base/profiler/stack_copier_signal.cc:212:5: error: use of undeclared identifier 'memset'; did you mean 'wmemset'?
    memset(&action, 0, sizeof(action));
    ^~~~~~
    wmemset
../../build/linux/debian_sid_amd64-sysroot/usr/include/wchar.h:271:17: note: 'wmemset' declared here
extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW;
                ^
../../base/profiler/stack_copier_signal.cc:212:12: error: cannot initialize a parameter of type 'wchar_t *' with an rvalue of type 'struct sigaction *'
    memset(&action, 0, sizeof(action));
           ^~~~~~~
../../build/linux/debian_sid_amd64-sysroot/usr/include/wchar.h:271:35: note: passing argument to parameter '__s' here
extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW;
                                  ^
4 errors generated.
[2189/4655] CXX obj/base/base/process_metrics_linux.o
ninja: build stopped: subcommand failed.




Can't understand how to fix that, 

I'm using gcc 
linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 


понедельник, 4 апреля 2022 г. в 18:06:23 UTC+3, Peter Arnold:

Philipp Hancke

unread,
Apr 4, 2022, 2:13:06 PM4/4/22
to discuss...@googlegroups.com

--

---
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/e8cedf0a-49d3-400e-bc6d-9fb1e0cfc5b4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages