Where is the place to get help for problems compiling libwebrtc for Android from source?

197 views
Skip to first unread message

Neil Young

unread,
Oct 12, 2022, 3:26:23 PM10/12/22
to discuss-webrtc
I'm asking because I might have hit a regression with the latest source code. I'm posting my steps here, which worked two months ago on another device. Did it twice on brand new 20.04 VMs today, to no avail.

- Install Ubuntu 20.04 server into a VM, 80 GB HD min
- sudo apt update && sudo apt upgrade -y
- git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
- export PATH=$PATH:/home/ubuntu/depot_tools
- mdkir webrtc_android && cd webrtc_android
- fetch --nohooks webrtc_android 
- gclient sync
- cd src
- ./build/install-build-deps.sh

// Checking out M105 sources
- git checkout branch-heads/5195
- tools_webrtc/android/build_aar.py

The latter step produces this error

ubuntu@libwebrtc:~/webrtc_android/src$ tools_webrtc/android/build_aar.py
INFO:root:Building: armeabi-v7a
ERROR at //base/allocator/partition_allocator/partition_alloc.gni:6:1: Can't load input file.
import("//build_overrides/partition_alloc.gni")
^---------------------------------------------
Unable to load:
  /home/ubuntu/webrtc_android/src/build_overrides/partition_alloc.gni
I also checked in the secondary tree for:
  /home/ubuntu/webrtc_android/src/build/secondary/build_overrides/partition_alloc.gni
See //base/allocator/allocator.gni:5:1: whence it was imported.
import("//base/allocator/partition_allocator/partition_alloc.gni")
^----------------------------------------------------------------
See //base/BUILD.gn:20:1: whence it was imported.
import("//base/allocator/allocator.gni")
^--------------------------------------
See //testing/android/native_test/BUILD.gn:19:5: which caused the file to be included.
    "//base",
    ^-------
Traceback (most recent call last):
  File "tools_webrtc/android/build_aar.py", line 257, in <module>
    sys.exit(main())
  File "tools_webrtc/android/build_aar.py", line 252, in main
    BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args,
  File "tools_webrtc/android/build_aar.py", line 232, in BuildAar
    Build(build_dir, arch, use_goma, extra_gn_args, extra_gn_switches,
  File "tools_webrtc/android/build_aar.py", line 185, in Build
    _RunGN(gn_args_list)
  File "tools_webrtc/android/build_aar.py", line 113, in _RunGN
    subprocess.check_call(cmd)
  File "/home/ubuntu/depot_tools/.cipd_bin/.cipd/pkgs/0/XQxtJPiwHevSlqESfrtvcTcnyr5RFdhZ6SObC-qjr8AC/3.8/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/ubuntu/.vpython-root/e08d2a/bin/python', '/home/ubuntu/webrtc_android/src/third_party/depot_tools/gn.py', 'gen', '/tmp/tmpaw9wntnt/armeabi-v7a', '--args=target_os="android" is_debug=false is_component_build=false rtc_include_tests=false target_cpu="arm" use_goma=false arm_version=7']' returned non-zero exit status 1.

// This sequence works fine and builds the lib
- git checkout master
- tools_webrtc/android/build_aar.py

If you know what goes wrong or know to whom to address this, please let me know.


Byoungchan Lee

unread,
Oct 20, 2022, 5:46:50 AM10/20/22
to discuss-webrtc
If you've checked out another git commit, you need to run `gclient sync` to update your dependencies.

Neil Young

unread,
Oct 20, 2022, 6:43:30 AM10/20/22
to discuss-webrtc
Ouch, that was too obvious. Thanks for making me aware of this. Works

Anime Lover

unread,
Oct 20, 2022, 5:23:22 PM10/20/22
to discuss-webrtc
Did webrtc get updated recently to be compiled on Ubuntu 20.+?
a couple of months ago, I got an error message when I tried compiling the latest branch saying for android, only 18.04 is supported. 

Neil Young

unread,
Oct 20, 2022, 5:36:47 PM10/20/22
to discuss-webrtc

Was using 20.04. No problems. 
Reply all
Reply to author
Forward
0 new messages