[Android-tools-devel] Bug#1015353: android-platform-art: ftbfs with LTO (link time optimization) enabled
Matthias Klose
doko at debian.org
Tue Jul 19 17:50:24 BST 2022
Package: src:android-platform-art
Version: 11.0.0+r48-3
Severity: minor
Tags: sid bookworm
User: debian-gcc at lists.debian.org
Usertags: ftbfs-lto
This package currently fails to build (at least on the amd64
architecture) with link time optimizations enabled. For a background
for LTO please see
https://wiki.debian.org/ToolChain/LTO
The goal is to enable this optimization by default in an upcoming
Debian release in dpkg-buildflags for 64bit architectures. The goal
is to get this package to build with link time optimizations, or to
explicitly disable link time optimizations for this package build.
To reproduce the build failure, enable the lto optimization in
testing/unstable by adding "optimize=+lto" to DEB_BUILD_MAINT_OPTIONS
in the debian/rules file, or if this macro is unset, just set it:
export DEB_BUILD_MAINT_OPTIONS = optimize=+lto
Please try to fix the build with lto enabled, fixing the packaging or
forwarding the issue upstream. If the issue cannot be fixed,
explicitly disallow building the package with lto by adding to your
rules file:
export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
or adding that string to your existing setting of DEB_BUILD_MAINT_OPTIONS.
The full build log can be found at:
http://qa-logs.debian.net/2022/06/09/dpkglto/android-platform-art_11.0.0+r48-3_unstable_dpkglto.log
The last lines of the build log are at the end of this report.
[...]
SCHROOT_CHROOT_NAME=sid-amd64-sbuild
SCHROOT_COMMAND=env
SCHROOT_GID=1001
SCHROOT_GROUP=user42
SCHROOT_SESSION_ID=sid-amd64-sbuild-26626137-9a9b-450c-b7f4-59045f38f6fc
SCHROOT_UID=1001
SCHROOT_USER=user42
SHELL=/bin/sh
USER=user42
dpkg-buildpackage
-----------------
Command: dpkg-buildpackage --sanitize-env -us -uc -b -rfakeroot
dpkg-buildpackage: info: source package android-platform-art
dpkg-buildpackage: info: source version 11.0.0+r48-3
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Roger Shimizu <rosh at debian.org>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
debian/rules clean
dh clean
debian/rules override_dh_auto_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_clean
make clean --file=debian/libart.mk
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f libart.so* debian/out/operator_out.cc debian/out/mterp*.S
rm -f libartbase/arch/instruction_set.o libartbase/base/allocator.o libartbase/base/arena_allocator.o libartbase/base/arena_bit_vector.o libartbase/base/bit_vector.o libartbase/base/enums.o libartbase/base/file_magic.o libartbase/base/file_utils.o libartbase/base/hex_dump.o libartbase/base/hiddenapi_flags.o libartbase/base/logging.o libartbase/base/malloc_arena_pool.o libartbase/base/membarrier.o libartbase/base/memfd.o libartbase/base/memory_region.o libartbase/base/mem_map.o libartbase/base/os_linux.o libartbase/base/runtime_debug.o libartbase/base/safe_copy.o libartbase/base/scoped_arena_allocator.o libartbase/base/scoped_flock.o libartbase/base/socket_peer_is_trusted.o libartbase/base/time_utils.o libartbase/base/unix_file/fd_file.o libartbase/base/unix_file/random_access_file_utils.o libartbase/base/utils.o libartbase/base/zip_archive.o libartbase/base/mem_map_unix.o libdexfile/dex/art_dex_file_loader.o libdexfile/dex/compact_dex_file.o libdexfile/dex/compact_offset_table.o libdexfile/dex/descriptors_names.o libdexfile/dex/dex_file.o libdexfile/dex/dex_file_exception_helpers.o libdexfile/dex/dex_file_layout.o libdexfile/dex/dex_file_loader.o libdexfile/dex/dex_file_tracking_registrar.o libdexfile/dex/dex_file_verifier.o libdexfile/dex/dex_instruction.o libdexfile/dex/modifiers.o libdexfile/dex/primitive.o libdexfile/dex/signature.o libdexfile/dex/standard_dex_file.o libdexfile/dex/type_lookup_table.o libdexfile/dex/utf.o libdexfile/external/dex_file_ext.o libdexfile/external/dex_file_supp.o runtime/aot_class_linker.o runtime/art_field.o runtime/art_method.o runtime/backtrace_helper.o runtime/barrier.o runtime/base/locks.o runtime/base/mem_map_arena_pool.o runtime/base/mutex.o runtime/base/quasi_atomic.o runtime/base/timing_logger.o runtime/cha.o runtime/class_linker.o runtime/class_loader_context.o runtime/class_root.o runtime/class_table.o runtime/common_throws.o runtime/compiler_filter.o runtime/debug_print.o runtime/debugger.o runtime/dex/dex_file_annotations.o runtime/dex_register_location.o runtime/dex_to_dex_decompiler.o runtime/elf_file.o runtime/exec_utils.o runtime/fault_handler.o runtime/gc/allocation_record.o runtime/gc/allocator/dlmalloc.o runtime/gc/allocator/rosalloc.o runtime/gc/accounting/bitmap.o runtime/gc/accounting/card_table.o runtime/gc/accounting/heap_bitmap.o runtime/gc/accounting/mod_union_table.o runtime/gc/accounting/remembered_set.o runtime/gc/accounting/space_bitmap.o runtime/gc/collector/concurrent_copying.o runtime/gc/collector/garbage_collector.o runtime/gc/collector/immune_region.o runtime/gc/collector/immune_spaces.o runtime/gc/collector/mark_sweep.o runtime/gc/collector/partial_mark_sweep.o runtime/gc/collector/semi_space.o runtime/gc/collector/sticky_mark_sweep.o runtime/gc/gc_cause.o runtime/gc/heap.o runtime/gc/reference_processor.o runtime/gc/reference_queue.o runtime/gc/scoped_gc_critical_section.o runtime/gc/space/bump_pointer_space.o runtime/gc/space/dlmalloc_space.o runtime/gc/space/image_space.o runtime/gc/space/large_object_space.o runtime/gc/space/malloc_space.o runtime/gc/space/region_space.o runtime/gc/space/rosalloc_space.o runtime/gc/space/space.o runtime/gc/space/zygote_space.o runtime/gc/task_processor.o runtime/gc/verification.o runtime/hidden_api.o runtime/hprof/hprof.o runtime/image.o runtime/index_bss_mapping.o runtime/indirect_reference_table.o runtime/instrumentation.o runtime/intern_table.o runtime/interpreter/interpreter.o runtime/interpreter/interpreter_cache.o runtime/interpreter/interpreter_common.o runtime/interpreter/interpreter_intrinsics.o runtime/interpreter/interpreter_switch_impl0.o runtime/interpreter/interpreter_switch_impl1.o runtime/interpreter/interpreter_switch_impl2.o runtime/interpreter/interpreter_switch_impl3.o runtime/interpreter/lock_count_data.o runtime/interpreter/shadow_frame.o runtime/interpreter/unstarted_runtime.o runtime/java_frame_root_info.o runtime/jit/debugger_interface.o runtime/jit/jit.o runtime/jit/jit_code_cache.o runtime/jit/jit_memory_region.o runtime/jit/profiling_info.o runtime/jit/profile_saver.o runtime/jni/check_jni.o runtime/jni/java_vm_ext.o runtime/jni/jni_env_ext.o runtime/jni/jni_id_manager.o runtime/jni/jni_internal.o runtime/linear_alloc.o runtime/managed_stack.o runtime/method_handles.o runtime/mirror/array.o runtime/mirror/class.o runtime/mirror/class_ext.o runtime/mirror/dex_cache.o runtime/mirror/emulated_stack_frame.o runtime/mirror/executable.o runtime/mirror/field.o runtime/mirror/method.o runtime/mirror/method_handle_impl.o runtime/mirror/method_handles_lookup.o runtime/mirror/method_type.o runtime/mirror/object.o runtime/mirror/stack_trace_element.o runtime/mirror/string.o runtime/mirror/throwable.o runtime/mirror/var_handle.o runtime/monitor.o runtime/monitor_objects_stack_visitor.o runtime/native_bridge_art_interface.o runtime/native_stack_dump.o runtime/native/dalvik_system_DexFile.o runtime/native/dalvik_system_BaseDexClassLoader.o runtime/native/dalvik_system_VMDebug.o runtime/native/dalvik_system_VMRuntime.o runtime/native/dalvik_system_VMStack.o runtime/native/dalvik_system_ZygoteHooks.o runtime/native/java_lang_Class.o runtime/native/java_lang_Object.o runtime/native/java_lang_String.o runtime/native/java_lang_StringFactory.o runtime/native/java_lang_System.o runtime/native/java_lang_Thread.o runtime/native/java_lang_Throwable.o runtime/native/java_lang_VMClassLoader.o runtime/native/java_lang_invoke_MethodHandleImpl.o runtime/native/java_lang_ref_FinalizerReference.o runtime/native/java_lang_ref_Reference.o runtime/native/java_lang_reflect_Array.o runtime/native/java_lang_reflect_Constructor.o runtime/native/java_lang_reflect_Executable.o runtime/native/java_lang_reflect_Field.o runtime/native/java_lang_reflect_Method.o runtime/native/java_lang_reflect_Parameter.o runtime/native/java_lang_reflect_Proxy.o runtime/native/java_util_concurrent_atomic_AtomicLong.o runtime/native/libcore_util_CharsetUtils.o runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.o runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.o runtime/native/sun_misc_Unsafe.o runtime/non_debuggable_classes.o runtime/nterp_helpers.o runtime/oat.o runtime/oat_file.o runtime/oat_file_assistant.o runtime/oat_file_manager.o runtime/oat_quick_method_header.o runtime/object_lock.o runtime/offsets.o runtime/parsed_options.o runtime/plugin.o runtime/quick_exception_handler.o runtime/read_barrier.o runtime/reference_table.o runtime/reflection.o runtime/reflective_handle_scope.o runtime/reflective_value_visitor.o runtime/runtime.o runtime/runtime_callbacks.o runtime/runtime_common.o runtime/runtime_intrinsics.o runtime/runtime_options.o runtime/scoped_thread_state_change.o runtime/signal_catcher.o runtime/stack.o runtime/stack_map.o runtime/string_builder_append.o runtime/thread.o runtime/thread_list.o runtime/thread_pool.o runtime/ti/agent.o runtime/trace.o runtime/transaction.o runtime/var_handles.o runtime/vdex_file.o runtime/verifier/class_verifier.o runtime/verifier/instruction_flags.o runtime/verifier/method_verifier.o runtime/verifier/reg_type.o runtime/verifier/reg_type_cache.o runtime/verifier/register_line.o runtime/verifier/verifier_deps.o runtime/verify_object.o runtime/well_known_classes.o runtime/arch/context.o runtime/arch/instruction_set_features.o runtime/arch/memcmp16.o runtime/arch/arm/instruction_set_features_arm.o runtime/arch/arm/registers_arm.o runtime/arch/arm64/instruction_set_features_arm64.o runtime/arch/arm64/registers_arm64.o runtime/arch/x86/instruction_set_features_x86.o runtime/arch/x86/registers_x86.o runtime/arch/x86_64/registers_x86_64.o runtime/entrypoints/entrypoint_utils.o runtime/entrypoints/jni/jni_entrypoints.o runtime/entrypoints/math_entrypoints.o runtime/entrypoints/quick/quick_alloc_entrypoints.o runtime/entrypoints/quick/quick_cast_entrypoints.o runtime/entrypoints/quick/quick_deoptimization_entrypoints.o runtime/entrypoints/quick/quick_dexcache_entrypoints.o runtime/entrypoints/quick/quick_entrypoints_enum.o runtime/entrypoints/quick/quick_field_entrypoints.o runtime/entrypoints/quick/quick_fillarray_entrypoints.o runtime/entrypoints/quick/quick_jni_entrypoints.o runtime/entrypoints/quick/quick_lock_entrypoints.o runtime/entrypoints/quick/quick_math_entrypoints.o runtime/entrypoints/quick/quick_string_builder_append_entrypoints.o runtime/entrypoints/quick/quick_thread_entrypoints.o runtime/entrypoints/quick/quick_throw_entrypoints.o runtime/entrypoints/quick/quick_trampoline_entrypoints.o runtime/monitor_linux.o runtime/runtime_linux.o runtime/thread_linux.o runtime/interpreter/mterp/mterp.o runtime/interpreter/mterp/nterp.o runtime/arch/x86_64/context_x86_64.o runtime/arch/x86_64/entrypoints_init_x86_64.o runtime/arch/x86_64/thread_x86_64.o runtime/monitor_pool.o runtime/arch/x86/fault_handler_x86.o libartpalette/system/palette_fake.o libprofile/profile/profile_boot_info.o libprofile/profile/profile_compilation_info.o debian/out/operator_out.o
rm -f runtime/arch/x86_64/jni_entrypoints_x86_64.o runtime/arch/x86_64/memcmp16_x86_64.o runtime/arch/x86_64/quick_entrypoints_x86_64.o debian/out/mterp.o debian/out/mterp_x86_64.o
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_clean
debian/rules binary
dh binary
dh_update_autotools_config
dh_autoreconf
debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_build --buildsystem=makefile -- --file=debian/dmtracedump.mk
make -j8 "INSTALL=install --strip-program=true" --file=debian/dmtracedump.mk
make[2]: Entering directory '/<<PKGBUILDDIR>>'
clang++ -c -o tools/dmtracedump/tracedump.o tools/dmtracedump/tracedump.cc -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -I/usr/include/android -UDEBUG -Itools/dmtracedump -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
tools/dmtracedump/tracedump.cc:1482:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
system(command);
^~~~~~ ~~~~~~~
1 warning generated.
mkdir -p debian/out
clang++ -o debian/out/dmtracedump tools/dmtracedump/tracedump.o -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -fPIC
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build --buildsystem=makefile -- --file=debian/libart.mk debian/out/asm_defines.h
make -j8 "INSTALL=install --strip-program=true" --file=debian/libart.mk debian/out/asm_defines.h
make[2]: Entering directory '/<<PKGBUILDDIR>>'
clang++ -S -o debian/out/asm_defines.output tools/cpp-define-generator/asm_defines.cc -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -I/usr/include/android -UDEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -DART_BASE_ADDRESS_MAX_DELTA=0x1000000 -DART_BASE_ADDRESS_MIN_DELTA=-0x1000000 -DART_BASE_ADDRESS=0x60000000 -DART_DEFAULT_COMPACT_DEX_LEVEL=fast -DART_DEFAULT_GC_TYPE_IS_CMS -DART_ENABLE_ADDRESS_SANITIZER=1 -DART_ENABLE_CODEGEN_x86_64 -DART_FRAME_SIZE_LIMIT=1736 -DART_READ_BARRIER_TYPE_IS_BAKER=1 -DART_STACK_OVERFLOW_GAP_arm=8192 -DART_STACK_OVERFLOW_GAP_arm64=8192 -DART_STACK_OVERFLOW_GAP_x86_64=8192 -DART_STACK_OVERFLOW_GAP_x86=8192 -DART_USE_READ_BARRIER=1 -DBUILDING_LIBART=1 -DIMT_SIZE=43 -DUSE_D8_DESUGAR=1 -I. -I/usr/include/android/nativehelper -Icmdline -Idebian/out -Ilibartbase -Ilibartbase/arch -Ilibartpalette/include -Ilibdexfile -Ilibdexfile/external/include -Ilibelffile -Ilibnativebridge/include -Ilibnativeloader/include -Ilibprofile -Iruntime -Isigchainlib -Itools/cpp-define-generator -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++17 -fno-omit-frame-pointer -fno-rtti -fstrict-aliasing -fvisibility=protected -Wa,--noexecstack -Wno-invalid-offsetof -Wno-invalid-partial-specialization
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
python3 tools/cpp-define-generator/make_header.py debian/out/asm_defines.output > debian/out/asm_defines.h
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/tools/cpp-define-generator/make_header.py", line 56, in <module>
print(convert(open(args.input, "r").read()))
File "/<<PKGBUILDDIR>>/tools/cpp-define-generator/make_header.py", line 37, in convert
raise RuntimeError("Failed to find any asm defines in the input")
RuntimeError: Failed to find any asm defines in the input
make[2]: *** [debian/libart.mk:501: debian/out/asm_defines.h] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j8 "INSTALL=install --strip-program=true" --file=debian/libart.mk debian/out/asm_defines.h returned exit code 2
make[1]: *** [debian/rules:56: debian/out/asm_defines.h] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:67: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
More information about the Android-tools-devel
mailing list