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

Bug#1015693: tlf: ftbfs with LTO (link time optimization) enabled



Package: src:tlf
Version: 1.4.1-4
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/tlf_1.4.1-4_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_locator2longlat.o test_locator2longlat.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o run_logutils.o run_logutils.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_logutils.o test_logutils.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o run_prefix.o run_prefix.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_prefix.o test_prefix.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o run_readcalls.o run_readcalls.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_readcalls.o test_readcalls.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o run_recallexchange.o run_recallexchange.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_recallexchange.o test_recallexchange.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o run_score.o run_score.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_score.o test_score.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o run_searchlog.o run_searchlog.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_searchlog.o test_searchlog.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o run_sendbuf.o run_sendbuf.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_sendbuf.o test_sendbuf.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o run_wwv.o run_wwv.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_wwv.o test_wwv.c
test_wwv.c: In function ‘test_wwv_check’:
test_wwv.c:26:5: warning: implicit declaration of function ‘g_strchomp’; did you mean ‘strcmp’? [-Wimplicit-function-declaration]
   26 |     g_strchomp(lastwwv);
      |     ^~~~~~~~~~
      |     strcmp
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o run_zone_nr.o run_zone_nr.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DTOP_SRCDIR=\"..\" -DSRCDIR=\"/<<PKGBUILDDIR>>/test\" -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o test_zone_nr.o test_zone_nr.c
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_addcall run_addcall.o test_addcall.o data.o functions.o ../src/addcall.o ../src/addmult.o ../src/bands.o ../src/dxcc.o ../src/focm.o ../src/getctydata.o ../src/getpx.o ../src/get_time.o ../src/locator2longlat.o ../src/log_utils.o ../src/qrb.o ../src/score.o ../src/searchcallarray.o ../src/zone_nr.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_addmult run_addmult.o test_addmult.o data.o functions.o ../src/addmult.o ../src/bands.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_addpfx run_addpfx.o test_addpfx.o data.o functions.o ../src/addpfx.o ../src/bands.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_bands run_bands.o test_bands.o data.o functions.o ../src/bands.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_cabrillo run_cabrillo.o test_cabrillo.o data.o functions.o ../src/cabrillo_utils.o ../src/readcabrillo.o ../src/bands.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
../src/addpfx.h:24:5: warning: type of ‘add_pfx’ does not match original declaration [-Wlto-type-mismatch]
   24 | int add_pfx(char *pxstr, unsigned int bandindex);
      |     ^
test_addcall.c:36:5: note: type mismatch in parameter 2
   36 | int add_pfx(char *call) {
      |     ^
test_addcall.c:36:5: note: type ‘void’ should match type ‘unsigned int’
test_addcall.c:36:5: note: ‘add_pfx’ was previously declared here
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_checklogfile run_checklogfile.o test_checklogfile.o data.o functions.o ../src/checklogfile.o ../src/err_utils.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_clusterinfo run_clusterinfo.o test_clusterinfo.o data.o functions.o ../src/clusterinfo.o ../src/get_time.o ../src/err_utils.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_cw_utils run_cw_utils.o test_cw_utils.o data.o functions.o ../src/cw_utils.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_dxcc run_dxcc.o test_dxcc.o data.o functions.o ../src/dxcc.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_getctydata run_getctydata.o test_getctydata.o data.o functions.o ../src/dxcc.o ../src/getctydata.o ../src/getpx.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
gcc -Wall -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -o run_initial_exchange run_initial_exchange.o test_initial_exchange.o data.o functions.o ../src/initial_exchange.o -lm -lglib-2.0 -lpanelw -lncursesw -ltinfo -lcmocka -Wl,-wrap=sleep -Wl,-wrap=key_get -Wl,-wrap=key_poll -Wl,-wrap=wgetch -Wl,-wrap=refreshp
/usr/bin/ld: /tmp/cc71dyVT.ltrans0.ltrans.o: in function `init_and_load_multipliers':
./test/../src/addmult.c:347: undefined reference to `__wrap_refreshp'
/usr/bin/ld: /tmp/ccSkxsF0.ltrans0.ltrans.o: in function `handle_logging.constprop.0':
./test/../src/err_utils.c:40: undefined reference to `__wrap_refreshp'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:767: run_addmult] Error 1
make[3]: *** Waiting for unfinished jobs....
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:783: run_checklogfile] Error 1
/usr/bin/ld: /tmp/ccMXWLJ2.ltrans0.ltrans.o: in function `handle_logging.constprop.0':
./test/../src/err_utils.c:40: undefined reference to `__wrap_refreshp'
/usr/bin/ld: /tmp/ccMXWLJ2.ltrans0.ltrans.o: in function `loadbandmap.isra.0':
./test/../src/clusterinfo.c:388: undefined reference to `__wrap_refreshp'
/usr/bin/ld: /tmp/ccMXWLJ2.ltrans0.ltrans.o: in function `clusterinfo':
./test/../src/clusterinfo.c:158: undefined reference to `__wrap_refreshp'
/usr/bin/ld: ./test/../src/clusterinfo.c:81: undefined reference to `__wrap_refreshp'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:787: run_clusterinfo] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/test'
make[2]: *** [Makefile:1304: check-am] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/test'
make[1]: *** [Makefile:475: check-recursive] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
	rm -fr -- /tmp/dh-xdg-rundir-zNDaKpjX
dh_auto_test: error: make -j8 check "TESTSUITEFLAGS=-j8 --verbose" VERBOSE=1 returned exit code 2
make: *** [debian/rules:24: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2


Reply to: