#1098200 ziproxy: ftbfs with GCC-15

Package:
src:ziproxy
Source:
src:ziproxy
Submitter:
Matthias Klose
Date:
2025-09-04 22:11:52 UTC
Severity:
normal
Tags:
#1098200#5
Date:
2025-02-17 18:03:38 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/ziproxy_3.3.2-7_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

[...]
 1273 |                                 fscanf (from, "%x", &pending_chunk_len);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http.c:1286:33: warning: ignoring return value of ‘feof’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1286 |                                 feof (from);
      |                                 ^~~~~~~~~~~
http.c: In function ‘get_response_headers’:
http.c:1392:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1392 |         fgets(line, 5, sockrfp);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
http.c:1414:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1414 |         fgets(line+n, sizeof(line), sockrfp);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
image.c: In function ‘bitmap2jpg’:
image.c:1258:37: error: assignment to ‘boolean (*)(struct jpeg_compress_struct *)’ {aka ‘int (*)(struct jpeg_compress_struct *)’} from incompatible pointer type ‘boolean (*)(void)’ {aka ‘int (*)(void)’} [-Wincompatible-pointer-types]
 1258 |         memdest.empty_output_buffer = jpeg_dest_empty_output_buffer;
      |                                     ^
image.c:1219:16: note: ‘jpeg_dest_empty_output_buffer’ declared here
 1219 | static boolean jpeg_dest_empty_output_buffer()
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http.c:1414:9: warning: ‘fgets’ writing 16384 bytes into a region of size 16380 overflows the destination [-Wstringop-overflow=]
 1414 |         fgets(line+n, sizeof(line), sockrfp);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http.c:84:13: note: at offset [4, 16383] into destination object ‘line’ of size 16384
   84 | static char line[MAX_LINELEN];
      |             ^~~~
In file included from /usr/include/stdio.h:970,
                 from http.h:53,
                 from http.c:59:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:305:1: note: in a call to function ‘fgets’ declared with attribute ‘access (write_only, 1, 2)’
  305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
      | ^~~~~
make[4]: *** [Makefile:486: image.o] Error 1
In function ‘fgets’,
    inlined from ‘get_response_headers’ at http.c:1414:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:313:12: warning: ‘__fgets_alias’ writing 16384 bytes into a region of size 16380 overflows the destination [-Wstringop-overflow=]
  313 |     return __fgets_alias (__s, __n, __stream);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http.c: In function ‘get_response_headers’:
http.c:84:13: note: at offset [4, 16383] into destination object ‘line’ of size 16384
   84 | static char line[MAX_LINELEN];
      |             ^~~~
In file included from /usr/include/features.h:510,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28:
/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h:96:14: note: in a call to function ‘__fgets_alias’ declared with attribute ‘access (write_only, 1, 2)’
   96 | extern char *__REDIRECT (__fgets_alias,
      |              ^~~~~~~~~~
In function ‘fgets’,
    inlined from ‘get_response_headers’ at http.c:1414:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:318:10: warning: ‘__fgets_chk’ writing 16384 bytes into a region of size 16380 overflows the destination [-Wstringop-overflow=]
  318 |   return __fgets_chk (__s, __sz, __n, __stream);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http.c: In function ‘get_response_headers’:
http.c:84:13: note: at offset [4, 16383] into destination object ‘line’ of size 16384
   84 | static char line[MAX_LINELEN];
      |             ^~~~
In file included from /usr/include/stdio.h:954:
/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h:106:14: note: in a call to function ‘__fgets_chk’ declared with attribute ‘access (write_only, 1, 3)’
  106 | extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
      |              ^~~~~~~~~~~
make[4]: Leaving directory '/build/reproducible-path/ziproxy-3.3.2/src'
make[3]: *** [Makefile:502: all-recursive] Error 1
make[3]: Leaving directory '/build/reproducible-path/ziproxy-3.3.2/src'
make[2]: *** [Makefile:350: all] Error 2
make[2]: Leaving directory '/build/reproducible-path/ziproxy-3.3.2/src'
make[1]: *** [Makefile:345: all-recursive] Error 1
make[1]: Leaving directory '/build/reproducible-path/ziproxy-3.3.2'
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