Error while building WebRTC for android

174 views
Skip to first unread message

Akshay Shah

unread,
Oct 18, 2016, 1:20:34 PM10/18/16
to discuss-webrtc

Hi all,


My gn command is like:

   

 if [ "$CONFIGURATION" == "Release" ]; then
        gn gen $OUTPUT_DIR
--args="target_os=\"android\" target_cpu=\"$TARGET_CPU_ARCH\" is_debug=false is_component_build=true"
   
else
        gn gen $OUTPUT_DIR
--args="target_os=\"android\" target_cpu=\"$TARGET_CPU_ARCH\" is_debug=true is_component_build=true"



I am getting following error while building WebRTC source for android. 

This happens only for 32-bit architectures. 64-bit architectures work fine.


Unexpected failure during lint analysis of PeerConnectionClient.java (this is a bug in lint or one of the libraries it depends on)
TypeSystem.getUnannotatedType(TypeSystem.java:180)->TypeSystem.getParameterizedType(TypeSystem.java:242)->TypeSystem.getParameterizedType(TypeSystem.java:261)->LookupEnvironment.createParameterizedType(LookupEnvironment.java:949)

[6728/8931] CXX obj/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.o

FAILED
: obj/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.o  

../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -MMD -MF obj/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.o.d -DWEBRTC_CODEC_ILBC -DWEBRTC_CODEC_OPUS -DWEBRTC_CODEC_ISACFX -DWEBRTC_CODEC_G722 -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_SUPERVISED_USERS=1 -DSAFE_BROWSING_DB_REMOTE -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -DANDROID -DHAVE_SYS_UIO_H -DANDROID_NDK_VERSION=r12b -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCOMPONENT_BUILD -D__GNU_SOURCE=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DEXPAT_RELATIVE_PATH -DWEBRTC_ARCH_ARM -DWEBRTC_ARCH_ARM_V7 -DWEBRTC_HAS_NEON -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_ANDROID -DOPUS_FIXED_POINT -I../.. -Igen -I../../third_party/opus/src/celt -I../../third_party/opus/src/src -I../.. -I../../webrtc/modules/audio_coding/codecs/cng/include -I../.. -I../../webrtc/modules/audio_coding/codecs/g711/include -I../.. -I../../webrtc/modules/audio_coding/codecs/pcm16b/include -I../../webrtc/common_audio/resampler/include -I../../webrtc/common_audio/signal_processing/include -I../../webrtc/common_audio/vad/include -I../.. -I../../webrtc/modules/audio_coding/codecs/ilbc/include -I../../third_party/opus/src/include -I../.. -I../../webrtc/modules/audio_coding/codecs/isac/fix/include -I../.. -I../../webrtc/modules/audio_coding/codecs/g722/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -ffunction-sections -fno-short-enums -finline-limit=64 -march=armv7-a -mfloat-abi=softfp -mthumb -mthumb-interwork -mtune=generic-armv7-a -fno-tree-sra -fno-caller-saves -mfpu=neon -Wall -Werror -Wno-psabi -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Os -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -gdwarf-3 -g2 --sysroot=../../third_party/android_tools/ndk/platforms/android-16/arch-arm -fvisibility=hidden -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-strict-overflow -fno-builtin-cos -fno-builtin-sin -fno-builtin-cosf -fno-builtin-sinf -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-narrowing -fno-rtti -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/include -isystem../../third_party/android_tools/ndk/sources/android/support/include -fno-exceptions -Wnon-virtual-dtor -Woverloaded-virtual -c ../../webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc -o obj/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.o

In file included from ../../webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc:34:0:

../../webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc: In member function 'virtual int webrtc::DtmfToneGenerator::Init(int, int, int)':

../../webrtc/base/checks.h:198:62: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]

 
#define RTC_DCHECK_LE(v1, v2) RTC_EAT_STREAM_PARAMETERS((v1) <= (v2))

                                                             
^

../../webrtc/base/checks.h:92:20: note: in definition of macro 'RTC_EAT_STREAM_PARAMETERS'

   
(true ? true : !(condition))               \

                   
^

../../webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc:137:3: note: in expansion of macro 'RTC_DCHECK_LE'

   RTC_DCHECK_LE
(0u, fs_index);

   
^

../../webrtc/base/checks.h:198:62: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]

 
#define RTC_DCHECK_LE(v1, v2) RTC_EAT_STREAM_PARAMETERS((v1) <= (v2))

                                                             
^

../../webrtc/base/checks.h:92:20: note: in definition of macro 'RTC_EAT_STREAM_PARAMETERS'

   
(true ? true : !(condition))               \

                   
^

../../webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc:152:3: note: in expansion of macro 'RTC_DCHECK_LE'

   RTC_DCHECK_LE
(0u, fs_index);

   
^

cc1plus
: all warnings being treated as errors

[6730/8931] CXX obj/webrtc/modules/audio_coding/neteq/rtcp.o

ninja
: build stopped: subcommand failed.


Any help is appreciated. Thanks!

Vincenzo Ninni

unread,
Oct 19, 2016, 4:28:14 AM10/19/16
to discuss-webrtc
up
Same for me

Andrey Grusha

unread,
Oct 19, 2016, 1:39:10 PM10/19/16
to discuss-webrtc
I encountered this very problem as well. looks like it is worth of filing a bug here: https://bugs.chromium.org/p/webrtc/issues/list

вторник, 18 октября 2016 г., 20:20:34 UTC+3 пользователь Akshay Shah написал:

Henrik Kjellander

unread,
Oct 20, 2016, 9:15:16 AM10/20/16
to discuss-webrtc
I'm able to compile https://chromium.googlesource.com/external/webrtc/+/5f70d3b5597bbca81b18b5807e12209500286d61 with
gn gen out/android-Debug-component --args="target_os=\"android\" target_cpu=\"arm\" is_debug=true is_component_build=true"
ninja -C out/android-Debug-component

at least. Can you try git pull && 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-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/21698a1d-e812-48d3-9126-22bdd177d90d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Andrey Grusha

unread,
Oct 20, 2016, 11:26:58 AM10/20/16
to discuss-webrtc
Henrik, could you try an option is_debug=false ? An error appears in this very case

четверг, 20 октября 2016 г., 16:15:16 UTC+3 пользователь Henrik Kjellander написал:
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.

hua chai

unread,
Oct 22, 2016, 10:29:37 AM10/22/16
to discuss-webrtc
I got the same Error when I try to compile Android WebRTC 32-bit version with option is_debug=false.
But it can be compiled with option is_debug=true.

And I did not know how to do with it.

Is it a bug ??


在 2016年10月20日星期四 UTC+8下午11:26:58,Andrey Grusha写道:

xiang liu

unread,
Oct 22, 2016, 10:45:37 AM10/22/16
to discuss-webrtc


在 2016年10月20日星期四 UTC+8下午11:26:58,Andrey Grusha写道:
Henrik, could you try an option is_debug=false ? An error appears in this very case


i have this error too,  have you figured  out how to fix this? 

Henrik Kjellander

unread,
Oct 24, 2016, 8:18:51 AM10/24/16
to discuss-webrtc
See my reply in https://groups.google.com/forum/#!topic/discuss-webrtc/z58I-i1fyn4

This affects Android 32-bit Release builds.

To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/a03efe19-5498-43c6-bb61-43d6a7b8dabe%40googlegroups.com.

Vincenzo Ninni

unread,
Oct 24, 2016, 10:21:17 AM10/24/16
to discuss-webrtc
It works for me with args: "is_debug=false dcheck_always_on=true is_component_build=false target_os="android" target_cpu="arm" symbol_level=1"

hua chai

unread,
Oct 25, 2016, 2:07:08 AM10/25/16
to discuss...@googlegroups.com
Thank you very much.It works with arg:  dcheck_always_on=true.

My gn command is : gn gen out/Default-release --args='is_debug=false dcheck_always_on=true is_component_build=false target_os="android" target_cpu="arm" symbol_level=1'


This page gn-build-configuration has mention that.


--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/01uXPUQewCs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/791a2026-59eb-437b-8317-5b7bd6a698f0%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages