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/faketime_0.9.10-2_unstable_dpkglto.log
The last lines of the build log are at the end of this report.
[...]
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 faketime
dpkg-buildpackage: info: source version 0.9.10-2
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Daniel Kahn Gillmor <dkg@fifthhorseman.net>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
debian/rules clean
PREFIX=/usr dh clean
dh_auto_clean
make -j8 distclean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
make -C src distclean
make[2]: Entering directory '/<<PKGBUILDDIR>>/src'
make[2]: Leaving directory '/<<PKGBUILDDIR>>/src'
make -C test distclean
make[2]: Entering directory '/<<PKGBUILDDIR>>/test'
make[2]: Leaving directory '/<<PKGBUILDDIR>>/test'
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_clean
debian/rules binary
PREFIX=/usr dh binary
dh_update_autotools_config
dh_autoreconf
dh_auto_configure
dh_auto_build
make -j8 "INSTALL=install --strip-program=true"
make[1]: Entering directory '/<<PKGBUILDDIR>>'
make -C src all
make[2]: Entering directory '/<<PKGBUILDDIR>>/src'
cc -o libfaketime.o -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DMULTI_ARCH -DFAKE_RANDOM -DFAKE_PID -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'/usr'"' -DLIBDIRNAME='"'/lib/faketime'"' -Wdate-time -D_FORTIFY_SOURCE=2 libfaketime.c
cc -o libfaketimeMT.o -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DMULTI_ARCH -DFAKE_RANDOM -DFAKE_PID -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'/usr'"' -DLIBDIRNAME='"'/lib/faketime'"' -Wdate-time -D_FORTIFY_SOURCE=2 -DPTHREAD_SINGLETHREADED_TIME libfaketime.c
cc -o faketime -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DMULTI_ARCH -DFAKE_RANDOM -DFAKE_PID -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'/usr'"' -DLIBDIRNAME='"'/lib/faketime'"' -Wdate-time -D_FORTIFY_SOURCE=2 faketime.c -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -lpthread -Wl,--version-script=libfaketime.map -lrt
cc -o libfaketime.so.1 -Wl,-soname,libfaketime.so.1 -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -lpthread -Wl,--version-script=libfaketime.map -shared libfaketime.o -ldl -lm -lrt
cc -o libfaketimeMT.so.1 -Wl,-soname,libfaketimeMT.so.1 -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -lpthread -Wl,--version-script=libfaketime.map -shared libfaketimeMT.o -ldl -lm -lrt
/tmp/ccGuHY0A.s: Assembler messages:
/tmp/ccGuHY0A.s: Error: invalid attempt to declare external version name as default in symbol `timer_gettime@@GLIBC_2.3.3'
make[3]: *** [/tmp/cc8odWOH.mk:2: /tmp/ccJNJqtP.ltrans0.ltrans.o] Error 1
make[3]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:143: libfaketime.so.1] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/cc7ECyMB.s: Assembler messages:
/tmp/cc7ECyMB.s: Error: invalid attempt to declare external version name as default in symbol `timer_gettime@@GLIBC_2.3.3'
make[3]: *** [/tmp/ccgzEz9M.mk:2: /tmp/ccy0GAjH.ltrans0.ltrans.o] Error 1
make[3]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:143: libfaketimeMT.so.1] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j8 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:33: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2