Building with custom OUT_DIR erors early

82 views
Skip to first unread message

Mattijs Korpershoek

unread,
Jul 27, 2023, 1:44:20 PMJul 27
to Android Building
Note: I've also opened this on https://issuetracker.google.com/issues/292560453 but I'm not sure if it was filed properly.

Steps to reproduce:

mkdir -p ~/work/amlogic/src/aosp-main/ && cd $_
repo init -u https://android.googlesource.com/platform/manifest -b main --partial-clone --clone-filter=blob:limit=10M
repo sync -cd -j5
export OUT_DIR=~/work/amlogic/out/OUT-aosp-main
source ~/build/envsetup.sh
lunch aosp_cf_arm64_phone
m

Observed build failure:

============================================ [100% 445/445] analyzing Android.bp files and generating ninja file at /home/makohoek/work/amlogic/out/OUT-aosp-main/soong/build.aosp_cf_arm64_phone.ninja FAILED: /home/makohoek/work/amlogic/out/OUT-aosp-main/soong/build.aosp_cf_arm64_phone.ninja cd "$(dirname "/home/makohoek/work/amlogic/out/OUT-aosp-main/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "/home/makohoek/work/amlogic/out/OUT-aosp-main/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "/home/makohoek/work/amlogic/out/OUT-aosp-main/soon g" --out "/home/makohoek/work/amlogic/out/OUT-aosp-main" --soong_variables /home/makohoek/work/amlogic/out/OUT-aosp-main/soong/soong.aosp_cf_arm64_phone.variables -o /home/makohoek/work/amlogic/out/OUT-aosp-main/soong/build.aosp_cf_arm64_phone.ninja --bazel-mode --globListDir build --globFile /home/makohoek/w ork/amlogic/out/OUT-aosp-main/soong/globs-build.ninja -t -l /home/makohoek/work/amlogic/out/OUT-aosp-main/.module_paths/Android.bp.list --available_env /home/makohoek/work/amlogic/out/OUT-aosp-main/soong/soong.environment.available --used_env /home/makohoek/work/amlogic/out/OUT-aosp-main/soong/soong.environment.used. aosp_cf_arm64_phone.build Android.bp internal error: Path is outside directory: /home/makohoek/work/amlogic/out/OUT-aosp-main/bazel/output/execroot/__main__ internal error: Path is outside directory: /home/makohoek/work/amlogic/out/OUT-aosp-main/bazel/output/execroot/__main__ internal error: Path is outside directory: /home/makohoek/work/amlogic/out/OUT-aosp-main/bazel/output/execroot/__main__ internal error: Path is outside directory: /home/makohoek/work/amlogic/out/OUT-aosp-main/bazel/output/execroot/__main__ internal error: Path is outside directory: /home/makohoek/work/amlogic/out/OUT-aosp-main/bazel/output/execroot/__main__ internal error: Path is outside directory: /home/makohoek/work/amlogic/out/OUT-aosp-main/bazel/output/execroot/__main__

Expected result

Build passes and images are available in $OUT_DIR


Additional information

When unsetting OUT_DIR, (so using the default ~/work/amlogic/src/aosp-main/out/) this problem is not reproduced.

Reply all
Reply to author
Forward
0 new messages