pristineio / webrtc-build-scripts

A set of build scripts useful for building WebRTC libraries for Android and iOS.
BSD 3-Clause "New" or "Revised" License
1.13k stars 447 forks source link

build_apprtc fails #21

Closed smithaaron closed 10 years ago

smithaaron commented 10 years ago

Firstly, not all of the dependencies seem to be automatically installed. After running get_webrtc I got the following

________ running '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' in '/home/vagrant/webrtc'
Updating projects from gyp files...
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
Package gthread-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gthread-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gthread-2.0' found
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
gyp: Call to 'pkg-config --libs-only-l glib-2.0 gobject-2.0 gthread-2.0 gtk+-2.0' returned exit status 1.
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
Package gthread-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gthread-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gthread-2.0' found
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
gyp: Call to 'pkg-config --libs-only-l gobject-2.0 gthread-2.0 gtk+-2.0' returned exit status 1.
Error: Command /usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0 returned non-zero exit status 1 in /home/vagrant/webrtc

To resolve I ran /webrtc/src/build/install-build-deps-android.sh After doing this I was able to run get_webrtc without any errors. I then tried build_apprtc. The following is the output

vagrant@precise64:~$ export WEBRTC_DEBUG=true
vagrant@precise64:~$ build_apprtc 
Change directory into the depot tools
Pull the depot tools down to the latest
Already up-to-date.
Setting up build environment for Android
Export the base settings of GYP_DEFINES so we can define how we want to build
User has not specified any gyp defines so we proceed with default
GYP_DEFINES=OS=android host_os=linux libjingle_java=1 build_with_libjingle=1 build_with_chromium=0 enable_tracing=1 enable_android_opensl=1 target_arch=arm arm_neon=1 armv7=1
Run gclient hooks

________ running '/usr/bin/python -c import os,sys;script = os.path.join('trunk','check_root_dir.py');_ = os.system('%s %s' % (sys.executable,script)) if os.path.exists(script) else 0' in '/home/vagrant/webrtc'

________ running '/usr/bin/python -u src/sync_chromium.py --target-revision de13cf44ff5aa5815dd742c2cedcaece02601f4b' in '/home/vagrant/webrtc'
Chromium already up to date: de13cf44ff5aa5815dd742c2cedcaece02601f4b

________ running '/usr/bin/python src/setup_links.py' in '/home/vagrant/webrtc'

________ running 'download_from_google_storage --directory --recursive --num_threads=10 --no_auth --bucket chromium-webrtc-resources src/resources' in '/home/vagrant/webrtc'

________ running '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' in '/home/vagrant/webrtc'
Updating projects from gyp files...
Hook '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' took 12.54 secs
Build AppRTCDemo in Debug (arch: arm) mode
ninja: Entering directory `out/Debug/'
[629/2043] CC obj/chromium/src/third_party/openmax_dl/dl/sp/src/arm/openmax_dl_armv7.detect.o
FAILED: /home/vagrant/webrtc/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -MMD -MF obj/chromium/src/third_party/openmax_dl/dl/sp/src/arm/openmax_dl_armv7.detect.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DDL_ARM_NEON -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_BROWSER_CDMS -DENABLE_CONFIGURATION_POLICY -DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_EGLIMAGE=1 -DENABLE_AUTOFILL_DIALOG=1 -DCLD_VERSION=1 -DENABLE_PRINTING=1 -DENABLE_MANAGED_USERS=1 -DVIDEO_HOLE=1 -DENABLE_LOAD_COMPLETION_HACKS=1 -DUSE_OPENSSL=1 -DUSE_OPENSSL_CERTS=1 -DANDROID -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -I../../chromium/src/third_party/openmax_dl -Igen -I../../chromium/src/third_party/android_tools/ndk/sources/android/cpufeatures -fstack-protector --param=ssp-buffer-size=4 -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs -Wno-format -march=armv7-a -mtune=generic-armv7-a -mfloat-abi=softfp -mthumb -fno-tree-sra -fno-caller-saves -Wno-psabi -mthumb-interwork -ffunction-sections -funwind-tables -g -fstack-protector -fno-short-enums -finline-limit=64 -Wa,--noexecstack --sysroot=/home/vagrant/webrtc/src/third_party/android_tools/ndk//platforms/android-14/arch-arm -isystem/home/vagrant/webrtc/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -Os -g -gdwarf-4 -fdata-sections -ffunction-sections -fomit-frame-pointer -funwind-tables   -c ../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c -o obj/chromium/src/third_party/openmax_dl/dl/sp/src/arm/openmax_dl_armv7.detect.o
../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c: In function 'SetFFTRoutines':
../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c:29:29: error: lvalue required as left operand of assignment
     omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs;
                             ^
../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c:30:29: error: lvalue required as left operand of assignment
     omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs;
                             ^
../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c:34:31: error: 'omxSP_FFTFwd_RToCCS_F32_Sfs_vfp' undeclared (first use in this function)
     omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs_vfp;
                               ^
../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c:34:31: note: each undeclared identifier is reported only once for each function it appears in
../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c:35:31: error: 'omxSP_FFTInv_CCSToR_F32_Sfs_vfp' undeclared (first use in this function)
     omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs_vfp;
                               ^
In file included from ../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c:15:0:
../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c: At top level:
../../chromium/src/third_party/openmax_dl/dl/sp/api/omxSP.h:2553:33: error: 'omxSP_FFTFwd_RToCCS_F32_Sfs' redeclared as different kind of symbol
 #define omxSP_FFTFwd_RToCCS_F32 omxSP_FFTFwd_RToCCS_F32_Sfs
                                 ^
../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c:77:13: note: in expansion of macro 'omxSP_FFTFwd_RToCCS_F32'
 OMXResult (*omxSP_FFTFwd_RToCCS_F32)(
             ^
../../chromium/src/third_party/openmax_dl/dl/sp/api/omxSP.h:2293:11: note: previous declaration of 'omxSP_FFTFwd_RToCCS_F32_Sfs' was here
 OMXResult omxSP_FFTFwd_RToCCS_F32_Sfs(
           ^
../../chromium/src/third_party/openmax_dl/dl/sp/api/omxSP.h:2554:33: error: 'omxSP_FFTInv_CCSToR_F32_Sfs' redeclared as different kind of symbol
 #define omxSP_FFTInv_CCSToR_F32 omxSP_FFTInv_CCSToR_F32_Sfs
                                 ^
../../chromium/src/third_party/openmax_dl/dl/sp/src/arm/detect.c:82:13: note: in expansion of macro 'omxSP_FFTInv_CCSToR_F32'
 OMXResult (*omxSP_FFTInv_CCSToR_F32)(
             ^
../../chromium/src/third_party/openmax_dl/dl/sp/api/omxSP.h:2526:11: note: previous declaration of 'omxSP_FFTInv_CCSToR_F32_Sfs' was here
 OMXResult omxSP_FFTInv_CCSToR_F32_Sfs(
           ^
[629/2043] CC obj/chromium/src/third_party/usrsctp/usrsctplib/netinet/usrsctplib.sctp_usrreq.o
ninja: build stopped: subcommand failed.
Debug build for apprtc failed for revision 7456

Am I doing something wrong or is this something that needs to be fixed?

ArikYa commented 10 years ago

The first issue (pkg-config) was fixed yesterday, the package was added to the installed dependencies. The second issue is WebRTC issue. I haven't had enough time to investigate it deeper, but a change they did to handle ARM processor (either r7371 or r7402) broke Android builds. I'll update here once it is resolved. In the meantime, I know that r7325 works fine.

smithaaron commented 10 years ago

I don't believe the first issue is related to pkg-config. I already have the latest build script from yesterday. Before I updated to this the error was about not being able to find pkg-config, not the other libs.

Thank you for pointer on a working revision number. I shall try this.

aaalaniz commented 10 years ago

This has been resolved

smithaaron commented 10 years ago

The dependency issue is still there. But can confirm that after running install-build-deps-android.sh I can now successfully build :) Thanks!

njovy commented 9 years ago

I had the exact same dependency issue with the latest script. I used vagrant on Windows. I will see if install-build-deps-android.sh resolves this problem

njovy commented 9 years ago

After I ran ./install-build-despt-android.sh, I was able to finish the building process completely!