[Debian-med-packaging] Bug#1015526: libtabixpp: ftbfs with LTO (link time optimization) enabled

Matthias Klose doko at debian.org
Tue Jul 19 17:56:07 BST 2022


Package: src:libtabixpp
Version: 1.1.0-6
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/libtabixpp_1.1.0-6_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
   dh_auto_build
	make -j8 "INSTALL=install --strip-program=true"
make[1]: Entering directory '/<<PKGBUILDDIR>>'
g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -c tabix.cpp -Ihtslib
tabix.cpp: In constructor ‘Tabix::Tabix(std::string&)’:
tabix.cpp:15:22: warning: ‘int bgzf_is_bgzf(const char*)’ is deprecated: Use bgzf_compression() or hts_detect_format() instead [-Wdeprecated-declarations]
   15 |     if ( bgzf_is_bgzf(cfilename)!=1 )
      |          ~~~~~~~~~~~~^~~~~~~~~~~
In file included from tabix.hpp:4,
                 from tabix.cpp:1:
/usr/include/htslib/bgzf.h:263:9: note: declared here
  263 |     int bgzf_is_bgzf(const char *fn) HTS_DEPRECATED("Use bgzf_compression() or hts_detect_format() instead");
      |         ^~~~~~~~~~~~
g++ -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -o tabix++ main.cpp tabix.o -Ihtslib -L. -Lhtslib -lhts -lpthread -lm -lbz2 -llzma -lz
g++ -shared -o libtabixpp.so.0 tabix.o -fPIC -Wl,-soname,libtabixpp.so.0 -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -lhts
ar rcs libtabixpp.a tabix.o
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_auto_test
   create-stamp debian/debhelper-build-stamp
   dh_prep
   debian/rules override_dh_auto_install
make[1]: Entering directory '/<<PKGBUILDDIR>>'
ln -s libtabixpp.so.* libtabixpp.so
d-shlibmove --commit \
                    --multiarch \
                    --devunversioned \
                    --movedev "*.hpp" usr/include/ \
                    libtabixpp.so
Library package automatic movement utility
 --> libhts-dev package exists.
set -e
install -d -m 755 debian/libtabixpp-dev/usr/lib/x86_64-linux-gnu
install -d -m 755 debian/libtabixpp0/usr/lib/x86_64-linux-gnu
mv ./libtabixpp.a debian/libtabixpp-dev/usr/lib/x86_64-linux-gnu
mv ./libtabixpp.la debian/libtabixpp-dev/usr/lib/x86_64-linux-gnu || true
mv ./libtabixpp.so debian/libtabixpp-dev/usr/lib/x86_64-linux-gnu
mv /<<PKGBUILDDIR>>/libtabixpp.so.0 debian/libtabixpp0/usr/lib/x86_64-linux-gnu
PKGDEV=libtabixpp-dev
PKGSHL=libtabixpp0
install -d -m 755 debian/libtabixpp-dev/usr/include/
mv *.hpp debian/libtabixpp-dev/usr/include/
mv: cannot stat './libtabixpp.la': No such file or directory
find debian -name "lib*.la" -delete
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_installdocs
   dh_installchangelogs
   dh_perl
   dh_link
   dh_strip_nondeterminism
   dh_compress
   dh_fixperms
   dh_missing
   dh_dwz -a
   dh_strip -a
   dh_makeshlibs -a
dpkg-gensymbols: error: some symbols or patterns disappeared in the symbols file: see diff output below
dpkg-gensymbols: warning: debian/libtabixpp0/DEBIAN/symbols doesn't match completely debian/libtabixpp0.symbols
--- debian/libtabixpp0.symbols (libtabixpp0_1.1.0-6_amd64)
+++ dpkg-gensymbolsoFzRrC	2022-06-10 09:08:42.773855070 +0000
@@ -11,5 +11,5 @@
  _ZN5TabixC2Ev at Base 1.0.0
  _ZN5TabixD1Ev at Base 1.0.0
  _ZN5TabixD2Ev at Base 1.0.0
- _ZNKSt5ctypeIcE8do_widenEc at Base 1.1.0
- (optional)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_ at Base 1.0.0
+#MISSING: 1.1.0-6# _ZNKSt5ctypeIcE8do_widenEc at Base 1.1.0
+#MISSING: 1.1.0-6# (optional)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_ at Base 1.0.0
dh_makeshlibs: error: failing due to earlier errors
make: *** [debian/rules:8: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2



More information about the Debian-med-packaging mailing list