I am trying to compile pure aosp sourceand keep getting theese two errors. I am using the lineage vendor files and am using aosp device trees P.S. I'm using a live system but the issue is that there are two undefined methods
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=aosp_trlte
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-7634-generic-x86_64-Pop!_OS-20.04-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.190711.019
OUT_DIR=out
============================================
[ 43% 49/113] compile out/soong/.bootstrap/soong-lineage-generator/pkg/lineage/soong/generator.a
FAILED: out/soong/.bootstrap/soong-lineage-generator/pkg/lineage/soong/generator.a
GOROOT='prebuilts/go/linux-x86' prebuilts/go/linux-x86/pkg/tool/linux_amd64/compile -c 8 -o out/soong/.bootstrap/soong-lineage-generator/pkg/lineage/soong/generator.a.tmp -p lineage/soong/generator -complete -I out/soong/.bootstrap/blueprint-parser/pkg -I out/soong/.bootstrap/blueprint-deptools/pkg -I out/soong/.bootstrap/blueprint-pathtools/pkg -I out/soong/.bootstrap/blueprint-proptools/pkg -I out/soong/.bootstrap/blueprint/pkg -I out/soong/.bootstrap/soong/pkg -I out/soong/.bootstrap/blueprint-bootstrap-bpdoc/pkg -I out/soong/.bootstrap/blueprint-bootstrap/pkg -I out/soong/.bootstrap/soong-env/pkg -I out/soong/.bootstrap/soong-android/pkg -I out/soong/.bootstrap/soong-shared/pkg -pack vendor/lineage/build/soong/generator/generator.go vendor/lineage/build/soong/generator/variables.go && if cmp --quiet out/soong/.bootstrap/soong-lineage-generator/pkg/lineage/soong/generator.a.tmp out/soong/.bootstrap/soong-lineage-generator/pkg/lineage/soong/generator.a; then rm out/soong/.bootstrap/soong-lineage-generator/pkg/lineage/soong/generator.a.tmp; else mv -f out/soong/.bootstrap/soong-lineage-generator/pkg/lineage/soong/generator.a.tmp out/soong/.bootstrap/soong-lineage-generator/pkg/lineage/soong/generator.a; fi
vendor/lineage/build/soong/generator/generator.go:124:48: ctx.Config().BuildOSTarget undefined (type android.Config has no field or method BuildOSTarget)
vendor/lineage/build/soong/generator/generator.go:229:38: undefined: android.PathForSourceRelaxed
03:19:35 soong bootstrap failed with: exit status 1
#### failed to build some targets (2 seconds) ####
I had the same issue too, and fixed it like 10 Minuites ago. I am still learning about porting Android ROMs and because I still need to do some other Error fixing (for my first Port) i am not able to verify wether this is the complete fix for this Problem or not.
So now let's get to the solution I found.
My guess is, that you probably somehow figured out, that you need some files in /vendor. You searched these files and used the LinegeOS vendor files for your ROM. That is perfectly fine. But now look at the downloaded files and folders. Now look at the root of your source tree (the folder where you downloaded AOSP). See any similaties?(Spoiler: Many Folders are in Both directories, i.e. build) You basically downloaded many things from the Lineage Source Tree(i.e. files to build Lineage), which are not compatible and not needed in AOSP. You really just need the config folder from the lineage vendor you downloaded. You can safely delete the rest and the Error should go away.