Chinese Yellow Pages | Classifieds | Knowledge | Tax | IME

Direct compile webrtc on arm64 will fail:

webrtc seems does not support direct support on arm, we will get errors:

Running hooks: 18% ( 4/22) sysroot_arm64
________ running ‘vpython src/build/linux/sysroot_scripts/ –arch=arm64’ in ‘/webrtcbuilds/out’
Installing Debian sid arm64 root image: /webrtcbuilds/out/src/build/linux/debian_sid_arm64-sysroot
Running hooks: 50% (11/22) binutils
________ running ‘vpython src/third_party/binutils/’ in ‘/webrtcbuilds/out’
Host architecture arm64 is not supported.
Error: Command ‘vpython src/third_party/binutils/’ returned non-zero exit status 1 in /webrtcbuilds/outcross compile for mcu_libs

But fortunately, we can cross-compile it.


Cross build using native tools:

libwebtc (c/c++)  currently needs python 2.7 in some of its compile tools,   if you are on debian 10, you need to install python2.

# install cross-compiler ( on any x86_64 debian 10 or container ubuntu 18.04 image )

apt-get install -qy  gcc-8-aarch64-linux-gnu  g++-8-aarch64-linux-gnu  gcc-8-cross-base  libgcc-8-dev-arm64-cross  gcc-8 g++-8


then we can following direction from:


mkdir -p web_rtc && cd web_rtc

fetch –nohooks webrtc

gclient sync

cd src

./build/linux/sysroot_scripts/ –arch=arm64

gn gen out/Default –args=’target_os=”linux” target_cpu=”arm64″‘

ninja -C out/Default



Or Use webrtcbuilds to build full libwebrtc_full.a

git clone


it seems has  bug: it includes x64 obj ( protobuf/zlib which is x86_64 obj) for cross-build , causes incompatible at link stage, instead we need to include obj/third_party/protobuf/protobuf_lite.

so need to patch around line 254

function compile-unix() {

local blacklist=”unittest|examples|/yasm|protobuf_lite|main.o|\

local extras=$(find \
./obj/third_party/libvpx/libvpx_* \
./obj/third_party/libjpeg_turbo/simd_asm \
./obj/third_party/protobuf/protobuf_lite \
./obj/third_party/boringssl/boringssl_asm -name ‘*.o’)
echo “$extras” | tr ‘ ‘ ‘\n’ >>libwebrtc_full.list



./ -n Release  -t linux -c arm64