Subject: wsjtx: ftbfs with LTO (link time optimization) enabled

From: Matthias Klose <[email-masked]>
Date: Tue, 19 Jul 2022 17:02:23 +0000

Package: src:wsjtx
Version: 2.5.4+repack-1
Severity: minor
Tags: sid bookworm
User: [email-masked]
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/wsjtx_2.5.4+repack-1_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
[ 69%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/msk40decodeframe.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/msk40decodeframe.f90 -o CMakeFiles/wsjt_fort.dir/lib/msk40decodeframe.f90.o
[ 69%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/msk144decodeframe.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/msk144decodeframe.f90 -o CMakeFiles/wsjt_fort.dir/lib/msk144decodeframe.f90.o
[ 69%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/msk40spd.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/msk40spd.f90 -o CMakeFiles/wsjt_fort.dir/lib/msk40spd.f90.o
[ 69%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/msk144spd.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/msk144spd.f90 -o CMakeFiles/wsjt_fort.dir/lib/msk144spd.f90.o
[ 70%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/mskrtd.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/mskrtd.f90 -o CMakeFiles/wsjt_fort.dir/lib/mskrtd.f90.o
[ 70%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/ft4/ft4sim.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/ft4/ft4sim.f90 -o CMakeFiles/wsjt_fort.dir/lib/ft4/ft4sim.f90.o
[ 70%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/ft4/ft4sim_mult.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/ft4/ft4sim_mult.f90 -o CMakeFiles/wsjt_fort.dir/lib/ft4/ft4sim_mult.f90.o
[ 70%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/77bit/my_hash.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/77bit/my_hash.f90 -o CMakeFiles/wsjt_fort.dir/lib/77bit/my_hash.f90.o
[ 70%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/save_dxbase.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/save_dxbase.f90 -o CMakeFiles/wsjt_fort.dir/lib/save_dxbase.f90.o
[ 70%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/stdmsg.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/stdmsg.f90 -o CMakeFiles/wsjt_fort.dir/lib/stdmsg.f90.o
[ 71%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/update_msk40_hasharray.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/update_msk40_hasharray.f90 -o CMakeFiles/wsjt_fort.dir/lib/update_msk40_hasharray.f90.o
[ 71%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/fst4/fst4sim.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/fst4/fst4sim.f90 -o CMakeFiles/wsjt_fort.dir/lib/fst4/fst4sim.f90.o
[ 71%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/fst4/genfst4.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/fst4/genfst4.f90 -o CMakeFiles/wsjt_fort.dir/lib/fst4/genfst4.f90.o
[ 71%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/fst4/ldpcsim240_101.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/fst4/ldpcsim240_101.f90 -o CMakeFiles/wsjt_fort.dir/lib/fst4/ldpcsim240_101.f90.o
[ 71%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/fst4/ldpcsim240_74.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/fst4/ldpcsim240_74.f90 -o CMakeFiles/wsjt_fort.dir/lib/fst4/ldpcsim240_74.f90.o
/usr/bin/cmake -E cmake_copy_f90_mod fst4_decode.mod CMakeFiles/wsjt_fort.dir/fst4_decode.mod.stamp GNU
/usr/bin/cmake -E cmake_copy_f90_mod ft4_decode.mod CMakeFiles/wsjt_fort.dir/ft4_decode.mod.stamp GNU
/usr/bin/cmake -E cmake_copy_f90_mod gf64math.mod CMakeFiles/wsjt_fort.dir/gf64math.mod.stamp GNU
/usr/bin/cmake -E cmake_copy_f90_mod q65_encoding.mod CMakeFiles/wsjt_fort.dir/q65_encoding.mod.stamp GNU
/usr/bin/cmake -E cmake_copy_f90_mod q65_generator.mod CMakeFiles/wsjt_fort.dir/q65_generator.mod.stamp GNU
/usr/bin/cmake -E touch CMakeFiles/wsjt_fort.dir/lib/fst4_decode.f90.o.provides.build
/usr/bin/cmake -E touch CMakeFiles/wsjt_fort.dir/lib/ft4_decode.f90.o.provides.build
/usr/bin/cmake -E touch CMakeFiles/wsjt_fort.dir/lib/qra/q65/q65_encoding_modules.f90.o.provides.build
/usr/bin/cmake -E cmake_copy_f90_mod q65.mod CMakeFiles/wsjt_fort.dir/q65.mod.stamp GNU
/usr/bin/cmake -E touch CMakeFiles/wsjt_fort.dir/lib/qra/q65/q65.f90.o.provides.build
[ 71%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/qra/q65/q65_loops.f90.o
[ 71%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/q65_decode.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/q65_decode.f90 -o CMakeFiles/wsjt_fort.dir/lib/q65_decode.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/qra/q65/q65_loops.f90 -o CMakeFiles/wsjt_fort.dir/lib/qra/q65/q65_loops.f90.o
/usr/bin/cmake -E cmake_copy_f90_mod q65_decode.mod CMakeFiles/wsjt_fort.dir/q65_decode.mod.stamp GNU
/usr/bin/cmake -E touch CMakeFiles/wsjt_fort.dir/lib/q65_decode.f90.o.provides.build
[ 71%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/map65_mmdec.f90.o
[ 71%] Building Fortran object CMakeFiles/wsjt_fort.dir/lib/decoder.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -Wno-unused-dummy-argument -c /<<PKGBUILDDIR>>/lib/decoder.f90 -o CMakeFiles/wsjt_fort.dir/lib/decoder.f90.o
/usr/bin/gfortran -DBIGSYM=1 -DBOOST_ALL_DYN_LINK -DCMAKE_BUILD -DQT5 -DUNIX -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fvisibility=hidden -c /<<PKGBUILDDIR>>/lib/map65_mmdec.f90 -o CMakeFiles/wsjt_fort.dir/lib/map65_mmdec.f90.o
[ 71%] Linking Fortran static library libwsjt_fort.a
/usr/bin/cmake -P CMakeFiles/wsjt_fort.dir/cmake_clean_target.cmake
/usr/bin/cmake -E cmake_link_script CMakeFiles/wsjt_fort.dir/link.txt --verbose=1
/usr/bin/ranlib libwsjt_fort.a
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[ 71%] Built target wsjt_fort
[ 71%] Linking CXX static library libwsjt_cxx.a
/usr/bin/cmake -P CMakeFiles/wsjt_cxx.dir/cmake_clean_target.cmake
/usr/bin/cmake -E cmake_link_script CMakeFiles/wsjt_cxx.dir/link.txt --verbose=1
/usr/bin/ranlib libwsjt_cxx.a
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[ 71%] Built target wsjt_cxx
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[1]: *** [Makefile:159: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j8 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2
make: *** [debian/rules:14: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2