构建 AOSP 14 时出错 - 内部错误:未定义变量 CTS_TEST_SUITES_DEFAULT

问题描述 投票:0回答:1

构建 AOSP 14 的问题详细信息

问题描述

在尝试构建 AOSP 14 时,我在构建过程中遇到了错误。按照AOSP 14的要求配置了构建环境,但是遇到了如下错误:

internal error: undefined variable CTS_TEST_SUITES_DEFAULT
11:02:32 fatal errors encountered

#### failed to build some targets (02:25 (mm:ss)) ####

采取的步骤

  1. 环境设置:

    • 已执行
      source build/envsetup.sh
    • 使用命令
      lunch aosp_cf_x86_64_phone-trunk_staging-userdebug
      选择构建环境。
  2. 构建信息:

    • 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
  3. 内存警告:

    • 我的机器有 16 GB RAM。

遇到错误

  • 错误:
    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$ 

有没有人遇到过同样的错误,你能告诉我如何修复它吗?

android linux android-source m
1个回答
0
投票

错误看起来很明显 - 您需要至少 64GB RAM 来构建 AOSP AOSP 构建要求

© www.soinside.com 2019 - 2024. All rights reserved.