'I got this error while building AOSP 12.1

I got this error while building AOSP 12.1

it is aosp 12.1_r1, how can I fix it? It is based on AOSP, and I am running Ubuntu 20.04 with 32 GB Ram

error: external/rust/crates/ppv-lite86/Android.bp:39:1: "libppv_lite86" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/futures-task/Android.bp:67:1: "libfutures_task" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/pin-project-lite/Android.bp:42:1: "libpin_project_lite" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/unicode-segmentation/Android.bp:42:1: "libunicode_segmentation" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: prebuilts/rust/Android.bp:343:1: "libunicode_width.rust_toolchain" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/managed/Android.bp:54:1: "managed_host_test_src_lib" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/shlex/Android.bp:40:1: "libshlex" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/rustc-hash/Android.bp:39:1: "librustc_hash" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/shlex/Android.bp:47:1: "shlex_host_test_src_lib" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/rustversion/Android.bp:40:1: "librustversion" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/scopeguard/Android.bp:39:1: "libscopeguard" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/bencher/Android.bp:59:1: "libbencher" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/futures-io/Android.bp:66:1: "libfutures_io" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/itoa/Android.bp:41:1: "libitoa" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/lazycell/Android.bp:39:1: "liblazycell" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/proc-macro-hack/Android.bp:41:1: "libproc_macro_hack" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/fallible-streaming-iterator/Android.bp:64:1: "libfallible_streaming_iterator" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/proc-macro-nested/Android.bp:49:1: "libproc_macro_nested" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/cfg-if/Android.bp:87:1: "libcfg_if" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/rustc-hash/Android.bp:64:1: "rustc-hash_host_test_src_lib" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/untrusted/Android.bp:45:1: "untrusted_host_test_src_untrusted" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/ryu/Android.bp:42:1: "libryu" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/regex-syntax/Android.bp:41:1: "libregex_syntax" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/libm/Android.bp:41:1: "liblibm" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/unicode-width/Android.bp:40:1: "libunicode_width" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/untrusted/Android.bp:21:1: "libuntrusted" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
error: external/rust/crates/matches/Android.bp:45:1: "matches_host_test_lib" depends on undefined module "libtest_x86_64-unknown-linux-gnu"
13:02:48 soong bootstrap failed with: exit status 1

github.com/PixelExperiencePad/manifest/tree/twelve-pad > This is my manifest for 12L(12.1), which is based on PE and modded to use SP2A(12.1) Source, is it where the problem originate? If so, can you tell me what parts to fix?



Solution 1:[1]

I also encountered this error. I fixed it by replacing the build/soong directory. build/soong directory picked from another rom (xdroidoss)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Loki