Build an Android Open Source Project (AOSP) failed with Soong error: Unrecognized property "protos"

4.1k views Asked by At

I'm trying to build an AOSP on Ubuntu 20.04. Everything went ok until build certain target. I'm getting the next error almost on build start:

timur@timur-H110M-HD2:~/WORKING_DIRECTORY$ make -j4
22:24:08 ************************************************************
22:24:08 You are building on a machine with 15.5GB of RAM
22:24:08 
22:24:08 The minimum required amount of free memory is around 16GB,
22:24:08 and even with that, some configurations may not work.
22:24:08 
22:24:08 If you run into segfaults or other errors, try reducing your
22:24:08 -j value.
22:24:08 ************************************************************
build/make/core/soong_config.mk:175: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.build/make/core/soong_config.mk:176: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
============================================
PLATFORM_VERSION_CODENAME=S
PLATFORM_VERSION=S
TARGET_PRODUCT=aosp_crosshatch
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-54-generic-x86_64-Ubuntu-20.04.1-LTS
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
PRODUCT_SOONG_NAMESPACES=device/google/crosshatch hardware/google/av hardware/google/camera hardware/google/inte
rfaces hardware/google/pixel hardware/qcom/sdm845 vendor/google/camera vendor/qcom/sdm845 vendor/google/interfac
es vendor/qcom/crosshatch/proprietary
============================================
[ 99% 206/208] 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/build-globs.ninja -o out/soong/build.ninja Android.bp
error: external/crosvm/protos/Android.bp:22:11: unrecognized property "protos"
error: external/crosvm/protos/Android.bp:30:11: unrecognized property "protos"
22:24:44 soong bootstrap failed with: exit status 1

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

Can't understand where is the problem. Help, pls.

2

There are 2 answers

0
Timur Panzhiev On BEST ANSWER

So, I just executed repo sync once again and issue has been solved.

$ repo sync
$ make clobber
$ source build/envsetup.sh
$ lunch
$ make -j8
1
Mykola Khyliuk On

Try to update build/soong in your AOSP tree because it has a few new changes regarding rust, for example this one: https://android.googlesource.com/platform/build/soong/+/57f434e8582d4d2bdfa7b439141daf552cd6ea38