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

Errors - Android build_apprtc and/or prepare_gyp_defines && execute_build #162

Closed dannaden closed 8 years ago

dannaden commented 8 years ago

After completing get_webrtc, the build_apprtc fails.

I'm ultimately needing libjingle for an Android app I'm developing, but I was trying the build_apprtc first.

Running on Ubuntu 14.04.3 LTS (VMWare instance).

The following error occurs, then immediately shuts down my Terminal shell. The only way I could even capture the error is by retrying "build_apprtc" with a "|more".

____ running '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0 ' in '/home/dannaden/vrtc/webrtc-build-scripts-master/android/webrtc' Error: Command '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gypflag=0' returned non-zero exit status 1 in /home/dannaden/vrtc/webrtc-build-scripts-master/android/webrtc Updating projects from gyp files... find: `/home/dannaden/vrtc/webrtc-build-scripts-master/android/webrtc/src/third party/android_tools/sdk//extras/google/google_play_services/libproject/google-pl ay-services_lib/res': No such file or directory gyp: Call to 'find /home/dannaden/vrtc/webrtc-build-scripts-master/android/webrt c/src/third_party/android_tools/sdk//extras/google/google_play_services/libproje ct/google-play-services_lib/res -type f' returned exit status 1 while in chromiu m/src/third_party/android_tools/android_tools.gyp. Hook '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' took 11.29 secs Build AppRTCDemo in Release (arch: armv7) --ninja: fatal: chdir to 'out_android_armeabi-v7a/Release' - No such file or directory Running ninja ninja: Entering directory`out_android_armeabi-v7a/Release' Release build for apprtc failed for revision 11849

djypanda commented 8 years ago

I have the some problem.

____ running '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' in '/mnt/Dev/webrtc-build-scripts/android/webrtc' Updating projects from gyp files... find: /mnt/Dev/webrtc-build-scripts/android/webrtc/src/third_party/android_tools/sdk//extras/google/google_play_services/libproject/google-play-services_lib/res': No such file or directory gyp: Call to 'find /mnt/Dev/webrtc-build-scripts/android/webrtc/src/third_party/android_tools/sdk//extras/google/google_play_services/libproject/google-play-services_lib/res -type f' returned exit status 1 while in chromium/src/third_party/android_tools/android_tools.gyp. Error: Command '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' returned non-zero exit status 1 in /mnt/Dev/webrtc-build-scripts/android/webrtc Hook '/usr/bin/python src/webrtc/build/gyp_webrtc -Dextra_gyp_flag=0' took 10.20 secs Build AppRTCDemo in Release (arch: armv7) Running ninja ninja: Entering directoryout_android_armeabi-v7a/Release' ninja: error: loading 'build.ninja': No such file or directory Release build for apprtc failed for revision 11866

dannaden commented 8 years ago

I got past my problem, so I will close this.

My problem, it seems, was that I was trying to run the commands for my Android build from inside the "android" folder. They need to be run from the outer folder, "webrtc-build-scripts".

If someone could add that detail to the instructions, it would be helpful. Thanks!

GensaGames commented 8 years ago

@dannaden Same problem, but cann't solve by running outside folder, anyway. Can you share your commands step by step. Thanks!

atsakiridis commented 8 years ago

Hello all, I think this is the same as this (in the lower level):

https://bugs.chromium.org/p/webrtc/issues/detail?id=5281

So what I did was to manually download google play services:

$ src/build/android/play_services/update.py download

And accept the license in the prompt, and then if you rerun the build script it should work.

Best regards

notedit commented 8 years ago

i staill have this error

reamal commented 7 years ago

After completing get_webrtc, the build_apprtc fails. I excute it at "webrtc-build-scripts" Running on Ubuntu 16

Build AppRTCMobile in Release (arch: x86_64) Running ninja ninja: Entering directory `out_android_x64/Release' [3/3584] ACTION //base:android_runtime_jni_headersjni_Runtime(//build/toolchain/android:android_clang_x64) FAILED: gen/android_runtime_jni_headers/base/jni/Runtime_jni.h python ../../base/android/jni_generator/jni_generator.py --depfile gen/base/android_runtime_jni_headersjni_Runtime.d --jar_file ../../third_party/android_tools/sdk/platforms/android-26/android.jar --input_file java/lang/Runtime.class --ptr_type=long --output_dir gen/android_runtime_jni_headers/base/jni --includes ../../../../../../base/android/jni_generator/jni_generator_helper.h Traceback (most recent call last): File "../../base/android/jni_generator/jni_generator.py", line 1366, in sys.exit(main(sys.argv)) File "../../base/android/jni_generator/jni_generator.py", line 1359, in main GenerateJNIHeader(input_file, output_file, options) File "../../base/android/jni_generator/jni_generator.py", line 1267, in GenerateJNIHeader jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, options) File "../../base/android/jni_generator/jni_generator.py", line 732, in CreateFromClass stderr=subprocess.PIPE) File "/usr/lib/python2.7/subprocess.py", line 711, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory [4/3584] CC obj/third_party/boringssl/boringssl/engine.o ninja: build stopped: subcommand failed. Release build for apprtc failed for revision 19460