minimal-manifest-twrp / platform_manifest_twrp_omni

Minimal manifest for building TWRP for devices shipped with Android 5.1 through Android 9.0
324 stars 324 forks source link

Twrp compile failed - data argument not used by format string #94

Closed amir28 closed 2 years ago

amir28 commented 2 years ago

I'm trying to build twrp for my device using github actions from my repo and this workflow file with default values but the compilation ends up with this error:

/bin/bash -c "***  prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++     -I system/vold -I system/extras -I system/core/adb -I system/core/libsparse -I external/zlib -I bootable/recovery/bootloader_message_twrp/include -I bionic -I external/boringssl/include -I external/libcxx/include -I bootable/recovery/otautil/include -I external/libselinux/include -I system/extras/ext4_utils -I external/boringssl/src/include -I bootable/recovery -I /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/EXECUTABLES/recovery_intermediates -I /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/gen/EXECUTABLES/recovery_intermediates -I libnativehelper/include_jni \$(cat /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/EXECUTABLES/recovery_intermediates/import_includes)  -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=\$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -march=armv8-a  -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin  -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -Wno-gnu-include-next -fvisibility-inlines-hidden  -std=gnu++14   -fno-rtti -Wall -Werror -DTW_DEVICE_VERSION='\"-0\"' -DPLATFORM_SDK_VERSION=28 -DRECOVERY_API_VERSION=3 -Wno-unused-parameter -DTW_GIT_REVISION='\"9d3ea68b\"' -DTW_HAS_MTP -DBOARD_HAS_NO_REAL_SDCARD -DRECOVERY_SDCARD_ON_DATA -DCUSTOM_LUN_FILE=\\\"/sys/class/android_usb/android0/f_mass_storage/lun/file\\\" -DTW_INCLUDE_CRYPTO -DTW_INCLUDE_FBE -DTW_INCLUDE_FBE_METADATA_DECRYPT -DTW_BRIGHTNESS_PATH=/sys/class/leds/lcd-backlight/brightness -DTW_SECONDARY_BRIGHTNESS_PATH=/sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness -DTW_MAX_BRIGHTNESS=255 -DTW_DEFAULT_BRIGHTNESS=80 -DQCOM_RTC_FIX -DHAVE_CAPABILITIES -DTW_USE_NEW_MINADBD -DTW_DEFAULT_LANGUAGE=en -DTWRES=\\\"/twres/\\\" -DTWHTCD_PATH=\\\"/twres/htcd/\\\" -fPIE -D_USING_LIBCXX -DANDROID_STRICT   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch   -MD -MF /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/EXECUTABLES/recovery_intermediates/data.d -o /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/EXECUTABLES/recovery_intermediates/data.o bootable/recovery/data.cpp"
bootable/recovery/data.cpp:703:38: error: data argument not used by format string [-Werror,-Wformat-extra-args]
                sprintf(lun_file, CUSTOM_LUN_FILE, 0);
                                  ~~~~~~~~~~~~~~~  ^
1 error generated.

I really confused of how to solve this. thank you

amir28 commented 2 years ago

seems I found how to solve this. There was two TARGET_USE_CUSTOM_LUN_FILE_PATH in my device tree BoardConfig.mk but now I get this error:

/bin/bash -c "***  prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++     -I bootable/recovery/minuitwrp/include -I external/libpng -I external/zlib -I system/core/include -I external/freetype/include -I external/libcxx/include -I bootable/recovery/minuitwrp -I /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/SHARED_LIBRARIES/libminuitwrp_intermediates -I /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/gen/SHARED_LIBRARIES/libminuitwrp_intermediates -I libnativehelper/include_jni \$(cat /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/SHARED_LIBRARIES/libminuitwrp_intermediates/import_includes)  -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=\$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -march=armv8-a  -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin  -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -Wno-gnu-include-next -fvisibility-inlines-hidden  -std=gnu++14   -fno-rtti -Wall -Werror -DHAS_ADF -DHAS_DRM -DOVERSCAN_PERCENT=0 -DTW_SCREEN_BLANK_ON_BOOT -DTW_BRIGHTNESS_PATH=\\\"/sys/class/leds/lcd-backlight/brightness\\\" -DTW_SECONDARY_BRIGHTNESS_PATH=\\\"/sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness\\\" -DTW_MAX_BRIGHTNESS=255 -DTW_DEFAULT_BRIGHTNESS=\\\"80 \\\" -DTW_ROTATION=0 -DTW_INPUT_BLACKLIST=\"hbtp_vm\" -DTWRES=\\\"/twres/\\\" -fPIC -D_USING_LIBCXX -DANDROID_STRICT   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch   -MD -MF /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/SHARED_LIBRARIES/libminuitwrp_intermediates/graphics.d -o /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/SHARED_LIBRARIES/libminuitwrp_intermediates/graphics.o bootable/recovery/minuitwrp/graphics.cpp"
clang++.real: error: no such file or directory: '"'
[  4% 624/13941] target  C++: libminuitwrp <= bootable/recovery/minuitwrp/graphics_fbdev.cpp
FAILED: /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/SHARED_LIBRARIES/libminuitwrp_intermediates/graphics_fbdev.o 
/bin/bash -c "***  prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++     -I bootable/recovery/minuitwrp/include -I external/libpng -I external/zlib -I system/core/include -I external/freetype/include -I external/libcxx/include -I bootable/recovery/minuitwrp -I /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/SHARED_LIBRARIES/libminuitwrp_intermediates -I /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/gen/SHARED_LIBRARIES/libminuitwrp_intermediates -I libnativehelper/include_jni \$(cat /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/SHARED_LIBRARIES/libminuitwrp_intermediates/import_includes)  -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=\$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -march=armv8-a  -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin  -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -Wno-gnu-include-next -fvisibility-inlines-hidden  -std=gnu++14   -fno-rtti -Wall -Werror -DHAS_ADF -DHAS_DRM -DOVERSCAN_PERCENT=0 -DTW_SCREEN_BLANK_ON_BOOT -DTW_BRIGHTNESS_PATH=\\\"/sys/class/leds/lcd-backlight/brightness\\\" -DTW_SECONDARY_BRIGHTNESS_PATH=\\\"/sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness\\\" -DTW_MAX_BRIGHTNESS=255 -DTW_DEFAULT_BRIGHTNESS=\\\"80 \\\" -DTW_ROTATION=0 -DTW_INPUT_BLACKLIST=\"hbtp_vm\" -DTWRES=\\\"/twres/\\\" -fPIC -D_USING_LIBCXX -DANDROID_STRICT   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch   -MD -MF /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/SHARED_LIBRARIES/libminuitwrp_intermediates/graphics_fbdev.d -o /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/rk3318/obj/SHARED_LIBRARIES/libminuitwrp_intermediates/graphics_fbdev.o bootable/recovery/minuitwrp/graphics_fbdev.cpp"
clang++.real: error: no such file or directory: '"'
ninja: build stopped: subcommand failed.
09:37:57 ninja failed with: exit status 1
CaptainThrowback commented 2 years ago

Looks like a device tree issue, not a manifest problem.