#1096817 httpdirfs-fuse: ftbfs with GCC-15

#1096817#5
Date:
2025-02-17 17:19:21 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/httpdirfs-fuse_1.2.5-1_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

[...]
                 from src/cache.h:15,
                 from src/link.h:12,
                 from src/link.c:1:
/usr/include/x86_64-linux-gnu/curl/curl.h:2897:3: note: declared here
 2897 |   CURLINFO_CONTENT_LENGTH_DOWNLOAD
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/link.c: In function ‘LinkTable_disk_open’:
src/link.c:701:5: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  701 |     fread(&linktbl->num, sizeof(int), 1, fp);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/link.c:705:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  705 |         fread(linktbl->links[i]->linkname, sizeof(char),
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  706 |               MAX_FILENAME_LEN, fp);
      |               ~~~~~~~~~~~~~~~~~~~~~
src/link.c:707:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  707 |         fread(linktbl->links[i]->f_url, sizeof(char), MAX_PATH_LEN, fp);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/link.c:708:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  708 |         fread(&linktbl->links[i]->type, sizeof(LinkType), 1, fp);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/link.c:709:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  709 |         fread(&linktbl->links[i]->content_length, sizeof(size_t), 1, fp);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/link.c:710:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  710 |         fread(&linktbl->links[i]->time, sizeof(long), 1, fp);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cache.c: In function ‘CacheSystem_calc_dir’:
src/cache.c:70:9: warning: use of NULL ‘fp’ where non-null expected [CWE-476] [-Wanalyzer-null-argument]
   70 |     if (ferror(fp)) {
      |         ^~~~~~~~~~
  ‘CacheSystem_calc_dir’: events 1-3
   61 |     FILE *fp = fopen(fn, "w");
      |                ^~~~~~~~~~~~~~
      |                |
      |                (1) allocated here
   62 |     if (fp) {
      |        ~
      |        |
      |        (2) assuming ‘fp’ is NULL
      |        (3) following ‘false’ branch (when ‘fp’ is NULL)... ─>─┐
      |                                                               │
  ‘CacheSystem_calc_dir’: event 4
      |                                                               │
      |┌──────────────────────────────────────────────────────────────┘
   68 |│        lprintf(fatal, "fopen(%s): %s", fn, strerror(errno));
      |│                                                     ^~~~~
      |│                                                     |
      |└────────────────────────────────────────────────────>(4) ...to here
src/log.h:42:52: note: in definition of macro ‘lprintf’
   42 |     log_printf(type, __FILE__, __func__, __LINE__, __VA_ARGS__);
      |                                                    ^~~~~~~~~~~
  ‘CacheSystem_calc_dir’: event 5
src/cache.c:70:9:
   70 |     if (ferror(fp)) {
      |         ^~~~~~~~~~
      |         |
      |         (5) ⚠️  argument 1 (‘fp’) NULL where non-null expected
In file included from /usr/include/x86_64-linux-gnu/curl/curl.h:65,
                 from src/network.h:13,
                 from src/link.h:14,
                 from src/cache.h:14,
                 from src/cache.c:1:
/usr/include/stdio.h:854:12: note: argument 1 of ‘ferror’ must be non-null
  854 | extern int ferror (FILE *__stream) __THROW __wur __nonnull ((1));
      |            ^~~~~~
make[1]: Leaving directory '/build/reproducible-path/httpdirfs-fuse-1.2.5'
dh_auto_build: error: make -j8 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2