I am trying to build the Android kernel for emulator. But the build failed. I am using the android-5.1.1-r1.
Here are the error messages:
mkdir -p /home/ying/WORKING_DIRECTORY/out/target/product/generic/obj/GYP/shared_intermediates/templates/org/chromium/base; cd external/chromium_org/base; python ../build/android/gyp/gcc_preprocess.py "--include-path=.." "--output=/home/ying/WORKING_DIRECTORY/out/target/product/generic/obj/GYP/shared_intermediates/templates/org/chromium/base/ApplicationState.java" "--template=android/java/src/org/chromium/base/ApplicationState.template" Traceback (most recent call last):
File "../build/android/gyp/gcc_preprocess.py", line 58, in sys.exit(main(sys.argv[1:]))
File "../build/android/gyp/gcc_preprocess.py", line 46, in main DoGcc(options)
File "../build/android/gyp/gcc_preprocess.py", line 29, in DoGcc build_utils.CheckOutput(gcc_cmd)
File "/home/ying/WORKING_DIRECTORY/external/chromium_org/build/android/gyp/util/build_utils.py", line 145, in CheckOutput stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)
File "/usr/lib/python2.7/subprocess.py", line 710, in init errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception
OSError: [Errno 2] No such file or directory make: * [out/target/product/generic/obj/GYP/shared_intermediates/templates/org/chromium/base/ApplicationState.java] Error 1 make: * Waiting for unfinished jobs.... Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
make failed to build some targets (03:08 (mm:ss))
Did I miss something when setting up the environment?
I tried to run the same make -j4 again. This time it ran much longer, but in the end it failed again, and still for the same ApplicationState.java. Here are some more messages:
frameworks/base/packages/PrintSpooler/jni/com_android_printspooler_util_BitmapSerializeUtils.cpp:130:13: warning: unused parameter 'clazz' [-Wunused-parameter]
static void writeBitmapPixels(JNIEnv* env, jclass clazz, jobject jbitmap, jint fd) {
^
Gyp action: ui_android_ui_android_gyp_ui_strings_grd_target_create_resources_zip (out/target/product/generic/obj/GYP/shared_intermediates/res.java/ui_strings_grd.zip)
Gyp timestamp: out/target/product/generic/obj/GYP/android_webview_jarjar_content_resources_intermediates/android_webview_jarjar_content_resources.stamp
Gyp timestamp: out/target/product/generic/obj/GYP/android_webview_jarjar_ui_resources_intermediates/android_webview_jarjar_ui_resources.stamp
mkdir -p /home/ying/WORKING_DIRECTORY/out/target/product/generic/obj/GYP/shared_intermediates/templates/org/chromium/base; cd external/chromium_org/base; python ../build/android/gyp/gcc_preprocess.py "--include-path=.." "--output=/home/ying/WORKING_DIRECTORY/out/target/product/generic/obj/GYP/shared_intermediates/templates/org/chromium/base/ApplicationState.java" "--template=android/java/src/org/chromium/base/ApplicationState.template"
Gyp action: android_webview_android_webview_gyp_android_webview_strings_grd_target_create_resources_zip (out/target/product/generic/obj/GYP/shared_intermediates/res.java/android_webview_strings_grd.zip)
mkdir -p /home/ying/WORKING_DIRECTORY/out/target/product/generic/obj/GYP/shared_intermediates/templates/org/chromium/base; cd external/chromium_org/base; python ../build/android/gyp/gcc_preprocess.py "--include-path=.." "--output=/home/ying/WORKING_DIRECTORY/out/target/product/generic/obj/GYP/shared_intermediates/templates/org/chromium/base/MemoryPressureLevelList.java" "--template=android/java/src/org/chromium/base/MemoryPressureLevelList.template"
Traceback (most recent call last):
File "../build/android/gyp/gcc_preprocess.py", line 58, in <module>
sys.exit(main(sys.argv[1:]))
File "../build/android/gyp/gcc_preprocess.py", line 46, in main
DoGcc(options)
File "../build/android/gyp/gcc_preprocess.py", line 29, in DoGcc
build_utils.CheckOutput(gcc_cmd)
File "/home/ying/WORKING_DIRECTORY/external/chromium_org/build/android/gyp/util/build_utils.py", line 145, in CheckOutput
stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [out/target/product/generic/obj/GYP/shared_intermediates/templates/org/chromium/base/MemoryPressureLevelList.java] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
File "../build/android/gyp/gcc_preprocess.py", line 58, in <module>
sys.exit(main(sys.argv[1:]))
File "../build/android/gyp/gcc_preprocess.py", line 46, in main
DoGcc(options)
File "../build/android/gyp/gcc_preprocess.py", line 29, in DoGcc
build_utils.CheckOutput(gcc_cmd)
File "/home/ying/WORKING_DIRECTORY/external/chromium_org/build/android/gyp/util/build_utils.py", line 145, in CheckOutput
stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [out/target/product/generic/obj/GYP/shared_intermediates/templates/org/chromium/base/ApplicationState.java] Error 1
#### make failed to build some targets (44:11 (mm:ss)) ####
Thanks
Finally got it working. It was due to this step had some problems before:
$ sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
From the messages it might be the g++-multilib was not installed properly. After making sure all the packages in the command got properly installed the build succeeded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With