Aosp-android 6 marshmallow compilation – production: * * * [run_soong] error 126

I tried to compile Android 6 marshmallows for my Sony Xperia Z1 compact. I've done everything:

How to build AOSP Marshmallow for unlocked Xperia devices (developer.sonymobile.com)

And check out:

Android – Downloading and Building (source.android.com)

On a virtual machine with the latest Debian (32-bit), but when I

I received an error:

root@debian:~/android# make –j 8
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=aosp_d5503
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_cpu_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_cpu_VARIANT=
HOST_ARCH=x86
HOST_2ND_ARCH=
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.5.0-2-686-pae-i686-with-debian-stretch-sid
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=MASTER
OUT_DIR=out
============================================
out/soong/soong: line 43: prebuilts/build-tools/linux-x86/bin/ninja: cannot execute binary file: Exec format error
build/core/soong.mk:87: recipe for target 'run_soong' Failed
make: *** [run_soong] Error 126

#### make Failed to build some targets (1 seconds) ####

Commissioning information:

root@debian:~/android# make -nd –j 8
GNU Make 4.1
Built for i586-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'Makefile'...
(...)
Reading makefile 'build/core/dumpvar.mk' (search path) (no ~ expansion)...
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=aosp_d5503
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_cpu_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_cpu_VARIANT=
HOST_ARCH=x86
HOST_2ND_ARCH=
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.5.0-2-686-pae-i686-with-debian-stretch-sid
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=MASTER
OUT_DIR=out
============================================
Reading makefile 'build/core/ninja.mk' (search path) (no ~ expansion)...
Reading makefile 'build/core/soong.mk' (search path) (no ~ expansion)...
Reading makefile 'vendor/google/build/ninja_config.mk' (search path) (do not care) (no ~ expansion)...
Updating makefiles....
 Considering target file 'vendor/google/build/ninja_config.mk'.
  File 'vendor/google/build/ninja_config.mk' does not exist.
  Looking for an implicit rule for 'vendor/google/build/ninja_config.mk'.
  No implicit rule found for 'vendor/google/build/ninja_config.mk'.
  Finished prerequisites of target file 'vendor/google/build/ninja_config.mk'.
 Must remake target 'vendor/google/build/ninja_config.mk'.
 Failed to remake target file 'vendor/google/build/ninja_config.mk'.
 Considering target file 'build/core/soong.mk'.
  Looking for an implicit rule for 'build/core/soong.mk'.
  No implicit rule found for 'build/core/soong.mk'.
  Finished prerequisites of target file 'build/core/soong.mk'.
 No need to remake target 'build/core/soong.mk'.
 Considering target file 'build/core/ninja.mk'.
  Looking for an implicit rule for 'build/core/ninja.mk'.
  No implicit rule found for 'build/core/ninja.mk'.
  Finished prerequisites of target file 'build/core/ninja.mk'.
 No need to remake target 'build/core/ninja.mk'.
 Considering target file 'build/core/dumpvar.mk'.
  Looking for an implicit rule for 'build/core/dumpvar.mk'.
  No implicit rule found for 'build/core/dumpvar.mk'.
  Finished prerequisites of target file 'build/core/dumpvar.mk'.
 (...)
 No need to remake target 'build/core/main.mk'.
 Considering target file 'Makefile'.
  Looking for an implicit rule for 'Makefile'.
  No implicit rule found for 'Makefile'.
  Finished prerequisites of target file 'Makefile'.
 No need to remake target 'Makefile'.
Updating goal targets....
Considering target file '–j'.
 File '–j' does not exist.
  Considering target file 'ninja_wrapper'.
   File 'ninja_wrapper' does not exist.
    Considering target file 'out/combined-aosp_d5503.ninja'.
     File 'out/combined-aosp_d5503.ninja' does not exist.
      Considering target file 'out/build-aosp_d5503.ninja'.
       File 'out/build-aosp_d5503.ninja' does not exist.
        Considering target file 'prebuilts/build-tools/linux-x86/bin/ckati'.
         Looking for an implicit rule for 'prebuilts/build-tools/linux-x86/bin/ckati'.
         No implicit rule found for 'prebuilts/build-tools/linux-x86/bin/ckati'.
         Finished prerequisites of target file 'prebuilts/build-tools/linux-x86/bin/ckati'.
        No need to remake target 'prebuilts/build-tools/linux-x86/bin/ckati'.
        Considering target file 'prebuilts/build-tools/linux-x86/bin/makeparallel'.
         Looking for an implicit rule for 'prebuilts/build-tools/linux-x86/bin/makeparallel'.
         No implicit rule found for 'prebuilts/build-tools/linux-x86/bin/makeparallel'.
         Finished prerequisites of target file 'prebuilts/build-tools/linux-x86/bin/makeparallel'.
        No need to remake target 'prebuilts/build-tools/linux-x86/bin/makeparallel'.
        Considering target file 'out/Android.mk'.
         Finished prerequisites of target file 'out/Android.mk'.
        No need to remake target 'out/Android.mk'.
        Considering target file 'out/CleanSpec.mk'.
         Finished prerequisites of target file 'out/CleanSpec.mk'.
        No need to remake target 'out/CleanSpec.mk'.
        Considering target file 'run_soong'.
         File 'run_soong' does not exist.
          Considering target file 'out/soong/.soong.bootstrap'.
            Considering target file 'bootstrap.bash'.
             Looking for an implicit rule for 'bootstrap.bash'.
             No implicit rule found for 'bootstrap.bash'.
             Finished prerequisites of target file 'bootstrap.bash'.
            No need to remake target 'bootstrap.bash'.
           Finished prerequisites of target file 'out/soong/.soong.bootstrap'.
           Prerequisite 'bootstrap.bash' is older than target 'out/soong/.soong.bootstrap'.
          No need to remake target 'out/soong/.soong.bootstrap'.
          Considering target file 'out/soong/soong.variables'.
            Considering target file 'FORCE'.
             File 'FORCE' does not exist.
             Finished prerequisites of target file 'FORCE'.
            Must remake target 'FORCE'.
            Successfully remade target file 'FORCE'.
           Finished prerequisites of target file 'out/soong/soong.variables'.
           Prerequisite 'FORCE' of target 'out/soong/soong.variables' does not exist.
          Must remake target 'out/soong/soong.variables'.
mkdir -p out/soong/
(\
echo '{'; \
echo '    "Make_suffix": "-aosp_d5503",'; \
echo ''; \
echo '    "Platform_sdk_version": 23,'; \
echo '    "Unbundled_build": false,'; \
echo '    "Brillo": false,'; \
echo '    "Malloc_not_svelte": true,'; \
echo '    "Allow_missing_dependencies": false,'; \
echo '    "SanitizeHost": [],'; \
echo '    "SanitizeDevice": [],'; \
echo '    "HostStaticBinaries": false,'; \
echo ''; \
echo '    "DeviceName": "amami",'; \
echo '    "DeviceArch": "arm",'; \
echo '    "DeviceArchVariant": "armv7-a-neon",'; \
echo '    "DevicecpuVariant": "krait",'; \
echo '    "DeviceAbi": ["armeabi-v7a", "armeabi"],'; \
echo '    "DeviceUsesClang": true,'; \
echo ''; \
echo '    "DeviceSecondaryArch": "",'; \
echo '    "DeviceSecondaryArchVariant": "",'; \
echo '    "DeviceSecondarycpuVariant": "",'; \
echo '    "DeviceSecondaryAbi": ["", ""],'; \
echo ''; \
echo '    "HostArch": "x86",'; \
echo '    "HostSecondaryArch": "",'; \
echo ''; \
echo '    "CrossHost": "windows",'; \
echo '    "CrossHostArch": "x86",'; \
echo '    "CrossHostSecondaryArch": "x86_64",'; \
echo '    "Safestack": false'; \
echo '}') > out/soong/soong.variables.$$; \
if ! cmp -s out/soong/soong.variables.$$out/soong/soong.variables; then \
  mv out/soong/soong.variables.$$out/soong/soong.variables; \
else \
  rm out/soong/soong.variables.$$; \
fi
          Successfully remade target file 'out/soong/soong.variables'.
          Considering target file 'out/soong/.soong.in_make'.
           Finished prerequisites of target file 'out/soong/.soong.in_make'.
          No need to remake target 'out/soong/.soong.in_make'.
          Pruning file 'FORCE'.
         Finished prerequisites of target file 'run_soong'.
        Must remake target 'run_soong'.
out/soong/soong out/soong/build.ninja  -w dupbuild=err
        Successfully remade target file 'run_soong'.
        Pruning file 'FORCE'.
       Finished prerequisites of target file 'out/build-aosp_d5503.ninja'.
      Must remake target 'out/build-aosp_d5503.ninja'.
echo Running kati to generate build-aosp_d5503.ninja...
prebuilts/build-tools/linux-x86/bin/ckati --ninja --ninja_dir=out --ninja_suffix=-aosp_d5503 --regen --ignore_dirty=out/% --no_ignore_dirty=out/soong/Android-aosp_d5503.mk --no_ignore_dirty=out/soong/make_vars-aosp_d5503.mk --ignore_optional_include=out/%.P --detect_android_echo --use_find_emulator -f build/core/main.mk  --gen_all_targets BUILDING_WITH_NINJA=true SOONG_ANDROID_MK=out/soong/Android-aosp_d5503.mk SOONG_MAKEVARS_MK=out/soong/make_vars-aosp_d5503.mk
Putting child 0x94b8a18 (out/build-aosp_d5503.ninja) PID 8221 on the chain.
Live child 0x94b8a18 (out/build-aosp_d5503.ninja) PID 8221
/bin/bash: prebuilts/build-tools/linux-x86/bin/ckati: cannot execute binary file: Exec format error
Reaping losing child 0x94b8a18 PID 8221
build/core/ninja.mk:161: recipe for target 'out/build-aosp_d5503.ninja' Failed
make: *** [out/build-aosp_d5503.ninja] Error 126
Removing child 0x94b8a18 PID 8221 from chain.

#### make Failed to build some targets (1 seconds) ####

What should I do to compile correctly?

resolvent:

This article will not be the answer, it does not really solve the problem. The purpose is to provide more valuable information

Create two symbolic links in the build top-level directory. It will solve this problem. Run the following command in the build top-level directory

$ln -s build/soong/bootstrap.bash
$ln -s build/soong/Android.bp

But when you go further, you will encounter the following problems

Failed: out/soong/.bootstrap/bin/minibp -t -m ./build/soong/build.ninja.in -b out/soong -d out/soong/.bootstrap/bootstrap.ninja.in.d -o out/soong/.bootstrap/bootstrap.ninja.in Android.bp
error: Android.bp:81:1: "soong-android" depends on undefined module "blueprint"
error: Android.bp:81:1: "soong-android" depends on undefined module "blueprint-bootstrap"
[2/4] minibp out/soong/.bootstrap/primary.ninja.in
Failed: out/soong/.bootstrap/bin/minibp --build-primary -t -m ./build/soong/build.ninja.in --timestamp out/soong/.bootstrap/primary.ninja.in.timestamp --timestampdep out/soong/.bootstrap/primary.ninja.in.timestamp.d -b out/soong -d out/soong/.bootstrap/primary.ninja.in.d -o out/soong/.bootstrap/primary.ninja.in Android.bp
error: Android.bp:13:1: "soong_build" depends on undefined module "blueprint"
error: Android.bp:13:1: "soong_build" depends on undefined module "blueprint-bootstrap"
ninja: error: rebuilding 'out/soong/build.ninja': subcommand Failed
make: *** [run_soong] Error 1

I don't know how to solve this problem. Maybe the new build system for AOSP master branch is not fully ready

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>