signalapp/ringrtc

webrtc fork does not compile with gcc 13

Closed this issue · 6 comments

ninja: job failed: clang++ -MMD -MF obj/api/rtc_event_log_output_file/rtc_event_log_output_file.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DWEBRTC_USE_H264 -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -I../../../webrtc-5481c -Igen -I../../../webrtc-5481c/third_party/abseil-cpp -Wall -Werror -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 -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../../webrtc-5481c/tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -fwhole-program-vtables -m64 -msse3 -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -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 -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual -Os -fomit-frame-pointer -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__= -Os -fomit-frame-pointer -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations -c ../../../webrtc-5481c/api/rtc_event_log_output_file.cc -o obj/api/rtc_event_log_output_file/rtc_event_log_output_file.o
In file included from ../../../webrtc-5481c/api/rtc_event_log_output_file.cc:11:
In file included from ../../../webrtc-5481c/api/rtc_event_log_output_file.h:20:
../../../webrtc-5481c/rtc_base/system/file_wrapper.h:84:21: error: unknown type name 'int64_t'
  bool SeekRelative(int64_t offset);
                    ^
../../../webrtc-5481c/rtc_base/system/file_wrapper.h:86:15: error: unknown type name 'int64_t'
  bool SeekTo(int64_t position);
              ^
2 errors generated.
ninja: job failed: clang++ -MMD -MF obj/rtc_base/third_party/base64/base64/base64.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DWEBRTC_USE_H264 -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -I../../../webrtc-5481c -Igen -I../../../webrtc-5481c/third_party/abseil-cpp -Wall -Werror -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 -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../../webrtc-5481c/tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -fwhole-program-vtables -m64 -msse3 -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -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 -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual -Os -fomit-frame-pointer -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__= -Os -fomit-frame-pointer -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations -c ../../../webrtc-5481c/rtc_base/third_party/base64/base64.cc -o obj/rtc_base/third_party/base64/base64/base64.o
In file included from ../../../webrtc-5481c/rtc_base/third_party/base64/base64.cc:17:
../../../webrtc-5481c/rtc_base/third_party/base64/base64.h:78:43: error: unknown type name 'uint8_t'; did you mean 'wint_t'?
                              std::vector<uint8_t>* result,
                                          ^~~~~~~
                                          wint_t
/usr/include/bits/alltypes.h:198:18: note: 'wint_t' declared here
typedef unsigned wint_t;
                 ^
../../../webrtc-5481c/rtc_base/third_party/base64/base64.cc:213:14: error: out-of-line definition of 'DecodeFromArray' does not match any declaration in 'rtc::Base64'
bool Base64::DecodeFromArray(const char* data,
             ^~~~~~~~~~~~~~~
../../../webrtc-5481c/rtc_base/third_party/base64/base64.cc:207:30: note: type of 4th parameter of member declaration does not match definition ('vector<char> *' vs 'vector<uint8_t> *' (aka 'vector<unsigned char> *'))
                             vector<char>* result,
                             ^
../../../webrtc-5481c/rtc_base/third_party/base64/base64.h:78:31: note: type of 4th parameter of member declaration does not match definition ('std::vector<wint_t> *' (aka 'vector<unsigned int> *') vs 'vector<uint8_t> *' (aka 'vector<unsigned char> *'))
                              std::vector<uint8_t>* result,
                              ^
2 errors generated.
ninja: job failed: clang++ -MMD -MF obj/rtc_base/system/file_wrapper/file_wrapper.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DWEBRTC_USE_H264 -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -I../../../webrtc-5481c -Igen -I../../../webrtc-5481c/third_party/abseil-cpp -Wall -Werror -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 -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../../webrtc-5481c/tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -fwhole-program-vtables -m64 -msse3 -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -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 -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual -Os -fomit-frame-pointer -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__= -Os -fomit-frame-pointer -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations -c ../../../webrtc-5481c/rtc_base/system/file_wrapper.cc -o obj/rtc_base/system/file_wrapper/file_wrapper.o
In file included from ../../../webrtc-5481c/rtc_base/system/file_wrapper.cc:11:
../../../webrtc-5481c/rtc_base/system/file_wrapper.h:84:21: error: unknown type name 'int64_t'
  bool SeekRelative(int64_t offset);
                    ^
../../../webrtc-5481c/rtc_base/system/file_wrapper.h:86:15: error: unknown type name 'int64_t'
  bool SeekTo(int64_t position);
              ^
../../../webrtc-5481c/rtc_base/system/file_wrapper.cc:70:19: error: out-of-line definition of 'SeekRelative' does not match any declaration in 'webrtc::FileWrapper'
bool FileWrapper::SeekRelative(int64_t offset) {
                  ^~~~~~~~~~~~
../../../webrtc-5481c/rtc_base/system/file_wrapper.cc:75:19: error: out-of-line definition of 'SeekTo' does not match any declaration in 'webrtc::FileWrapper'
bool FileWrapper::SeekTo(int64_t position) {
                  ^~~~~~
4 errors generated.
ninja: subcommands failed

patch I use for now:

--- ./rtc_base/system/file_wrapper.h.orig
+++ ./rtc_base/system/file_wrapper.h
@@ -13,6 +13,7 @@
 
 #include <stddef.h>
 #include <stdio.h>
+#include <stdint.h>
 
 #include <string>
 
--- ./rtc_base/third_party/base64/base64.h.orig
+++ ./rtc_base/third_party/base64/base64.h
@@ -12,6 +12,7 @@
 #ifndef RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_
 #define RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_
 
+#include <stdint.h>
 #include <string>
 #include <vector>
 
--- ./third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h.orig
+++ ./third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h
@@ -16,6 +16,7 @@
 #define ABSL_STRINGS_INTERNAL_DAMERAU_LEVENSHTEIN_DISTANCE_H_
 
 #include <numeric>
+#include <stdint.h>
 #include <vector>
 
 #include "absl/strings/string_view.h"

This file comes from upstream WebRTC; any issues should be reported there. But also the default WebRTC build uses a sysroot when building for Intel or ARM Linux, and Signal doesn't officially support any platforms other than those. Are you on a system other than Intel or ARM Linux?

x86_64 only, building with use_sysroot=false per Alpine Linux packaging policies (the Debian sysroot would not even produce working binaries, as it targets gnu libc and not musl)

Ah, yeah, musl makes sense, but it's still an "unsupported configuration" from our perspective. If this were a library Signal wrote we'd probably be willing to take the change, but for forks we don't want to diverge from upstream more than necessary. You'll have to continue using your own fork/patch for this. Hopefully upstream doesn't object to taking your change, though.

(Also, we definitely don't support packaging any Signal libraries at this time. They don't come with any promises of stability, and several package repositories have a reputation for being woefully behind upstream development.)

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

This issue has been closed due to inactivity.