You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linker error when linking libwebrtc.a against C++ code on Linux OS after building with build.md instructions:
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"
Error:
/usr/bin/ld: unknown architecture of input file webrtc-checkout/src/out/Linux-x64/obj/libwebrtc.a(peer_connection_interface.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: unknown architecture of input file webrtc-checkout/src/out/Linux-x64/obj/libwebrtc.a(rtc_certificate.o)' is incompatible with i386:x86-64 output
Steps to reproduce:
mkdir webrtc-checkout
cd webrtc-checkout
fetch --nohooks webrtc
gclient sync
cd src
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"
ninja -C out/Linux-x64
g++ -o test test.cpp peer_connection.o // test.cpp print "hello world"
Environment Configuration :
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 9 7950X 16-Core Processor
CPU family: 25
Model: 97
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 1
Stepping: 2
BogoMIPS: 8999.77
Base machine Windows 11 pro, but running everything in WSL with OS:
https://github.com/webrtc-sdk/webrtc-build/blame/3f144c5c0e145ea8e714cec6955abbff68c3caf1/docs/build.md#L222
Issue Observed:
Linker error when linking libwebrtc.a against C++ code on Linux OS after building with build.md instructions:
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"
Error:
/usr/bin/ld: unknown architecture of input file webrtc-checkout/src/out/Linux-x64/obj/libwebrtc.a(peer_connection_interface.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: unknown architecture of input file webrtc-checkout/src/out/Linux-x64/obj/libwebrtc.a(rtc_certificate.o)' is incompatible with i386:x86-64 output
Steps to reproduce:
mkdir webrtc-checkout
cd webrtc-checkout
fetch --nohooks webrtc
gclient sync
cd src
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"
ninja -C out/Linux-x64
g++ -o test test.cpp peer_connection.o // test.cpp print "hello world"
Environment Configuration :
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 9 7950X 16-Core Processor
CPU family: 25
Model: 97
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 1
Stepping: 2
BogoMIPS: 8999.77
Base machine Windows 11 pro, but running everything in WSL with OS:
Ubuntu 24.04.1 LTS
gcc -v
Using 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
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 13.3.0-6ubuntu2~24.04' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-
ld --verbose
GNU ld (GNU Binutils for Ubuntu) 2.42
Supported emulations:
elf_x86_64
elf32_x86_64
elf_i386
elf_iamcu
i386pep
i386pe
using internal linker script:
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
"elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
When inspecting generated *.o files they do look compatible with an x86_64 arch:
ar -t obj/libwebrtc.a
ar -x obj/libwebrtc.a
*file .o
I see format:
ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
The text was updated successfully, but these errors were encountered: