android / ndk

The Android Native Development Kit
2k stars 257 forks source link

[Bug]: ld.lld: error: Invalid record #1858

Closed anonymix007 closed 1 year ago

anonymix007 commented 1 year ago

Description

prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++ out/soong/.intermediates/bionic/libc/crtbegin_so/android_arm_armv8-2a_cortex-a76_apex31/crtbegin_so.o @out/soong/.intermediates/art/perfetto_hprof/libperfetto_hprof/android_arm_armv8-2a_cortex-a76_shared_apex31/unstripped/libperfetto_hprof.so.rsp out/soong/.intermediates/external/perfetto/libperfetto_client_experimental/android_arm_armv8-2a_cortex-a76_static_apex31/libperfetto_client_experimental.a out/soong/.intermediates/external/perfetto/perfetto_trace_protos/android_arm_armv8-2a_cortex-a76_static_apex31/perfetto_trace_protos.a out/soong/.intermediates/external/libcxxabi/libc++demangle/android_arm_armv8-2a_cortex-a76_static_apex31/libc++demangle.a prebuilts/clang/host/linux-x86/clang-r450784d/lib64/clang/14.0.6/lib/linux/libclang_rt.builtins-arm-android.a out/soong/.intermediates/system/libbase/libbase/android_arm_armv8-2a_cortex-a76_shared_apex31/libbase.so out/soong/.intermediates/system/logging/liblog/liblog/android_arm_armv8-2a_cortex-a76_shared_current/liblog.so out/soong/.intermediates/art/runtime/libart/android_arm_armv8-2a_cortex-a76_shared_apex31/libart.so out/soong/.intermediates/art/libartbase/libartbase/android_arm_armv8-2a_cortex-a76_shared_apex31/libartbase.so out/soong/.intermediates/art/libdexfile/libdexfile/android_arm_armv8-2a_cortex-a76_shared_apex31/libdexfile.so out/soong/.intermediates/external/libcxx/libc++/android_arm_armv8-2a_cortex-a76_shared_apex31/libc++.so out/soong/.intermediates/bionic/libc/libc/android_arm_armv8-2a_cortex-a76_shared_current/libc.so out/soong/.intermediates/bionic/libm/libm/android_arm_armv8-2a_cortex-a76_shared_current/libm.so out/soong/.intermediates/bionic/libdl/libdl/android_arm_armv8-2a_cortex-a76_shared_current/libdl.so out/soong/.intermediates/bionic/libc/crtend_so/android_arm_armv8-2a_cortex-a76_apex31/obj/bionic/libc/arch-common/bionic/crtend_so.o -o out/soong/.intermediates/art/perfetto_hprof/libperfetto_hprof/android_arm_armv8-2a_cortex-a76_shared_apex31/unstripped/libperfetto_hprof.so -target armv7a-linux-androideabi31 -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--fatal-warnings -Wl,--no-undefined-version -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_stripped.a -Wl,--exclude-libs,libunwind_llvm.a -Wl,--exclude-libs,libunwind.a -Wl,--icf=safe -fuse-ld=lld -Wl,--pack-dyn-relocs=android+relr -Wl,--no-undefined -Wl,--hash-style=gnu -Wl,-m,armelf -Wl,--exclude-libs=libclang_rt.builtins.a  -nostdlib -Wl,--gc-sections -shared -Wl,-soname,libperfetto_hprof.so
ld.lld: error: Invalid record
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)

I've tried clang-r487747 as well, it produces a bit better error message:

ld.lld: error: out/soong/.intermediates/external/perfetto/libperfetto_client_experimental/android_arm_armv8-2a_cortex-a76_static_apex31/libperfetto_client_experimental.a(consumer_ipc_client_impl.o): Invalid record
clang-17: error: linker command failed with exit code 1 (use -v to see invocation)

Here are some files from that build, do I need to attach something else?

Upstream bug

No response

Commit to cherry-pick

No response

Affected versions

r25, Canary

Canary version

No response

Host OS

Linux

Host OS version

LMDE 5

Affected ABIs

armeabi-v7a

DanAlbert commented 1 year ago

mediafire

btw, you can drag and drop a zip file directly into the github text box to attach it to the bug

anonymix007 commented 1 year ago

directly into the github

No, I can't. Files are too large for that.

DanAlbert commented 1 year ago

Ah, gotcha 👍 I'd never run into the size limit before.

pirama-arumuga-nainar commented 1 year ago

To the failing command (that invokes clang for the link step), add -Wl,--reproduce=repro.tar. That tar should help easier repro (and may be smaller as well).

anonymix007 commented 1 year ago

That tar should help easier repro (and may be smaller as well).

Definitely not smaller. It's 152 MiB. Uploaded here

pirama-arumuga-nainar commented 1 year ago

ld.lld: error: out/soong/.intermediates/external/perfetto/libperfetto_client_experimental/android_arm_armv8-2a_cortex-a76_static_apex31/libperfetto_client_experimental.a(consumer_ipc_client_impl.o): Invalid record

I am able to reproduce. The file consumer_ipc_client_impl.o in the archive is malformed.
Does this reproduce on a clean build?

If so, share the compile command for building this file. (The same compiler used in r25 was also deployed in AOSP and we didn't see the error.)

anonymix007 commented 1 year ago

Does this reproduce on a clean build?

Is m clean && lunch aospa_davinci-userdebug && m libperfetto_hprof considered the clean build? If so then yes. How to get build command? Found it in .ninja and .mk files, they are quite large (> 1 GiB), no idea how to extract that information from.

pirama-arumuga-nainar commented 1 year ago

How to get build command?

gunzip -c out/verbose.log.gz and search for consumer_ipc_client_impl.o. It'd have one for each variant (aarch64, arm, etc). Share the command for android_arm_armv8-2a_cortex-a76_static_apex31.

verbose.log.gz only has the output of the last run build command so do it right after the repro steps in the earlier comment.

Are the sources corresponding to AOSP master or a different branch in AOSP? If aosp/master, when was the last sync?

anonymix007 commented 1 year ago

There are exactly 2 lines with consumer_ipc_client_impl.o in verbose.log:

[3035/3930] PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++ -c -D__ANDROID_APEX__ -D__ANDROID_APEX_MIN_SDK_VERSION__=31  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wunreachable-code-loop-increment -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fdebug-default-version=5 -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=string-plus-int -Werror=unreachable-code-loop-increment -D__compiler_offsetof=__builtin_offsetof -faddrsig -fcommon -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-gnu-designator -Wno-gnu-folding-constant -Wunguarded-availability -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ -ffp-contract=off -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -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=format-security -nostdlibinc -fdebug-info-for-profiling -Wno-enum-compare -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer-compare -Wno-xor-used-as-pow -Wno-final-dtor-non-final-class -Wno-psabi -Wno-null-pointer-subtraction -Wno-string-concatenation -march=armv8.2-a -mcpu=cortex-a55 -target aarch64-linux-androidS -fPIC -Wsign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -fvisibility-inlines-hidden  -Iexternal/perfetto/include -Iexternal/perfetto/include/perfetto/base/build_configs/android_tree -Iexternal/perfetto -Iexternal/perfetto/include -Iexternal/perfetto/include/perfetto/base/build_configs/android_tree -Iexternal/perfetto/src/profiling/memory/include -Iexternal/perfetto -D__LIBLOG_API__=10000 -D__LIBC_API__=10000 -D__LIBM_API__=10000 -D__LIBDL_API__=10000 -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Isystem/logging/liblog/include -Ibionic/libc/async_safe/include -Ibionic/libc/system_properties/include -Isystem/core/property_service/libpropertyinfoparser/include -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_common_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_common_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_common_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_common_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_android_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_android_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_android_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_android_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_ftrace_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_ftrace_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_ftrace_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_ftrace_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_gpu_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_gpu_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_gpu_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_gpu_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_inode_file_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_inode_file_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_inode_file_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_inode_file_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_interceptors_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_interceptors_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_interceptors_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_interceptors_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_power_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_power_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_power_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_power_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_process_stats_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_process_stats_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_process_stats_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_process_stats_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_profiling_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_profiling_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_profiling_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_profiling_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_sys_stats_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_sys_stats_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_sys_stats_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_sys_stats_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_track_event_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_track_event_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_track_event_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_track_event_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_ipc_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_ipc_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_wire_protocol_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_wire_protocol_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_android_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_android_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_chrome_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_chrome_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_filesystem_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_filesystem_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_ftrace_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_ftrace_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_gpu_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_gpu_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_interned_data_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_interned_data_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_minimal_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_minimal_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_non_minimal_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_non_minimal_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_perfetto_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_perfetto_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_power_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_power_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_profiling_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_profiling_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_ps_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_ps_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_sys_stats_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_sys_stats_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_system_info_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_system_info_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_track_event_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_track_event_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_track_event_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_track_event_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_translation_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_translation_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_src_base_version_gen_h/gen -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Wall -Werror -O2 -Wno-error=return-type -Wno-sign-compare -Wno-sign-promo -Wno-unused-parameter -fvisibility=hidden -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DPERFETTO_BUILD_WITH_ANDROID_USERDEBUG -flto=thin -fsplit-lto-unit -std=gnu++17 -fno-rtti -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include  -Werror=bool-operation -Werror=implicit-int-float-conversion -Werror=int-in-bool-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=string-compare -Werror=xor-used-as-pow -Wno-void-pointer-to-enum-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-string-compare -Wno-pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-align-mismatch -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno-reorder-init-list -Wno-implicit-fallthrough -Wno-c99-designator -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-alloca -Wno-dangling-gsl -Wno-pointer-compare -Wno-final-dtor-non-final-class -Wno-incomplete-setjmp-declaration -Wno-sizeof-array-div -Wno-xor-used-as-pow -Wno-c++17-extensions -flax-vector-conversions=all -Wno-tautological-overlap-compare -Wno-range-loop-analysis -Wno-invalid-partial-specialization -Wno-deprecated-copy -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-bool-operation -Wno-unused-comparison -Wno-string-compare -Wno-wrong-info -Wno-thread-safety-analysis -Wno-unsequenced -Wno-unknown-warning-option -Wno-unused-variable -Wno-unused-value -Wno-unused-parameter -Wno-non-c-typedef-for-linkage -Wno-typedef-redefinition -Wno-format -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Wno-string-concatenation -Wno-void-pointer-to-enum-cast -Wno-incompatible-pointer-types -Wno-format-invalid-specifier-fcommon  -Wno-self-assign -Wno-format -Wno-unused-label -Wno-pointer-sign -Wno-writable-strings -Wno-missing-declarations -Wno-reorder-ctor -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Wno-bitwise-instead-of-logical -MD -MF out/soong/.intermediates/external/perfetto/libperfetto_client_experimental/android_arm64_armv8-2a_cortex-a76_static_apex31/obj/external/perfetto/src/tracing/ipc/consumer/consumer_ipc_client_impl.o.d -o out/soong/.intermediates/external/perfetto/libperfetto_client_experimental/android_arm64_armv8-2a_cortex-a76_static_apex31/obj/external/perfetto/src/tracing/ipc/consumer/consumer_ipc_client_impl.o external/perfetto/src/tracing/ipc/consumer/consumer_ipc_client_impl.cc
[3365/3930] PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++ -c -D__ANDROID_APEX__ -D__ANDROID_APEX_MIN_SDK_VERSION__=31 -mthumb -Os -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wunreachable-code-loop-increment -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fdebug-default-version=5 -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=string-plus-int -Werror=unreachable-code-loop-increment -D__compiler_offsetof=__builtin_offsetof -faddrsig -fcommon -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-gnu-designator -Wno-gnu-folding-constant -Wunguarded-availability -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ -ffp-contract=off -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -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=format-security -nostdlibinc -fdebug-info-for-profiling -Wno-enum-compare -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer-compare -Wno-xor-used-as-pow -Wno-final-dtor-non-final-class -Wno-psabi -Wno-null-pointer-subtraction -Wno-string-concatenation -msoft-float -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 -mcpu=cortex-a55 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -target armv7a-linux-androideabiS -fPIC -Wsign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -fvisibility-inlines-hidden  -Iexternal/perfetto/include -Iexternal/perfetto/include/perfetto/base/build_configs/android_tree -Iexternal/perfetto -Iexternal/perfetto/include -Iexternal/perfetto/include/perfetto/base/build_configs/android_tree -Iexternal/perfetto/src/profiling/memory/include -Iexternal/perfetto -D__LIBLOG_API__=10000 -D__LIBC_API__=10000 -D__LIBM_API__=10000 -D__LIBDL_API__=10000 -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Isystem/logging/liblog/include -Ibionic/libc/async_safe/include -Ibionic/libc/system_properties/include -Isystem/core/property_service/libpropertyinfoparser/include -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_common_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_common_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_common_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_common_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_android_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_android_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_android_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_android_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_ftrace_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_ftrace_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_ftrace_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_ftrace_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_gpu_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_gpu_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_gpu_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_gpu_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_inode_file_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_inode_file_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_inode_file_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_inode_file_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_interceptors_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_interceptors_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_interceptors_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_interceptors_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_power_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_power_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_power_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_power_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_process_stats_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_process_stats_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_process_stats_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_process_stats_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_profiling_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_profiling_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_profiling_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_profiling_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_sys_stats_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_sys_stats_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_sys_stats_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_sys_stats_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_track_event_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_track_event_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_track_event_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_track_event_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_config_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_ipc_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_ipc_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_wire_protocol_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_ipc_wire_protocol_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_android_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_android_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_chrome_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_chrome_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_filesystem_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_filesystem_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_ftrace_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_ftrace_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_gpu_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_gpu_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_interned_data_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_interned_data_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_minimal_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_minimal_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_non_minimal_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_non_minimal_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_perfetto_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_perfetto_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_power_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_power_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_profiling_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_profiling_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_ps_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_ps_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_sys_stats_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_sys_stats_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_system_info_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_system_info_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_track_event_cpp_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_track_event_cpp_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_track_event_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_track_event_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_translation_zero_gen_headers/gen/external/perfetto -Iout/soong/.intermediates/external/perfetto/perfetto_protos_perfetto_trace_translation_zero_gen_headers/gen/external/perfetto/protos -Iout/soong/.intermediates/external/perfetto/perfetto_src_base_version_gen_h/gen -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Wall -Werror -O2 -Wno-error=return-type -Wno-sign-compare -Wno-sign-promo -Wno-unused-parameter -fvisibility=hidden -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DPERFETTO_BUILD_WITH_ANDROID_USERDEBUG -flto=thin -fsplit-lto-unit -std=gnu++17 -fno-rtti -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include  -Werror=bool-operation -Werror=implicit-int-float-conversion -Werror=int-in-bool-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=string-compare -Werror=xor-used-as-pow -Wno-void-pointer-to-enum-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-string-compare -Wno-pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-align-mismatch -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno-reorder-init-list -Wno-implicit-fallthrough -Wno-c99-designator -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-alloca -Wno-dangling-gsl -Wno-pointer-compare -Wno-final-dtor-non-final-class -Wno-incomplete-setjmp-declaration -Wno-sizeof-array-div -Wno-xor-used-as-pow -Wno-c++17-extensions -flax-vector-conversions=all -Wno-tautological-overlap-compare -Wno-range-loop-analysis -Wno-invalid-partial-specialization -Wno-deprecated-copy -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-bool-operation -Wno-unused-comparison -Wno-string-compare -Wno-wrong-info -Wno-thread-safety-analysis -Wno-unsequenced -Wno-unknown-warning-option -Wno-unused-variable -Wno-unused-value -Wno-unused-parameter -Wno-non-c-typedef-for-linkage -Wno-typedef-redefinition -Wno-format -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Wno-string-concatenation -Wno-void-pointer-to-enum-cast -Wno-incompatible-pointer-types -Wno-format-invalid-specifier-fcommon  -Wno-self-assign -Wno-format -Wno-unused-label -Wno-pointer-sign -Wno-writable-strings -Wno-missing-declarations -Wno-reorder-ctor -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Wno-bitwise-instead-of-logical -MD -MF out/soong/.intermediates/external/perfetto/libperfetto_client_experimental/android_arm_armv8-2a_cortex-a76_static_apex31/obj/external/perfetto/src/tracing/ipc/consumer/consumer_ipc_client_impl.o.d -o out/soong/.intermediates/external/perfetto/libperfetto_client_experimental/android_arm_armv8-2a_cortex-a76_static_apex31/obj/external/perfetto/src/tracing/ipc/consumer/consumer_ipc_client_impl.o external/perfetto/src/tracing/ipc/consumer/consumer_ipc_client_impl.cc

This is not aosp/master, but rather AOSPA. Last sync was probably a week or so ago (but firsth it was reproduced a month ago and reported here)

pirama-arumuga-nainar commented 1 year ago

That command produces a reasonable output for me (llvm-dis consumer_ipc_client_impl.o doesn't report an error) on ToT AOSP with clang-r450784d.

Just to discard that possibility, can you run the above command without ccache and verify if llvm-dis consumer_ipc_client_impl.o passes?

anonymix007 commented 1 year ago

Yes, llvm-dis silently produces .0.ll and .1.ll files

pirama-arumuga-nainar commented 1 year ago

In that case, it looks like ccache is caching and returning a bad output and needs to be cleared.

anonymix007 commented 1 year ago

ccache -C && m clean && lunch aospa_davinci-userdebug && m libperfetto_hprof builds successfully