WebRTC Android Compilation Error

502 views
Skip to first unread message

abdularis

unread,
Nov 20, 2019, 2:12:16 AM11/20/19
to discuss-webrtc
In the past few month I checkout webrtc repository it was at the latest m74, I used android build_aar.py script and the compilation was successful. 
yesterday I checkout in a new computer and try to compile version m79, 
I'm not very comfortable with native development project
Thank you.
Here is the error I've got

aris@S430FN:~/webrtc-src/src$ tools_webrtc/android/build_aar.py
INFO:root:Building: armeabi-v7a
Done. Made 3234 targets from 255 files in 2807ms
ninja: Entering directory `/tmp/tmpiRI248/armeabi-v7a'
[225/3369] ACTION //build/android:prepare_android_lint_cache(//build/toolchain/android:android_clang_arm)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (file:/home/aris/webrtc-src/src/third_party/android_sdk/public/tools-lint/lib/jaxb-runtime-2.2.11.jar) to method java.lan
g.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[2753/3369] ACTION //third_party/guava:guava_java(//build/toolchain/android:android_clang_arm)
FAILED: lib.java/third_party/guava/guava.interface.jar
python ../../../home/aris/webrtc-src/src/build/android/gyp/ijar.py clang_x64/ijar ../../../home/aris/webrtc-src/src/third_party/guava/lib/guava.jar lib.java/third_party/guava/guava.interface.jar
ftruncate(): Invalid argument
Traceback (most recent call last):
File "../../../home/aris/webrtc-src/src/build/android/gyp/ijar.py", line 24, in <module>
main()
File "../../../home/aris/webrtc-src/src/build/android/gyp/ijar.py", line 20, in main
subprocess.check_call([ijar_bin, in_jar, f.name])
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['clang_x64/ijar', '../../../home/aris/webrtc-src/src/third_party/guava/lib/guava.jar', '/tmp/tmpiRI248/armeabi-v7a/lib.java/third_party/guava/tmpnT8Ymcguava.interface.
jar']' returned non-zero exit status -6
[2754/3369] ACTION //third_party/android_sdk:android_sdk_java(//build/toolchain/android:android_clang_arm)
FAILED: lib.java/third_party/android_sdk/android.interface.jar
python ../../../home/aris/webrtc-src/src/build/android/gyp/ijar.py clang_x64/ijar ../../../home/aris/webrtc-src/src/third_party/android_sdk/public/platforms/android-28/android.jar lib.java/third_party/android
_sdk/android.interface.jar
ftruncate(): Invalid argument
Traceback (most recent call last):
File "../../../home/aris/webrtc-src/src/build/android/gyp/ijar.py", line 24, in <module>
main()
File "../../../home/aris/webrtc-src/src/build/android/gyp/ijar.py", line 20, in main
subprocess.check_call([ijar_bin, in_jar, f.name])
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['clang_x64/ijar', '../../../home/aris/webrtc-src/src/third_party/android_sdk/public/platforms/android-28/android.jar', '/tmp/tmpiRI248/armeabi-v7a/lib.java/third_party
/android_sdk/tmp2LTyuJandroid.interface.jar']' returned non-zero exit status -6
[2755/3369] ACTION //third_party/errorprone:errorprone_java(//build/toolchain/android:android_clang_arm)
FAILED: lib.java/third_party/errorprone/error_prone_ant-2.3.1.interface.jar
python ../../../home/aris/webrtc-src/src/build/android/gyp/ijar.py clang_x64/ijar ../../../home/aris/webrtc-src/src/third_party/errorprone/lib/error_prone_ant-2.3.1.jar lib.java/third_party/errorprone/error_p
rone_ant-2.3.1.interface.jar
ftruncate(): Invalid argument

Traceback (most recent call last):
File "../../../home/aris/webrtc-src/src/build/android/gyp/ijar.py", line 24, in <module>
main()
File "../../../home/aris/webrtc-src/src/build/android/gyp/ijar.py", line 20, in main
subprocess.check_call([ijar_bin, in_jar, f.name])
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['clang_x64/ijar', '../../../home/aris/webrtc-src/src/third_party/errorprone/lib/error_prone_ant-2.3.1.jar', '/tmp/tmpiRI248/armeabi-v7a/lib.java/third_party/errorprone
/tmpj_C30gerror_prone_ant-2.3.1.interface.jar']' returned non-zero exit status -6
[2756/3369] CXX clang_x64/obj/third_party/protobuf/protoc_lib/python_generator.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "tools_webrtc/android/build_aar.py", line 234, in <module>
sys.exit(main())
File "tools_webrtc/android/build_aar.py", line 230, in main
args.build_dir, args.extra_gn_switches, args.extra_ninja_switches)
File "tools_webrtc/android/build_aar.py", line 210, in BuildAar
extra_ninja_switches)
File "tools_webrtc/android/build_aar.py", line 172, in Build
_RunNinja(output_directory, ninja_args)
File "tools_webrtc/android/build_aar.py", line 101, in _RunNinja
subprocess.check_call(cmd)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/aris/webrtc-src/src/third_party/depot_tools/ninja', '-C', '/tmp/tmpiRI248/armeabi-v7a', 'sdk/android:libwebrtc', 'sdk/android:libjingle_peerconnection_so']' ret
urned non-zero exit status 1

Alessandro Marzoli

unread,
Nov 22, 2019, 12:14:26 PM11/22/19
to discuss-webrtc
Hi!
I've the exact same problem. Did you solve it? 
Thanks

Andi Naçollari

unread,
Nov 22, 2019, 12:14:26 PM11/22/19
to discuss-webrtc
Hi, I got the same problem here. I've been trying to use the ".py" script to compile but with no luck. Also took a change with the manual script but still the same thing. I've tried several branches by picking one randomly but nothing. One thing though the master branch could be compiled, strange (O.o).

Yves Gerey

unread,
Nov 22, 2019, 12:26:12 PM11/22/19
to discuss...@googlegroups.com
Did you forget to run `gclient sync`?

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/527a4b74-0a35-4f06-ab93-e8f54d7d6cdf%40googlegroups.com.


--
Warm regards,
Yves

abdularis

unread,
Nov 22, 2019, 10:28:05 PM11/22/19
to discuss-webrtc
I did, gclient sync and install all build dependencies. 
I tried checkout m79 version from the last computer I used and it was successfully compiled. I couldn't figure out the issue
To unsubscribe from this group and stop receiving emails from it, send an email to discuss...@googlegroups.com.


--
Warm regards,
Yves

abdularis

unread,
Nov 22, 2019, 11:15:24 PM11/22/19
to discuss-webrtc
Solved!,
I changed jdk version to 1.8 from jdk 11 and it works

Bruce Van Sittert

unread,
Mar 2, 2022, 6:41:58 PM3/2/22
to discuss-webrtc
I had a similar issue, however it wasn't the jdk version.
subprocess.CalledProcessError: Command '['/home/xxxxx/Documents/Projects/Google WebRTC/src/third_party/depot_tools/ninja', '-C', '/tmp/tmp0i3pcfhj/armeabi-v7a', 'sdk/android:libwebrtc', 'sdk/android:libjingle_peerconnection_so']' returned non-zero exit status 1.

The issue was actually the space in the name of one of the folders, ninja couldn't handle the space.
I renamed Google WebRTC to GoogleWebRTC, then everything worked fine.
Reply all
Reply to author
Forward
0 new messages