Failed to create Android kernel

I am trying to build an android kernel for an emulator. But the build failed. I am using 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))

      

Am I missing something while setting up the environment?

I tried running the same make -j4 again. It worked much longer this time, but ended up failing again and still for the same ApplicationState.java. Here are some more posts:

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)) ####

      

thank

+3


source to share


1 answer


Finally, it worked. It was at this stage that there were some problems:

$ sudo apt-get install bison g ++ - multilib git gperf libxml2-utils make zlib1g-dev: i386 zip



Of the posts that might be g ++ - multilib was not installed properly. After making sure that all packages in the command are installed correctly, the build is successful.

+3


source







All Articles