#1075155 libccp4: ftbfs with GCC-14

#1075155#5
Date:
2024-07-03 12:32:50 UTC
From:
To:
[This bug is targeted to the upcoming trixie release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-14/g++-14, but succeeds to build with gcc-13/g++-13. The
severity of this report will be raised before the trixie release.

The full build log can be found at:
http://qa-logs.debian.net/2024/07/01/libccp4_8.0.0-3_unstable_gccexp.log
The last lines of the build log are at the end of this report.

To build with GCC 14, either set CC=gcc-14 CXX=g++-14 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++

Common build failures are new warnings resulting in build failures with
-Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-14/porting_to.html

[...]
Warning: Array reference at (1) out of bounds (2 > 1) in loop beginning at (2)
fortran/modlib.f:1442:25:

 1440 |       DO 120 I = 2,M
      |                                                                        2
 1441 |           H = ALPHA(I)
 1442 |           ALPHA(I) = A(I,I)
      |                         1
Warning: Array reference at (1) out of bounds (2 > 1) in loop beginning at (2)
fortran/modlib.f:1443:14:

 1440 |       DO 120 I = 2,M
      |                                                                        2
......
 1443 |           A(I,I) = H
      |              1
Warning: Array reference at (1) out of bounds (2 > 1) in loop beginning at (2)
ccp4/cmtzlib.c: In function ‘MtzPut’:
ccp4/cmtzlib.c:2746:27: warning: ‘%74s’ directive writing between 74 and 80 bytes into a region of size 76 [-Wformat-overflow=]
 2746 |      sprintf(hdrrec,"SYMM %74s",symline);
      |                           ^~~~  ~~~~~~~
In file included from /usr/include/stdio.h:964,
                 from ccp4/cmtzlib.c:23:
In function ‘sprintf’,
    inlined from ‘MtzPut’ at ccp4/cmtzlib.c:2746:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 80 and 86 bytes into a destination of size 81
   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   31 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
ccp4/cmtzlib.c: In function ‘MtzPut’:
ccp4/cmtzlib.c:2840:52: warning: ‘%1X’ directive writing between 1 and 8 bytes into a region of size 7 [-Wformat-overflow=]
 2840 |            sprintf(hdrrec,"COLGRP %-30s %-30s %-4s %1X %4d","M/ISYM",mtz->xtal[i]->set[j]->col[k]->grpname,mtz->xtal[i]->set[j]->col[k]->grptype,mtz->xtal[i]->set[j]->col[k]->grpposn,mtz->xtal[i]->set[j]->setid);
      |                                                    ^~~
ccp4/cmtzlib.c:2840:27: note: directive argument in the range [0, 2147483647]
 2840 |            sprintf(hdrrec,"COLGRP %-30s %-30s %-4s %1X %4d","M/ISYM",mtz->xtal[i]->set[j]->col[k]->grpname,mtz->xtal[i]->set[j]->col[k]->grptype,mtz->xtal[i]->set[j]->col[k]->grpposn,mtz->xtal[i]->set[j]->setid);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘sprintf’,
    inlined from ‘MtzPut’ at ccp4/cmtzlib.c:2840:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 81 and 95 bytes into a destination of size 81
   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   31 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
ccp4/cmtzlib.c: In function ‘MtzPut’:
ccp4/cmtzlib.c:2842:52: warning: ‘%1X’ directive writing between 1 and 8 bytes into a region of size 7 [-Wformat-overflow=]
 2842 |            sprintf(hdrrec,"COLGRP %-30s %-30s %-4s %1X %4d",mtz->xtal[i]->set[j]->col[k]->label,mtz->xtal[i]->set[j]->col[k]->grpname,mtz->xtal[i]->set[j]->col[k]->grptype,mtz->xtal[i]->set[j]->col[k]->grpposn,mtz->xtal[i]->set[j]->setid);
      |                                                    ^~~
ccp4/cmtzlib.c:2842:27: note: directive argument in the range [0, 2147483647]
 2842 |            sprintf(hdrrec,"COLGRP %-30s %-30s %-4s %1X %4d",mtz->xtal[i]->set[j]->col[k]->label,mtz->xtal[i]->set[j]->col[k]->grpname,mtz->xtal[i]->set[j]->col[k]->grptype,mtz->xtal[i]->set[j]->col[k]->grpposn,mtz->xtal[i]->set[j]->setid);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘sprintf’,
    inlined from ‘MtzPut’ at ccp4/cmtzlib.c:2842:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 81 and 95 bytes into a destination of size 81
   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   31 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [Makefile:515: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1075155#14
Date:
2024-08-27 12:32:14 UTC
From:
To:
control: forwarded -1 ccp4-dev@dl.ac.uk

Hello,

The actual log excerpt reporting build failure is the following:

fortran/cmtzlib_f.c: In function 'lrhist_':
fortran/cmtzlib_f.c:279:43: error: passing argument 2 of 'ccp4_lrhist'
from incompatible pointer type [-Wincompatible-pointer-types]
   279 |  *nlines = ccp4_lrhist(mtzdata[*mindx-1], hstrng, *nlines);
       |                                           ^~~~~~
       |                                           |
       |                                           fpstr {aka char *}
In file included from fortran/cmtzlib_f.c:72:
./ccp4/cmtzlib.h:668:38: note: expected 'char (*)[80]' but argument is
of type 'fpstr' {aka 'char *'}
   668 | int ccp4_lrhist(const MTZ *mtz, char
history[][MTZRECORDLENGTH], int nlines);
       |                                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
fortran/cmtzlib_f.c: In function 'lkyin_':
fortran/cmtzlib_f.c:636:31: error: passing argument 2 of 'MtzParseLabin'
from incompatible pointer type [-Wincompatible-pointer-types]
   636 |   if
(MtzParseLabin(temp_name,label,*nlprgi,user_label_in[*mindx-1]) == -1)
       |                               ^~~~~
       |                               |
       |                               char *
./ccp4/cmtzlib.h:738:48: note: expected 'const char (*)[31]' but
argument is of type 'char *'
   738 | int MtzParseLabin(char *labin_line, const char prog_labels[][31],
       |                                     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~

[more messages stripped for brevity]

I have forwarded the bug to ccp4-dev@dl.ac.uk.

Andrius

#1075155#21
Date:
2024-09-11 06:00:27 UTC
From:
To:
control: forwarded -1 ccp4@dl.ac.uk

Hello,

I re-forwarded the issue to ccp4@ and got reply that the upstream has
recorded the bug in their internal issue tracker.

Andrius

#1075155#28
Date:
2024-09-24 10:31:48 UTC
From:
To:
control: severity -1 important

Hello,

I have added -Wno-incompatible-pointer-types to CFLAGS for now, avoiding
FTBFS in order to let all reverse dependencies migrate before the
freeze. The upstream is informed about the issue,
-Wno-incompatible-pointer-types should be removed as soon as proper fix 
appears.

Andrius