Rajeev
Rajeev

Reputation: 167

Getting Error while building Android 12 for emulator

I am getting error while building the AOSP 12 source code for emulator.

select lunch target and build

  1. source build/envsetup.sh
  2. lunch aosp_car_x86_64-userdebug
  3. export ALLOW_MISSING_DEPENDENCIES=true
  4. make -j8
[100% 741/741] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && "$BUILDER"     --top "$TOP"     --out "out/soong
"     -n "out"     -d "out/soong/build.ninja.d"     -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env o
ut/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
internal error: panic in GenerateBuildActions for module "microdroid_boot-5.10" variant "android_x86_64"
runtime error: invalid memory address or nil pointer dereference
goroutine 7306155 [running]:
github.com/google/blueprint.newPanicErrorf(0xd4c840, 0x15c2170, 0xc1e555f180, 0x4f, 0x0, 0x0, 0x0, 0x7fb1d677a080, 0xc1e5a23860)
    /home/rajeev/AOSP_REPO/build/blueprint/context.go:4142 +0x7b
github.com/google/blueprint.(*Context).generateModuleBuildActions.func2.1.1(0xc02ed92380, 0xc1e5a4c270)
    /home/rajeev/AOSP_REPO/build/blueprint/context.go:2831 +0x3a5
panic(0xd4c840, 0x15c2170)
    prebuilts/go/linux-x86/src/runtime/panic.go:969 +0x1b9
android/soong/android.(*RuleBuilderCommand).PathForInput(0xc1e5a54120, 0x0, 0x0, 0x0, 0x1)
    /home/rajeev/AOSP_REPO/build/soong/android/rule_builder.go:792 +0xd6
android/soong/android.(*RuleBuilderCommand).addInput(...)
    /home/rajeev/AOSP_REPO/build/soong/android/rule_builder.go:769
android/soong/android.(*RuleBuilderCommand).FlagWithInput(0xc1e5a54120, 0xe8cd1f, 0x9, 0x0, 0x0, 0x0)
    /home/rajeev/AOSP_REPO/build/soong/android/rule_builder.go:1195 +0x88
android/soong/filesystem.(*bootimg).buildBootImage(0xc007c2ce00, 0x1017ae0, 0xc1e5a52000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /home/rajeev/AOSP_REPO/build/soong/filesystem/bootimg.go:144 +0x111f
android/soong/filesystem.(*bootimg).GenerateAndroidBuildActions(0xc007c2ce00, 0x1017ae0, 0xc1e5a52000)
    /home/rajeev/AOSP_REPO/build/soong/filesystem/bootimg.go:116 +0x74
android/soong/android.(*ModuleBase).GenerateBuildActions(0xc007c2ce00, 0x1006d80, 0xc1e5a4c270)
    /home/rajeev/AOSP_REPO/build/soong/android/module.go:1850 +0xc5f
github.com/google/blueprint.(*Context).generateModuleBuildActions.func2.1(0xc02ed92380, 0xc1e5a4c270)
    /home/rajeev/AOSP_REPO/build/blueprint/context.go:2835 +0x85
github.com/google/blueprint.(*Context).generateModuleBuildActions.func2(0xc02ed92380, 0xc035de0240, 0x0)
    /home/rajeev/AOSP_REPO/build/blueprint/context.go:2836 +0x345
github.com/google/blueprint.parallelVisit.func1.1(0xc030ba42c0, 0xc02ed92380, 0xc035de0240, 0xc035de01e0, 0xc035de0180)
    /home/rajeev/AOSP_REPO/build/blueprint/context.go:1973 +0x3a
created by github.com/google/blueprint.parallelVisit.func1
    /home/rajeev/AOSP_REPO/build/blueprint/context.go:1972 +0x12e


12:42:57 soong bootstrap failed with: exit status 1

#### failed to build some targets (01:36 (mm:ss)) ####

Upvotes: 0

Views: 1528

Answers (2)

Imron Gamidli
Imron Gamidli

Reputation: 101

Lunch target should be different for emulator. If you want to build an Automotive OS Emulator for x86_64 System, then your lunch target should be sdk_car_x86_64-userdebug instead of aosp_car_x86_64-userdebug. Meaning,

source build/envsetup.sh
lunch sdk_car_x86_64-userdebug
make -j8

Upvotes: 0

Coder
Coder

Reputation: 21

Looks like a resource crunch, can you reboot and try it. Also, looks like you are building for Automotive, do you want an Android Auto emulator or an Android mobile emulator?

Upvotes: 0

Related Questions