#1097377 mcrypt: ftbfs with GCC-15

Package:
src:mcrypt
Source:
src:mcrypt
Submitter:
Matthias Klose
Date:
2025-09-04 22:09:19 UTC
Severity:
normal
Tags:
#1097377#5
Date:
2025-02-17 17:37:05 UTC
From:
To:
[This bug is NOT 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-15/g++-15, but succeeds to build with gcc-14/g++-14. The
severity of this report will be raised before the forky release.

The full build log can be found at:
http://qa-logs.debian.net/2025/02/16/amd64exp/mcrypt_2.6.8-8_unstable_gccexp.log.gz
The last lines of the build log are at the end of this report.

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

  apt-get -t=experimental install g++

GCC 15 now defaults to the C23/C++23 standards, exposing many FTBFS.
Other 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-15/porting_to.html

[...]
 1162 | extern char *crypt (const char *__key, const char *__salt)
      |              ^~~~~
extra.c: In function ‘test_file_headers’:
extra.c:636:16: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
  636 |         if ( !(!x & 0x80) && bare_flag == FALSE) {
      |                ^~
extra.c: In function ‘_mcrypt_start_timer’:
extra.c:690:2: warning: ‘ftime’ is deprecated: Use gettimeofday or clock_gettime instead [-Wdeprecated-declarations]
  690 |  ftime(&start_time);
      |  ^~~~~
In file included from extra.c:40:
/usr/include/x86_64-linux-gnu/sys/timeb.h:29:12: note: declared here
   29 | extern int ftime (struct timeb *__timebuf)
      |            ^~~~~
extra.c: In function ‘_mcrypt_end_timer’:
extra.c:698:2: warning: ‘ftime’ is deprecated: Use gettimeofday or clock_gettime instead [-Wdeprecated-declarations]
  698 |  ftime(&end_time);
      |  ^~~~~
/usr/include/x86_64-linux-gnu/sys/timeb.h:29:12: note: declared here
   29 | extern int ftime (struct timeb *__timebuf)
      |            ^~~~~
make[3]: *** [Makefile:473: keys.o] Error 1
make[3]: *** [Makefile:473: functions.o] Error 1
extra.c: In function ‘read_until_null’:
extra.c:158:17: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  158 |                 fread(&pointer[i], 1, 1, fstream);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extra.c: In function ‘check_file_head’:
extra.c:179:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  179 |         fread(buf, 1, 3, fstream);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
extra.c:180:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  180 |         fread(&flags, 1, 1, fstream);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
extra.c:226:17: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  226 |                 fread(&keylen, sizeof(short int), 1, fstream);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extra.c:240:17: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  240 |                 fread(&sflag, 1, 1, fstream);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
extra.c:247:41: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  247 |                                         fread(tmp_buf, 1, *salt_size,
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  248 |                                               fstream);
      |                                               ~~~~~~~~
extra.c: In function ‘read_iv’:
extra.c:289:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  289 |         fread(IV, 1, ivsize, fstream);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:473: mcrypt.o] Error 1
make[3]: *** [Makefile:473: extra.o] Error 1
In file included from bits.c:22:
./defines.h:168:14: error: conflicting types for ‘crypt’; have ‘char *(void)’
  168 | extern char *crypt(); /* libufc */
      |              ^~~~~
In file included from /usr/include/mutils/mincludes.h:78,
                 from /usr/include/mhash.h:6,
                 from ./defines.h:9:
/usr/include/unistd.h:1162:14: note: previous declaration of ‘crypt’ with type ‘char *(const char *, const char *)’
 1162 | extern char *crypt (const char *__key, const char *__salt)
      |              ^~~~~
make[3]: *** [Makefile:473: bits.o] Error 1
make[3]: Leaving directory '/build/reproducible-path/mcrypt-2.6.8/src'
make[2]: *** [Makefile:439: all-recursive] Error 1
make[2]: Leaving directory '/build/reproducible-path/mcrypt-2.6.8'
make[1]: *** [Makefile:371: all] Error 2
make[1]: Leaving directory '/build/reproducible-path/mcrypt-2.6.8'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2