build failure on x86_64, cp: missing destination file operand after '.../GoogleCamera_intermediates/package.apk'
Closed this issue · 2 comments
vicamo commented
Full error messages:
[ 0% 1/16329] target Prebuilt: GoogleCamera (out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk)
FAILED: out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk
/bin/bash -c "(rm -f out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk ) && (cp out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk ) && (if (zipinfo out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk 'lib/*.so' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then rm -rf out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/uncompressedlibs && mkdir out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/uncompressedlibs; unzip out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk 'lib/*.so' -d out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/uncompressedlibs && zip -d out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk 'lib/*.so' && ( cd out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/uncompressedlibs && find lib -type f | sort | zip -D -X -0 ../package.apk -@ ) && rm -rf out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/uncompressedlibs; fi ) && (if ! out/host/linux-x86/bin/zipalign -c -p 4 out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk >/dev/null ; then mv out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk.unaligned; out/host/linux-x86/bin/zipalign -f -p 4 out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk.unaligned out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk.aligned; mv out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk.aligned out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk; fi )"
cp: missing destination file operand after 'out/target/product/generic_x86_64/obj/APPS/GoogleCamera_intermediates/package.apk'
Try 'cp --help' for more information.
[ 0% 6/16329] target Prebuilt: GoogleTTS (out/target/product/generic_x86_64/obj/APPS/GoogleTTS_intermediates/package.apk)
Archive: out/target/product/generic_x86_64/obj/APPS/GoogleTTS_intermediates/package.apk
inflating: out/target/product/generic_x86_64/obj/APPS/GoogleTTS_intermediates/uncompressedlibs/lib/x86/libtts_android.so
deleting: lib/x86/libtts_android.so
adding: lib/x86/libtts_android.so (stored 0%)
[ 0% 8/16329] Copy: out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar
ninja: build stopped: subcommand failed.
07:26:45 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
Command exited with non-zero status 2
From core/prebuilt_apk.mk, included from modules/GoogleCamera/Android.mk, it tries to locate appropriate prebuilt apk files for all, $(TARGET_ARCH) and $(TARGET_2ND_ARCH). However, while GoogleCamera is currently only available under arm and arm64, an empty LOCAL_SRC_FILES
is returned, which is then referenced in AOSP build/core/prebuilt_internal.mk as my_prebuilt_src_file
, which is then used as first file operand for command cp
.
To avoid this error, I'd suggest to move that include $(BUILD_PREBUILT)
line into the following ifdef LOCAL_SRC_FILES
-braced block in core/prebuilt_apk.mk, line 52.