1. Generated webrtc build files for Ubuntu 24 like so:
gn gen out/Linux-x64 --args="target_os=\"linux\" target_cpu=\"x64\" is_debug=false rtc_include_tests=false rtc_use_h264=false is_component_build=false use_rtti=true use_custom_libcxx=false rtc_enable_protobuf=false"
According to instructions found here:
https://github.com/webrtc-sdk/webrtc-build/blob/main/docs/build.md
2. gcc targets x86_64 arch:
gcc -vUsing built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Supported LTO compression algorithms: zlib zstd
gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04)
3. Attempting to link any one of the generated *.o files results in linker error (example below
peer_connection.o):
g++ -o test test.cpp peer_connection.o/usr/bin/ld: unknown architecture of input file `peer_connection.o' is incompatible with i386:x86-64 output
/usr/bin/ld: error in peer_connection.o(.eh_frame); no .eh_frame_hdr table will be created
collect2: error: ld returned 1 exit status
4. Checking file format of any of the *.o files that are components of libwebrtc.a show that they are generated for 64bit arch:
readelf -h peer_connection.o
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 297960 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 1325
Section header string table index: 1
Hints?