2

I'm keep getting that error in soong, while trying to build aosp.

When I type make, this is the output:

PLATFORM_VERSION_CODENAME=R
PLATFORM_VERSION=R
TARGET_PRODUCT=sdk_phone_x86_64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=x86_64
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=x86_64
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-1079-oem-x86_64-Ubuntu-19.10
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=AOSP.MASTER
OUT_DIR=out
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -
b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/b
uild-globs.ninja -o out/soong/build.ninja Android.bp
error: hardware/interfaces/Android.bp:1:1: unrecognized module type "hidl_pack
age_root"
error: hardware/google/interfaces/Android.bp:4:1: unrecognized module type "hi
dl_package_root"
error: hardware/google/interfaces/light/1.0/Android.bp:3:1: unrecognized modul
e type "hidl_interface"
error: hardware/google/interfaces/light/1.1/Android.bp:3:1: unrecognized modul
e type "hidl_interface"
error: hardware/google/interfaces/media/c2/1.0/Android.bp:3:1: unrecognized mo
dule type "hidl_interface"
error: frameworks/hardware/interfaces/Android.bp:1:1: unrecognized module type
 "hidl_package_root"
error: frameworks/hardware/interfaces/cameraservice/service/2.0/Android.bp:3:1
: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:3:1: unreco
gnized module type "hidl_interface"
error: frameworks/hardware/interfaces/displayservice/1.0/Android.bp:3:1: unrec
ognized module type "hidl_interface"
error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:3:1: unr
ecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/cameraservice/common/2.0/Android.bp:3:1:
 unrecognized module type "hidl_interface"
error: packages/modules/DnsResolver/Android.bp:13:1: unrecognized module type 
"aidl_interface"
error: frameworks/base/Android.bp:856:1: unrecognized module type "aidl_interf
ace"
error: frameworks/base/Android.bp:990:1: unrecognized module type "aidl_mappin
g"
19:37:38 soong bootstrap failed with: exit status 1

#### failed to build some targets (2 seconds) ####

I've tried it with aosp_x86_64-eng, aosp_arm-eng and sdk_phone_x86_64_64, but I'm keep getting the same error. I'm using ubuntu 19.10.

When I type lunch, it also says that: Warning: Cannot display lunch menu.

m4rci
  • 21
  • 1
  • 2
  • This looks like your AOSP's build tooling does not match the rest of the source tree. Is there something weird with your `build/make/` or `build/soong` checkouts? – Simpl Apr 20 '20 at 21:12
  • Sorry, what do you mean by weird ? Sorry if that's a dumb question, but I'm new to aosp. – m4rci Apr 22 '20 at 14:12
  • Does the checked out branch of `build/make/` match the branch of `hardware/interfaces`? You tagged the question as `linux`, but your `Soong` log output suggest you are building under windows, which is not officially supported AFAIK. – Simpl Apr 23 '20 at 11:26
  • Yes, i think I checked out the same branch. – m4rci Apr 29 '20 at 14:53
  • I have SAME problem... How did you resolve your problem? Ubuntu 20.04. Twrp android 10 build. I builded twrp 9 with no problem. – Yszty Aug 15 '21 at 14:48
  • I resolved my case by removing vendor directory and `repo sync` with correct tree + `export ALLOW_MISSING_DEPENDENCIES=true` – Yszty Aug 15 '21 at 15:35

1 Answers1

0

Android 10 uses older Android.bp system that does not support some things newer AOSP version Android.bp supports.

try building your Android.bp with the latest AOSP once.

zeitgeist
  • 852
  • 12
  • 19