androidandroid-sourceninjacts

I have a problem with building AOSP 13 from official source code and got CTS test errors


I am building AOSP 13 on an x64 laptop with 16 GB ram and 12th generation core i7 spec. After successfully syncing my repo with the repo sync command, I just executed the following standard commands. At the beginning of the build process, I got the following errors. By looking at the Internet resources, everybody talked about a synchronization problem. However, my synchronization process was finished successfully without any errors or warnings.

root@User:/home/user/android13# source build/envsetup.sh
root@User:/home/user/android13# lunch 47
root@User:/home/user/android13# m
16:10:32 ************************************************************
16:10:32 You are building on a machine with 15.3GB of RAM
16:10:32 
16:10:32 The minimum required amount of free memory is around 16GB,
16:10:32 and even with that, some configurations may not work.
16:10:32 
16:10:32 If you run into segfaults or other errors, try reducing your
16:10:32 -j value.
16:10:32 ************************************************************
16:10:32 Build sandboxing disabled due to nsjail error.
build/make/core/soong_config.mk:209: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has
 been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
build/make/core/soong_config.mk:210: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR ha
s been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=13
TARGET_PRODUCT=aosp_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-6.2.0-34-generic-x86_64-Ubuntu-22.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=TQ3C.230805.001.B2
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl 
hardware/google/camera hardware/google/camera/devices/EmulatedCamera
============================================
[  1% 3/195] test github.com/google/blueprint/pathtools
FAILED: out/host/linux-x86/bin/go/blueprint-pathtools/test/test.passed
out/host/linux-x86/bin/gotestrunner -p build/blueprint/pathtools -f out/host/lin
ux-x86/bin/go/blueprint-pathtools/test/test.passed -- out/host/linux-x86/bin/go/
blueprint-pathtools/test/test -test.short
--- FAIL: TestGlobEscapes (0.00s)
    --- FAIL: TestGlobEscapes/**/* (0.00s)
        glob_test.go:571: incorrect matches list:
        glob_test.go:571:  pattern: "**/*"
        glob_test.go:571:      got: []string{"a/", "b", "a/a"}
        glob_test.go:571: expected: []string{"*", "**/", "?", "a/", "b", "**/*",
 "**/a", "**/b/", "**/b/b", "a/a"}
        glob_test.go:571: incorrect deps list:
        glob_test.go:571:  pattern: "**/*"
        glob_test.go:571:      got: []string{".", "a"}
        glob_test.go:571: expected: []string{".", "**", "**/b", "a"}
    --- FAIL: TestGlobEscapes/**/\* (0.00s)
        glob_test.go:571: incorrect matches list:
        glob_test.go:571:  pattern: "**/\\*"
        glob_test.go:571:      got: []string(nil)
        glob_test.go:571: expected: []string{"*", "**/*"}
        glob_test.go:571: incorrect deps list:
        glob_test.go:571:  pattern: "**/\\*"
        glob_test.go:571:      got: []string{".", "a"}
        glob_test.go:571: expected: []string{".", "**", "**/b", "a"}
    --- FAIL: TestGlobEscapes/\*\*/* (0.00s)
        glob_test.go:571: incorrect matches list:
        glob_test.go:571:  pattern: "\\*\\*/*"
        glob_test.go:571:      got: []string(nil)
        glob_test.go:571: expected: []string{"**/*", "**/a", "**/b/"}
        glob_test.go:571: incorrect deps list:
        glob_test.go:571:  pattern: "\\*\\*/*"
        glob_test.go:571:      got: []string{"."}
        glob_test.go:571: expected: []string{".", "**"}
    --- FAIL: TestGlobEscapes/\*\*/**/* (0.00s)
        glob_test.go:571: incorrect matches list:
        glob_test.go:571:  pattern: "\\*\\*/**/*"
        glob_test.go:571:      got: []string(nil)
        glob_test.go:571: expected: []string{"**/*", "**/a", "**/b/", "**/b/b"}
        glob_test.go:571: incorrect deps list:
        glob_test.go:571:  pattern: "\\*\\*/**/*"
        glob_test.go:571:      got: []string{"."}
        glob_test.go:571: expected: []string{".", "**", "**/b"}
FAIL
16:10:32 soong bootstrap failed with: exit status 1

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

I executed repo sync and m clean commands several time. But the problem still persists. Can anyone help me how I can handle the situation?


Solution

  • The problem was with physically copying the source code of AOSP from an Ubuntu PC to a external hard drive with NTFS file system. I had copied the entire AOSP source code without compression. So, a few files those placed in test directories were affected by the NTFS file system limitations. When I copied them to my Ubuntu PC, the problem exposed. This is why repo sync and m clean could not solve the problem.

    To solve the problem, I physically deleted the CTS and test folders from the source code, and again, executed the repo sync command. After replacing those deleted folders with new ones from the origin, the build process was done without any serious problem.