[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1015651: riemann-c-client: ftbfs with LTO (link time optimization) enabled



Package: src:riemann-c-client
Version: 1.10.4-2
Severity: minor
Tags: sid bookworm
User: debian-gcc@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/riemann-c-client_1.10.4-2_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
checking for int64_t... yes
checking for ssize_t... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libprotobuf-c... yes
checking for check... yes
checking for json-c >= 0.11... yes
checking for gnutls >= 2.8... yes
checking whether /usr/bin/ld -m elf_x86_64 supports symbol version scripts... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/riemann/riemann-client.h
config.status: creating lib/riemann/riemann-client.pc
config.status: creating lib/riemann/platform.h
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_auto_build -O--no-parallel
	cd debian/build-tree && make -j1
make[1]: Entering directory '/<<PKGBUILDDIR>>/debian/build-tree'
/bin/bash /<<PKGBUILDDIR>>/install-sh -d ./lib/riemann/proto
protoc-c ../../lib/riemann/proto/riemann.proto -I../../lib/riemann/proto --c_out=./lib/riemann/proto
make --no-print-directory all-am
gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/json-c  -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o src/riemann_client-riemann-client.o `test -f 'src/riemann-client.c' || echo '../../'`src/riemann-client.c
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/libriemann_client_la-client.lo `test -f 'lib/riemann/client.c' || echo '../../'`lib/riemann/client.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/client.c  -fPIC -DPIC -o lib/riemann/.libs/libriemann_client_la-client.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/client.c -o lib/riemann/libriemann_client_la-client.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/client/libriemann_client_la-tcp.lo `test -f 'lib/riemann/client/tcp.c' || echo '../../'`lib/riemann/client/tcp.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/client/tcp.c  -fPIC -DPIC -o lib/riemann/client/.libs/libriemann_client_la-tcp.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/client/tcp.c -o lib/riemann/client/libriemann_client_la-tcp.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/client/libriemann_client_la-tls.lo `test -f 'lib/riemann/client/tls.c' || echo '../../'`lib/riemann/client/tls.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/client/tls.c  -fPIC -DPIC -o lib/riemann/client/.libs/libriemann_client_la-tls.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/client/tls.c -o lib/riemann/client/libriemann_client_la-tls.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/client/libriemann_client_la-udp.lo `test -f 'lib/riemann/client/udp.c' || echo '../../'`lib/riemann/client/udp.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/client/udp.c  -fPIC -DPIC -o lib/riemann/client/.libs/libriemann_client_la-udp.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/client/udp.c -o lib/riemann/client/libriemann_client_la-udp.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/libriemann_client_la-event.lo `test -f 'lib/riemann/event.c' || echo '../../'`lib/riemann/event.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/event.c  -fPIC -DPIC -o lib/riemann/.libs/libriemann_client_la-event.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/event.c -o lib/riemann/libriemann_client_la-event.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/libriemann_client_la-message.lo `test -f 'lib/riemann/message.c' || echo '../../'`lib/riemann/message.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/message.c  -fPIC -DPIC -o lib/riemann/.libs/libriemann_client_la-message.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/message.c -o lib/riemann/libriemann_client_la-message.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/libriemann_client_la-attribute.lo `test -f 'lib/riemann/attribute.c' || echo '../../'`lib/riemann/attribute.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/attribute.c  -fPIC -DPIC -o lib/riemann/.libs/libriemann_client_la-attribute.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/attribute.c -o lib/riemann/libriemann_client_la-attribute.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/libriemann_client_la-query.lo `test -f 'lib/riemann/query.c' || echo '../../'`lib/riemann/query.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/query.c  -fPIC -DPIC -o lib/riemann/.libs/libriemann_client_la-query.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/query.c -o lib/riemann/libriemann_client_la-query.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/libriemann_client_la-simple.lo `test -f 'lib/riemann/simple.c' || echo '../../'`lib/riemann/simple.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/simple.c  -fPIC -DPIC -o lib/riemann/.libs/libriemann_client_la-simple.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c ../../lib/riemann/simple.c -o lib/riemann/libriemann_client_la-simple.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann   -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o lib/riemann/proto/libriemann_client_la-riemann.pb-c.lo `test -f 'lib/riemann/proto/riemann.pb-c.c' || echo '../../'`lib/riemann/proto/riemann.pb-c.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c lib/riemann/proto/riemann.pb-c.c  -fPIC -DPIC -o lib/riemann/proto/.libs/libriemann_client_la-riemann.pb-c.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I./lib/riemann -Wdate-time -D_FORTIFY_SOURCE=2 -I../../lib -I./lib -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c lib/riemann/proto/riemann.pb-c.c -o lib/riemann/proto/libriemann_client_la-riemann.pb-c.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CC   --mode=link gcc -I../../lib -I./lib  -I/usr/include/p11-kit-1 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -lprotobuf-c -lgnutls -version-info 10:4:10 -Wl,--version-script,../../lib/riemann/libriemann.ver -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o lib/libriemann-client.la -rpath /usr/lib/x86_64-linux-gnu lib/riemann/libriemann_client_la-client.lo lib/riemann/client/libriemann_client_la-tcp.lo lib/riemann/client/libriemann_client_la-tls.lo lib/riemann/client/libriemann_client_la-udp.lo lib/riemann/libriemann_client_la-event.lo lib/riemann/libriemann_client_la-message.lo lib/riemann/libriemann_client_la-attribute.lo lib/riemann/libriemann_client_la-query.lo lib/riemann/libriemann_client_la-simple.lo lib/riemann/proto/libriemann_client_la-riemann.pb-c.lo  
libtool: link: gcc -shared  -fPIC -DPIC  lib/riemann/.libs/libriemann_client_la-client.o lib/riemann/client/.libs/libriemann_client_la-tcp.o lib/riemann/client/.libs/libriemann_client_la-tls.o lib/riemann/client/.libs/libriemann_client_la-udp.o lib/riemann/.libs/libriemann_client_la-event.o lib/riemann/.libs/libriemann_client_la-message.o lib/riemann/.libs/libriemann_client_la-attribute.o lib/riemann/.libs/libriemann_client_la-query.o lib/riemann/.libs/libriemann_client_la-simple.o lib/riemann/proto/.libs/libriemann_client_la-riemann.pb-c.o   -lprotobuf-c -lgnutls  -g -O2 -flto=auto -fstack-protector-strong -Wl,--version-script -Wl,../../lib/riemann/libriemann.ver -flto=auto -Wl,-z -Wl,relro -Wl,-z -Wl,now   -Wl,-soname -Wl,libriemann-client.so.0 -o lib/.libs/libriemann-client.so.0.10.4
/tmp/ccyYWTmS.s: Assembler messages:
/tmp/ccyYWTmS.s: Error: invalid attempt to declare external version name as default in symbol `riemann_client_new@@RIEMANN_C_1.10'
make[3]: *** [/tmp/cc9nbBSc.mk:2: /tmp/cchkO7Jq.ltrans0.ltrans.o] Error 1
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:779: lib/libriemann-client.la] Error 1
make[1]: *** [Makefile:577: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>/debian/build-tree'
dh_auto_build: error: cd debian/build-tree && make -j1 returned exit code 2
make: *** [debian/rules:17: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2


Reply to: