[Android-tools-devel] Bug#1015355: android-platform-tools: ftbfs with LTO (link time optimization) enabled

Matthias Klose doko at debian.org
Tue Jul 19 17:50:28 BST 2022


Package: src:android-platform-tools
Version: 29.0.6-18
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-tools_29.0.6-18_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
clang++ -c -o system/core/base/liblog_symbols.o system/core/base/liblog_symbols.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang++ -c -o system/core/base/logging.o system/core/base/logging.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang++ -c -o system/core/base/mapped_file.o system/core/base/mapped_file.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang++ -c -o system/core/base/parsebool.o system/core/base/parsebool.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clangclang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clangclang: : warning: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]

clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clang++ -c -o system/core/base/parsenetaddress.o system/core/base/parsenetaddress.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clang++ -c -o system/core/base/process.o system/core/base/process.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clang++ -c -o system/core/base/properties.o system/core/base/properties.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang++ -c -o system/core/base/stringprintf.o system/core/base/stringprintf.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clang++ -c -o system/core/base/strings.o system/core/base/strings.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clang++ -c -o system/core/base/threads.o system/core/base/threads.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
system/core/base/logging.cpp:248:7: warning: array designators are a C99 extension [-Wc99-designator]
      [android::base::VERBOSE] = 7,              // KERN_DEBUG (there is no verbose kernel log
      ^~~~~~~~~~~~~~~~~~~~~~~~
clang++ -c -o system/core/base/test_utils.o system/core/base/test_utils.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang++ -c -o system/core/base/errors_unix.o system/core/base/errors_unix.cpp -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=gnu++2a -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_FILE_OFFSET_BITS=64 -Isystem/core/base/include -Isystem/core/include 
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
1 warning generated.
clang++ system/core/base/abi_compatibility.o system/core/base/chrono_utils.o system/core/base/cmsg.o system/core/base/file.o system/core/base/liblog_symbols.o system/core/base/logging.o system/core/base/mapped_file.o system/core/base/parsebool.o system/core/base/parsenetaddress.o system/core/base/process.o system/core/base/properties.o system/core/base/stringprintf.o system/core/base/strings.o system/core/base/threads.o system/core/base/test_utils.o system/core/base/errors_unix.o -o debian/out/system/core/libbase.so.0 -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -fPIC -pie -Ldebian/out/system/core -Wl,-rpath=/usr/lib/x86_64-linux-gnu/android -Wl,-soname,libbase.so.0 -llog -lpthread -shared
clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
ln -sf libbase.so.0 debian/out/system/core/libbase.so
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build --buildsystem=makefile -- --file=debian/external/libunwind/libunwind.mk
	make -j8 "INSTALL=install --strip-program=true" --file=debian/external/libunwind/libunwind.mk
make[2]: Entering directory '/<<PKGBUILDDIR>>'
clang -c -o external/libunwind/src/mi/init.o external/libunwind/src/mi/init.c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -fcommon -Werror -Wno-absolute-value -Wno-header-guard -Wno-inline-asm -Wno-unused-parameter  -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_GNU_SOURCE -DHAVE_CONFIG_H -DNDEBUG -Idebian/include/external/libunwind -Iexternal/libunwind/include -Iexternal/libunwind/src -Iexternal/libunwind/include/tdep-x86_64 
clang -c -o external/libunwind/src/mi/flush_cache.o external/libunwind/src/mi/flush_cache.c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -fcommon -Werror -Wno-absolute-value -Wno-header-guard -Wno-inline-asm -Wno-unused-parameter  -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_GNU_SOURCE -DHAVE_CONFIG_H -DNDEBUG -Idebian/include/external/libunwind -Iexternal/libunwind/include -Iexternal/libunwind/src -Iexternal/libunwind/include/tdep-x86_64 
clang -c -o external/libunwind/src/mi/mempool.o external/libunwind/src/mi/mempool.c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -fcommon -Werror -Wno-absolute-value -Wno-header-guard -Wno-inline-asm -Wno-unused-parameter  -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_GNU_SOURCE -DHAVE_CONFIG_H -DNDEBUG -Idebian/include/external/libunwind -Iexternal/libunwind/include -Iexternal/libunwind/src -Iexternal/libunwind/include/tdep-x86_64 
clang -c -o external/libunwind/src/mi/strerror.o external/libunwind/src/mi/strerror.c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -fcommon -Werror -Wno-absolute-value -Wno-header-guard -Wno-inline-asm -Wno-unused-parameter  -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_GNU_SOURCE -DHAVE_CONFIG_H -DNDEBUG -Idebian/include/external/libunwind -Iexternal/libunwind/include -Iexternal/libunwind/src -Iexternal/libunwind/include/tdep-x86_64 
clang -c -o external/libunwind/src/mi/backtrace.o external/libunwind/src/mi/backtrace.c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -fcommon -Werror -Wno-absolute-value -Wno-header-guard -Wno-inline-asm -Wno-unused-parameter  -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_GNU_SOURCE -DHAVE_CONFIG_H -DNDEBUG -Idebian/include/external/libunwind -Iexternal/libunwind/include -Iexternal/libunwind/src -Iexternal/libunwind/include/tdep-x86_64 
clang -c -o external/libunwind/src/mi/dyn-cancel.o external/libunwind/src/mi/dyn-cancel.c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -fcommon -Werror -Wno-absolute-value -Wno-header-guard -Wno-inline-asm -Wno-unused-parameter  -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_GNU_SOURCE -DHAVE_CONFIG_H -DNDEBUG -Idebian/include/external/libunwind -Iexternal/libunwind/include -Iexternal/libunwind/src -Iexternal/libunwind/include/tdep-x86_64 
clang -c -o external/libunwind/src/mi/dyn-info-list.o external/libunwind/src/mi/dyn-info-list.c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -fcommon -Werror -Wno-absolute-value -Wno-header-guard -Wno-inline-asm -Wno-unused-parameter  -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_GNU_SOURCE -DHAVE_CONFIG_H -DNDEBUG -Idebian/include/external/libunwind -Iexternal/libunwind/include -Iexternal/libunwind/src -Iexternal/libunwind/include/tdep-x86_64 
clang -c -o external/libunwind/src/mi/dyn-register.o external/libunwind/src/mi/dyn-register.c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -fcommon -Werror -Wno-absolute-value -Wno-header-guard -Wno-inline-asm -Wno-unused-parameter  -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -UDEBUG -D_GNU_SOURCE -DHAVE_CONFIG_H -DNDEBUG -Idebian/include/external/libunwind -Iexternal/libunwind/include -Iexternal/libunwind/src -Iexternal/libunwind/include/tdep-x86_64 
clang: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
clangclang: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
clangclang: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
clang: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]clang: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]

make[2]: *** [debian/external/libunwind/libunwind.mk:175: external/libunwind/src/mi/mempool.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [debian/external/libunwind/libunwind.mk:175: external/libunwind/src/mi/dyn-register.o] Error 1
make[2]: *** [debian/external/libunwind/libunwind.mk:175: external/libunwind/src/mi/flush_cache.o] Error 1
make[2]: *** [debian/external/libunwind/libunwind.mk:175: external/libunwind/src/mi/dyn-cancel.o] Error 1
make[2]: *** [debian/external/libunwind/libunwind.mk:175: external/libunwind/src/mi/dyn-info-list.o] Error 1
make[2]: *** [debian/external/libunwind/libunwind.mk:175: external/libunwind/src/mi/init.o] Error 1
make[2]: *** [debian/external/libunwind/libunwind.mk:175: external/libunwind/src/mi/backtrace.o] Error 1
clang: error: optimization flag '-ffat-lto-objects' is not supported [-Werror,-Wignored-optimization-argument]
make[2]: *** [debian/external/libunwind/libunwind.mk:175: external/libunwind/src/mi/strerror.o] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j8 "INSTALL=install --strip-program=true" --file=debian/external/libunwind/libunwind.mk returned exit code 2
make[1]: *** [debian/rules:130: e/libunwind/libunwind.a] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:31: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2



More information about the Android-tools-devel mailing list