[Debian-med-packaging] Bug#1015655: samtools-legacy: ftbfs with LTO (link time optimization) enabled
Matthias Klose
doko at debian.org
Tue Jul 19 18:00:40 BST 2022
Package: src:samtools-legacy
Version: 0.1.19+dfsg-5
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/samtools-legacy_0.1.19+dfsg-5_unstable_dpkglto.log
The last lines of the build log are at the end of this report.
[...]
gcc -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. kmin.c -o kmin.o
gcc -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. index.c -o index.o
gcc -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. fet.c -o fet.o
gcc -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. index.c -o index.o
gcc -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. fet.c -o fet.o
gcc -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. mut.c -o mut.o
gcc -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. bcf2qcall.c -o bcf2qcall.o
gcc -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. mut.c -o mut.o
gcc -c -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. bcf2qcall.c -o bcf2qcall.o
ar -csru libbcf.a bcf.o vcf.o bcfutils.o prob1.o em.o kfunc.o kmin.o index.o fet.o mut.o bcf2qcall.o
ar: `u' modifier ignored since `D' is the default (see `U')
make[4]: Leaving directory '/<<PKGBUILDDIR>>/bcftools'
make[4]: Entering directory '/<<PKGBUILDDIR>>/misc'
make[4]: Nothing to be done for 'lib'.
make[4]: Leaving directory '/<<PKGBUILDDIR>>/misc'
gcc -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -o samtools bam_tview.o bam_plcmd.o sam_view.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o cut_target.o phase.o bam2depth.o padding.o bedcov.o bamshuf.o bam_tview_curses.o bam_tview_html.o -flto=auto -ffat-lto-objects -Wl,-z,relro libbam.a -Lbcftools -lbcf -lcurses -lm -lz -lpthread
ar -csru libbcf.a bcf.o vcf.o bcfutils.o prob1.o em.o kfunc.o kmin.o index.o fet.o mut.o bcf2qcall.o
ar: `u' modifier ignored since `D' is the default (see `U')
during IPA pass: icf
lto1: internal compiler error: Bus error
make[3]: Leaving directory '/<<PKGBUILDDIR>>/bcftools'
make[3]: Entering directory '/<<PKGBUILDDIR>>/misc'
make[3]: Nothing to be done for 'lib'.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/misc'
gcc -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -o samtools bam_tview.o bam_plcmd.o sam_view.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o cut_target.o phase.o bam2depth.o padding.o bedcov.o bamshuf.o bam_tview_curses.o bam_tview_html.o -flto=auto -ffat-lto-objects -Wl,-z,relro libbam.a -Lbcftools -lbcf -lcurses -lm -lz -lpthread
0xcfbb27 internal_error(char const*, ...)
???:0
0x1260fd2 lto_uncompress_block(lto_compression_stream*, char const*, unsigned long)
???:0
0x1260c34 lto_get_section_data(lto_file_decl_data*, lto_section_type, char const*, int, unsigned long*, bool)
???:0
0xe3a55d cgraph_node::get_untransformed_body()
???:0
0xf35263 ipa_icf::sem_function::init(ipa_icf_gimple::func_checker*)
???:0
0xe889e9 ipa_icf::sem_item_optimizer::parse_nonsingleton_classes()
???:0
0x128b99a ipa_icf::sem_item_optimizer::execute()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:47: samtools] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: *** [Makefile:27: all-recur] Error 1
make[2]: *** Waiting for unfinished jobs....
bam_md.c: In function ‘bam_prob_realn_core’:
bam_md.c:214:35: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
214 | *(bq - 3) = 'Z';
| ^
bam_md.c:198:19: note: at offset -2 into destination object of size [0, 9223372036854775807] allocated by ‘bam_aux_get’
198 | if ((bq = bam_aux_get(b, "BQ")) != 0) ++bq;
| ^
/usr/bin/ld: /tmp/ccivpy74.ltrans1.ltrans.o: in function `main_pad2unpad':
./padding.c:298: undefined reference to `update_posmap'
/usr/bin/ld: /tmp/ccivpy74.ltrans1.ltrans.o:./padding.c:305: undefined reference to `update_posmap'
/usr/bin/ld: /tmp/ccivpy74.ltrans1.ltrans.o:./padding.c:197: undefined reference to `update_posmap'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:47: samtools] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j8 "INSTALL=install --strip-program=true" all all-recur razip lib "CFLAGS=-g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -flto=auto -ffat-lto-objects -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2" returned exit code 2
make[1]: *** [debian/rules:9: override_dh_auto_build] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:6: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
More information about the Debian-med-packaging
mailing list