#1098192 ytree: ftbfs with GCC-15

Package:
src:ytree
Source:
src:ytree
Submitter:
Matthias Klose
Date:
2026-05-23 16:55:02 UTC
Severity:
normal
Tags:
#1098192#5
Date:
2025-02-17 18:03:22 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/ytree_1.99pl1-2.2_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

[...]
      |                                          int (*)(FileEntry *, WalkingPackage *) {aka int (*)(struct _file_entry *, WalkingPackage *)}
filewin.c:56:67: note: expected ‘int (*)(void)’ but argument is of type ‘int (*)(FileEntry *, WalkingPackage *)’ {aka ‘int (*)(struct _file_entry *, WalkingPackage *)’}
   56 | static void WalkTaggedFiles(int start_file, int cursor_pos, int (*fkt) (/* ??? */), WalkingPackage *walking_package);
      |                                                             ~~~~~~^~~~~~~~~~~~~~~~
ytree.h:1018:13: note: ‘RenameTaggedFiles’ declared here
 1018 | extern int  RenameTaggedFiles(FileEntry *fe_ptr, WalkingPackage *walking_package);
      |             ^~~~~~~~~~~~~~~~~
filewin.c:2598:42: error: passing argument 3 of ‘WalkTaggedFiles’ from incompatible pointer type [-Wincompatible-pointer-types]
 2598 |                                          PipeTaggedFiles,
      |                                          ^~~~~~~~~~~~~~~
      |                                          |
      |                                          int (*)(FileEntry *, WalkingPackage *) {aka int (*)(struct _file_entry *, WalkingPackage *)}
filewin.c:56:67: note: expected ‘int (*)(void)’ but argument is of type ‘int (*)(FileEntry *, WalkingPackage *)’ {aka ‘int (*)(struct _file_entry *, WalkingPackage *)’}
   56 | static void WalkTaggedFiles(int start_file, int cursor_pos, int (*fkt) (/* ??? */), WalkingPackage *walking_package);
      |                                                             ~~~~~~^~~~~~~~~~~~~~~~
ytree.h:979:13: note: ‘PipeTaggedFiles’ declared here
  979 | extern int  PipeTaggedFiles(FileEntry *fe_ptr, WalkingPackage *walking_package);
      |             ^~~~~~~~~~~~~~~
filewin.c:2655:53: error: passing argument 1 of ‘SilentTagWalkTaggedFiles’ from incompatible pointer type [-Wincompatible-pointer-types]
 2655 |                           SilentTagWalkTaggedFiles( ExecuteCommand,
      |                                                     ^~~~~~~~~~~~~~
      |                                                     |
      |                                                     int (*)(FileEntry *, WalkingPackage *) {aka int (*)(struct _file_entry *, WalkingPackage *)}
filewin.c:64:45: note: expected ‘int (*)(void)’ but argument is of type ‘int (*)(FileEntry *, WalkingPackage *)’ {aka ‘int (*)(struct _file_entry *, WalkingPackage *)’}
   64 | static void SilentTagWalkTaggedFiles( int (*fkt) (/* ??? */),
      |                                       ~~~~~~^~~~~~~~~~~~~~~~
ytree.h:1011:13: note: ‘ExecuteCommand’ declared here
 1011 | extern int  ExecuteCommand(FileEntry *fe_ptr, WalkingPackage *walking_package);
      |             ^~~~~~~~~~~~~~
filewin.c:2700:50: error: passing argument 1 of ‘SilentWalkTaggedFiles’ from incompatible pointer type [-Wincompatible-pointer-types]
 2700 |                           SilentWalkTaggedFiles( ExecuteCommand,
      |                                                  ^~~~~~~~~~~~~~
      |                                                  |
      |                                                  int (*)(FileEntry *, WalkingPackage *) {aka int (*)(struct _file_entry *, WalkingPackage *)}
filewin.c:61:42: note: expected ‘int (*)(void)’ but argument is of type ‘int (*)(FileEntry *, WalkingPackage *)’ {aka ‘int (*)(struct _file_entry *, WalkingPackage *)’}
   61 | static void SilentWalkTaggedFiles( int (*fkt) (/* ??? */),
      |                                    ~~~~~~^~~~~~~~~~~~~~~~
ytree.h:1011:13: note: ‘ExecuteCommand’ declared here
 1011 | extern int  ExecuteCommand(FileEntry *fe_ptr, WalkingPackage *walking_package);
      |             ^~~~~~~~~~~~~~
filewin.c: In function ‘WalkTaggedFiles’:
filewin.c:2831:16: error: too many arguments to function ‘fkt’; expected 0, have 2
 2831 |       result = fkt( fe_ptr, walking_package );
      |                ^~~  ~~~~~~
filewin.c: In function ‘SilentWalkTaggedFiles’:
filewin.c:2869:16: error: too many arguments to function ‘fkt’; expected 0, have 2
 2869 |       result = fkt( fe_ptr, walking_package );
      |                ^~~  ~~~~~~
filewin.c:2860:13: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
 2860 |   int       result = 0;
      |             ^~~~~~
filewin.c: In function ‘SilentTagWalkTaggedFiles’:
filewin.c:2905:16: error: too many arguments to function ‘fkt’; expected 0, have 2
 2905 |       result = fkt( fe_ptr, walking_package );
      |                ^~~  ~~~~~~
filewin.c: In function ‘ListJump’:
filewin.c:3055:41: warning: unused variable ‘iq’ [-Wunused-variable]
 3055 |     int i=0, j=0, n=0, start_x=0, ic=0, iq=0, tmp2=0;
      |                                         ^~
cc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/ytree-1.99pl1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -D_GNU_SOURCE -DWITH_UTF8 -O2 -g -Wall  -DCOLOR_SUPPORT  -DREADLINE_SUPPORT -Wdate-time -D_FORTIFY_SOURCE=2  -c -o hex.o hex.c
make[1]: *** [<builtin>: filewin.o] Error 1
make[1]: *** Waiting for unfinished jobs....
freesp.c: In function ‘GetDiskParameter’:
freesp.c:220:16: warning: ‘__builtin_strncpy’ output may be truncated copying between 3 and 9 bytes from a string of length 9 [-Wstringop-truncation]
  220 |         (void) strncpy( volume_name,
      |                ^
make[1]: Leaving directory '/build/reproducible-path/ytree-1.99pl1'
dh_auto_build: error: make -j8 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:7: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1098192#14
Date:
2026-05-19 11:16:16 UTC
From:
To:
There is an actively maintained modern upstream for ytree:
   https://github.com/robkam/ytree
(current release series: v3.0.0-alpha, actively developed toward beta)

Given that src:ytree currently tracks the legacy 1.99pl1 line, please
consider
updating to the maintained upstream line when feasible.

This upstream refresh may address:
- bug #1098192 (ftbfs with GCC-15)
- bug #1053397 (new upstream version available)
- bug #974478 (autopkgtest must be marked superficial)

I understand this is a substantial packaging update and may require
compatibility
review plus debian/ packaging refresh work.

I am willing to do the packaging and testing work needed to help get the
current
ytree upstream series (v3.0.0-alpha or later) into Debian, with
maintainer review.

#1098192#19
Date:
2026-05-23 16:52:37 UTC
From:
To:
In C23 (GCC 15 default), empty parameter lists `()` on function-pointer
declarations and function declarations now mean "no parameters" instead
of "unspecified parameters".  ytree had two files with this pattern:

  * filewin.c: three walk-callback function pointers — WalkTaggedFiles,
    SilentWalkTaggedFiles, and SilentTagWalkTaggedFiles — each took a
    parameter of type `int (*fkt)()`.  All three are called as
    `fkt(fe_ptr, walking_package)` with a `FileEntry *` and a
    `WalkingPackage *`; the actual callbacks (ExecFileEntry, DeleteFiles,
    etc.) confirm this signature.  Changed to
    `int (*fkt)(FileEntry *, WalkingPackage *)` in all six locations
    (three forward declarations + three definitions).
  * filewin.c: the local `compare` variable used as qsort comparator was
    declared `int (*compare)()`, then assigned SortByName/SortByModTime/
    etc. which have signature `int f(FileEntryList *, FileEntryList *)`.
    Changed declaration to `int (*compare)(FileEntryList *, FileEntryList *)`
    and added the required `(int (*)(const void *, const void *))` cast
    at the qsort call site.
  * tilde.c: `extern char *strcpy()` was declared under `#ifndef strcpy`
    guard, conflicting with `<string.h>`'s `char *strcpy(char *, const char *)`.
    The file already had `#include <string.h>` commented out on the very
    next line; uncomment it and remove the stale local declaration.

Thanks
Azeez Syed