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

Matthias Klose doko at debian.org
Tue Jul 19 17:54:15 BST 2022


Package: src:lagan
Version: 2.0-8
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/lagan_2.0-8_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~
utils/dotplot.cpp:97:11: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   97 |     fgets (buffer, 105, file);
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~
gcc -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fsigned-char -O3  -Wdate-time -D_FORTIFY_SOURCE=2 -o ../utils/overlay utils/overlay.c -flto=auto -ffat-lto-objects -Wl,-z,relro
utils/overlay.c: In function ‘read_align’:
utils/overlay.c:119:10: warning: implicit declaration of function ‘isspace’ [-Wimplicit-function-declaration]
  119 |     if (!isspace(currchar)) {
      |          ^~~~~~~
utils/overlay.c:5:1: note: include ‘<ctype.h>’ or provide a declaration of ‘isspace’
    4 | #include <string.h>
  +++ |+#include <ctype.h>
    5 | 
utils/overlay.c:120:19: warning: implicit declaration of function ‘toupper’ [-Wimplicit-function-declaration]
  120 |       checkchar = toupper(currchar);
      |                   ^~~~~~~
utils/overlay.c:120:19: note: include ‘<ctype.h>’ or provide a declaration of ‘toupper’
utils/overlay.c:109:3: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  109 |   fgets(temp, 255, input);
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccPpSXbd.ltrans0.ltrans.o: in function `main':
./src/utils/scorecontigs.c:296: undefined reference to `print'
/usr/bin/ld: /tmp/ccPpSXbd.ltrans0.ltrans.o:./src/utils/scorecontigs.c:283: undefined reference to `print'
/usr/bin/ld: /tmp/ccPpSXbd.ltrans0.ltrans.o:./src/utils/scorecontigs.c:283: undefined reference to `print'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:46: ../utils/scorecontigs] Error 1
make[2]: *** Waiting for unfinished jobs....
utils/Glue.cpp: In function ‘void calculateScoreMatrix(int)’:
utils/Glue.cpp:64:17: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   64 |   char *alpha = "ATCG";
      |                 ^~~~~~
utils/Glue.cpp:11:32: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   11 | #define NUCLEOTIDE_MATRIX_FILE "nucmatrix.txt"
      |                                ^~~~~~~~~~~~~~~
utils/Glue.cpp:72:22: note: in expansion of macro ‘NUCLEOTIDE_MATRIX_FILE’
   72 |     readScoreMatrix (NUCLEOTIDE_MATRIX_FILE);
      |                      ^~~~~~~~~~~~~~~~~~~~~~
skiplist.c: In function ‘printSLE’:
skiplist.c:12:19: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘void *’ [-Wformat=]
   12 |   printf("  %d   %x\n", tbp->index, tbp->myelem);
      |                  ~^                 ~~~~~~~~~~~
      |                   |                    |
      |                   unsigned int         void *
      |                  %p
skiplist.c: In function ‘printSLE’:
skiplist.c:12:19: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘void *’ [-Wformat=]
   12 |   printf("  %d   %x\n", tbp->index, tbp->myelem);
      |                  ~^                 ~~~~~~~~~~~
      |                   |                    |
      |                   unsigned int         void *
      |                  %p
utils/Glue.cpp: In function ‘void readScoreMatrix(char*)’:
utils/Glue.cpp:44:9: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   44 |   fgets (line, 1024, file);
      |   ~~~~~~^~~~~~~~~~~~~~~~~~
utils/Glue.cpp:52:12: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   52 |     fscanf (file, "%1s", &(line[0]));
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
utils/Glue.cpp:54:14: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   54 |       fscanf (file, "%d", &k);
      |       ~~~~~~~^~~~~~~~~~~~~~~~
utils/Glue.cpp:59:10: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   59 |   fscanf (file, "%d%d", &gapopen, &gapcont);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: Leaving directory '/<<PKGBUILDDIR>>/src'
dh_auto_build: error: cd src && make -j8 "INSTALL=install --strip-program=true" returned exit code 2
make[1]: *** [debian/rules:10: override_dh_auto_build] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:7: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2



More information about the Debian-med-packaging mailing list