m122 Linux build failure (clang/optional/goog_cc)

422 views
Skip to first unread message

Nathan Sizemore

unread,
Mar 8, 2024, 12:44:46 PM3/8/24
to discuss-webrtc
m122 fails to build on Linux, where m119 previously was fine. Tried against:
* x86_64 Ubuntu 20.04
* x86_64 Ubuntu 22.04
* aarch64 Ubuntu 20.04

macOS is building fine, guessing because of libc++ being good there?

- gn gen out/Release --args='
  is_debug=false
  proprietary_codecs=true
  rtc_build_examples=false
  rtc_enable_google_benchmarks=false
  rtc_enable_grpc=false
  rtc_enable_protobuf=false
  rtc_include_tests=false
  rtc_use_h264=true
  rtc_use_pipewire=false
  rtc_use_x11=false
  use_custom_libcxx=false
  use_custom_libcxx_for_host=false
  use_gio=false
  use_rtti=true'

 
Error is in the same place on each arch, all linux compilers:

FAILED: obj/modules/congestion_controller/goog_cc/loss_based_bwe_v2/loss_based_bwe_v2.o
  ../../third_party/llvm-build/Release+Asserts/bin/clang++ \
    -MMD -MF obj/modules/congestion_controller/goog_cc/loss_based_bwe_v2/loss_based_bwe_v2.o.d \
    -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS \
    -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE \
    -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -DCR_CLANG_REVISION=\"llvmorg-18-init-16072-gc4146121e940-5\" \
    -DCR_SYSROOT_KEY=20230611T210420Z-2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 \
    -DWEBRTC_STRICT_FIELD_TRIALS=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DRTC_ENABLE_H265 \
    -DRTC_DAV1D_IN_INTERNAL_DECODER_FACTORY -DWEBRTC_HAVE_SCTP -DWEBRTC_USE_H264 -DWEBRTC_ENABLE_LIBEVENT \
    -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_LINUX \
    -DABSL_ALLOCATOR_NOTHROW=1 \
    -I../.. -Igen -I../../third_party/abseil-cpp \
    -Wall -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers \
    -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional \
    -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wno-deprecated-this-capture \
    -Wno-invalid-offsetof -Wno-vla-extension -Wno-thread-safety-reference-return -Wshadow -Werror -fno-delete-null-pointer-checks \
    -fno-ident -fno-strict-aliasing -fstack-protector -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants \
    -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -mllvm -split-threshold-for-reg-with-hint=0 \
    -ffp-contract=off -m64 -msse3 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. \
    -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-math-errno \
    -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors \
    -Wglobal-constructors -Wno-shadow -Wctad-maybe-unsupported -Wc++11-narrowing -Wundef -Wunused-lambda-capture -Wno-c++11-narrowing-const-reference \
    -std=c++17 -Wno-trigraphs -gsimple-template-names -fno-exceptions --sysroot=../../build/linux/debian_bullseye_amd64-sysroot \
    -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual \
    -c ../../modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc \
    -o obj/modules/congestion_controller/goog_cc/loss_based_bwe_v2/loss_based_bwe_v2.o
../../modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc:549:10: error: no matching member function for call to 'emplace'
  549 |   config.emplace();
      |   ~~~~~~~^~~~~~~

Any ideas what causes this or are there different args I need to pass for m122 now?

- Nate

Khun V

unread,
Mar 8, 2024, 10:22:23 PM3/8/24
to discuss...@googlegroups.com
You're using lots of custom config flags, it's a recipe for disaster - something like that will fall apart sooner rather than later. Try using a config as close as possible to what's used by Google's CI builders (https://ci.chromium.org/old/p/chromium/builders/webrtc/WebRTC%20Chromium%20Linux%20Builder/228708).

In your case, most likely use_custom_libcxx=false is causing the issue

--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
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/066d6c6b-3146-4925-9c9a-2fc813257d90n%40googlegroups.com.

Nathan Sizemore

unread,
Mar 12, 2024, 7:17:51 AM3/12/24
to discuss-webrtc
That is indeed the cause. However, removing that requires the application that consumes said lib, to bundle up buildtools/third_party/libc++ as well. If that is the work that needs done on my end, that is fine, but before I go down that path of work is that the canonical path of using libwebrtc.a, build against the in-tree libc++, and also build against that in application that use it as well?

Khun V

unread,
Mar 12, 2024, 9:44:21 AM3/12/24
to discuss...@googlegroups.com
I believe the app can use the standard STL implementation. All the custom libc++ stuff is wrapped in namespace Cr, so I think it can co-exist with the standard implementation.
However I'd switch to solely using the libwebrtc's custom libc++ as it's a drop-in replacement for the standard one, plus some bells and whistles, which won't affect your code.

Reply all
Reply to author
Forward
0 new messages