open-webrtc-toolkit / owt-client-native

Open WebRTC Toolkit client SDK for native Windows/Linux/iOS applications.
https://01.org/open-webrtc-toolkit
Apache License 2.0
391 stars 180 forks source link

Ninja step 3/27 crash "FrameDecodedEvents_Codec_CODEC_H265" #510

Closed andreasunterhuber closed 3 years ago

andreasunterhuber commented 3 years ago

We can't build iOS SDK on a mac. Any help is appreciated.

Build details

Crash

ninja: Entering directory `out/Debug-simulator-x64'
[3/27] CXX obj/third_party/webrtc/logging/rtc_event_log_parser/rtc_event_log_parser.o
FAILED: obj/third_party/webrtc/logging/rtc_event_log_parser/rtc_event_log_parser.o
clang++ -MMD -MF obj/third_party/webrtc/logging/rtc_event_log_parser/rtc_event_log_parser.o.d -DCR_XCODE_VERSION=1240 -DCR_CLANG_REVISION=\"llvmorg-12-init-11060-g118c3f3c-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWEBRTC_ENABLE_PROTOBUF=1 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DHAVE_SCTP -DHAVE_WEBRTC_VIDEO -DLOGGING_INSIDE_WEBRTC -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1 -DWEBRTC_POSIX -DWEBRTC_MAC -DWEBRTC_IOS -DABSL_ALLOCATOR_NOTHROW=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -I../.. -Igen -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../third_party/libyuv/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -fno-delete-null-pointer-checks -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fcolor-diagnostics -fmerge-all-constants -target x86_64-apple-ios9.0-simulator -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -Wunguarded-availability -Wundeclared-selector -Wno-range-loop-analysis -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -O0 -fno-omit-frame-pointer -g2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wno-shorten-64-to-32 -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti -c ../../third_party/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc -o obj/third_party/webrtc/logging/rtc_event_log_parser/rtc_event_log_parser.o
../../third_party/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc:297:11: error: enumeration value 'FrameDecodedEvents_Codec_CODEC_H265' not handled in switch [-Werror,-Wswitch]
  switch (codec) {
          ^
../../third_party/webrtc/logging/rtc_event_log/rtc_event_log_parser.cc:297:11: note: add missing switch cases
  switch (codec) {
          ^
1 error generated.
ninja: build stopped: subcommand failed.
andreasunterhuber commented 3 years ago

Adding these two line after line 307 in third_party/webrtc/logging/rtc_event_log/rtc_event_log_parser.ccrtc_event_log_parser.cc

    case rtclog2::FrameDecodedEvents::CODEC_H265:
      return VideoCodecType::kVideoCodecH265;

solved the build error. Strange ...

Perhaps you are working with an old version of third-party tools?

jianjunz commented 3 years ago

Thanks for reporting this issue and providing a fix. Will you submit a PR for the change?

andreasunterhuber commented 3 years ago

@jianjunz what do you prefer:

  1. a patch added in this repository to fix the third_party code?
  2. a PR on rtc_event_log repository?
jianjunz commented 3 years ago

rtc_event_log is maintained in https://github.com/open-webrtc-toolkit/owt-deps-webrtc. You could submit a change to 88-sdk branch. Thanks.

andreasunterhuber commented 3 years ago

@jianjunz done with PR https://github.com/open-webrtc-toolkit/owt-deps-webrtc/pull/136

jianjunz commented 3 years ago

Thanks. It's merged.