编译libwebrtc [英] Building libwebrtc

查看:166
本文介绍了编译libwebrtc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从源代码构建libwebrtc,但是在构建时出现错误.

I'm trying to build libwebrtc from source but I get errors when building.

这些是我遵循的步骤:

$ cd /home/user1
$ mkdir libwebrtc && cd libwebrtc
$ fetch --nohooks webrtc
$ gclient sync
$ cd src
$ git checkout -b m79 refs/remotes/branch-heads/m79
$ gclient sync

然后构建:

$ gn gen out/mybuild-m79 --args='is_debug=false is_component_build=false is_clang=false rtc_include_tests=false rtc_use_h264=true rtc_enable_protobuf=false use_rtti=true use_custom_libcxx=false treat_warnings_as_errors=false use_ozone=true'

$ ninja -C out/mybuild-m79

在此步骤中,我收到以下错误:

At this step I get the following errors:

[1026/3026] CXX obj/rtc_base/rtc_base/file_rotating_stream.o
FAILED: obj/rtc_base/rtc_base/file_rotating_stream.o 
g++ -MMD -MF obj/rtc_base/rtc_base/file_rotating_stream.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCR_SYSROOT_HASH=bcc994cc6e5d4d6f0eec8b44e7f0a65f5a1a7b90 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DHAVE_SCTP -DWEBRTC_USE_H264 -DWEBRTC_LIBRARY_IMPL -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -I../.. -Igen -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -m64 -march=x86-64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Wall -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -fno-exceptions --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual -c ../../rtc_base/file_rotating_stream.cc -o obj/rtc_base/rtc_base/file_rotating_stream.o
In file included from /home/user1/libwebrtc/src/build/linux/debian_sid_amd64-sysroot/usr/include/x86_64-linux-gnu/sys/stat.h:446,
                 from ../../rtc_base/file_rotating_stream.cc:23:
/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed/bits/statx.h:38:25: error: missing binary operator before token "("
   38 | #if __glibc_has_include ("__linux__/stat.h")
      |                         ^
/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed/bits/statx.h:46:10: fatal error: bits/statx-generic.h: No such file or directory
   46 | #include <bits/statx-generic.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

运行ldd --version:

Running ldd --version:

$ ldd --version
ldd (Ubuntu GLIBC 2.30-0ubuntu2) 2.30
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

不知道问题出在哪里,因此欢迎任何帮助!

No idea where the problem is so any help is welcomed!

推荐答案

在编译之前,您可能必须安装依赖项.

You may have to install the dependencies before you compile.

./build/install-build-deps.sh

./build/install-build-deps.sh

此职位的更多信息- 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆