When attempting to build AOSP 14, I encountered an error during the build process. The build environment was configured according to the requirements for AOSP 14, but I encountered the following error:
internal error: undefined variable CTS_TEST_SUITES_DEFAULT
11:02:32 fatal errors encountered
#### failed to build some targets (02:25 (mm:ss)) ####
Environment Setup:
source build/envsetup.sh
.lunch aosp_cf_x86_64_phone-trunk_staging-userdebug
.Build Information:
PLATFORM_VERSION_CODENAME=VanillaIceCream
TARGET_PRODUCT=aosp_cf_x86_64_phone
TARGET_BUILD_VARIANT=userdebug
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-150-generic-x86_64-Ubuntu-18.04.6-LTS
BUILD_ID=MAIN
Memory Warning:
internal error: undefined variable CTS_TEST_SUITES_DEFAULT
thanhchung@Chung-Computer:/media/thanhchung/data/AOSP14$ source build/envsetup.sh
thanhchung@Chung-Computer:/media/thanhchung/data/AOSP14$ lunch aosp_cf_x86_64_phone-trunk_staging-userdebug
============================================
PLATFORM_VERSION_CODENAME=VanillaIceCream
PLATFORM_VERSION=VanillaIceCream
TARGET_PRODUCT=aosp_cf_x86_64_phone
TARGET_BUILD_VARIANT=userdebug
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=silvermont
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=silvermont
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-150-generic-x86_64-Ubuntu-18.04.6-LTS
HOST_CROSS_OS=windows
BUILD_ID=MAIN
OUT_DIR=out
============================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wondering whether to use user, userdebug or eng?
user The builds that ship to users. Reduced debugability.
userdebug High fidelity to user builds but with some debugging options
enabled. Best suited for performance testing or day-to-day use
with debugging enabled.
eng More debugging options enabled and faster build times, but
runtime performance tradeoffs. Best suited for day-to-day
local development when not doing performance testing.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thanhchung@Chung-Computer:/media/thanhchung/data/AOSP14$ echo "$TARGET_PRODUCT-$TARGET_RELEASE-$TARGET_BUILD_VARIANT"
aosp_cf_x86_64_phone-trunk_staging-userdebug
thanhchung@Chung-Computer:/media/thanhchung/data/AOSP14$ m
11:00:10 ************************************************************
11:00:10 You are building on a machine with 15.6GB of RAM
11:00:10
11:00:10 The minimum required amount of free memory is around 16GB,
11:00:10 and even with that, some configurations may not work.
11:00:10
11:00:10 If you run into segfaults or other errors, try reducing your
11:00:10 -j value.
11:00:10 ************************************************************
============================================
PLATFORM_VERSION_CODENAME=VanillaIceCream
PLATFORM_VERSION=VanillaIceCream
TARGET_PRODUCT=aosp_cf_x86_64_phone
TARGET_BUILD_VARIANT=userdebug
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=silvermont
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=silvermont
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-150-generic-x86_64-Ubuntu-18.04.6-LTS
HOST_CROSS_OS=windows
BUILD_ID=MAIN
OUT_DIR=out
============================================
internal error: undefined variable CTS_TEST_SUITES_DEFAULT
11:02:32 fatal errors encountered
#### failed to build some targets (02:25 (mm:ss)) ####
thanhchung@Chung-Computer:/media/thanhchung/data/AOSP14$
The error looks explicit - you need at least 64GB of RAM to build AOSP AOSP Build Requirements