#1098174 xtv: ftbfs with GCC-15

Package:
src:xtv
Source:
src:xtv
Submitter:
Matthias Klose
Date:
2025-09-04 22:11:47 UTC
Severity:
normal
Tags:
#1098174#5
Date:
2025-02-17 18:02:49 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/xtv_1.1-15_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

[...]
      |    ^~~~~~~
Grab.c:58:4: note: (near initialization for ‘xmtdsGrabClassRec.core_class.destroy’)
Grab.c:21:33: note: ‘Destroy’ declared here
   21 | static void                     Destroy();
      |                                 ^~~~~~~
Grab.c:60:4: error: initialization of ‘void (*)(struct _WidgetRec *, XEvent *, struct _XRegion *)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
   60 |    Redisplay,                           /* expose               */
      |    ^~~~~~~~~
Grab.c:60:4: note: (near initialization for ‘xmtdsGrabClassRec.core_class.expose’)
Grab.c:20:33: note: ‘Redisplay’ declared here
   20 | static void                     Redisplay();
      |                                 ^~~~~~~~~
Grab.c: In function ‘Initialize’:
Grab.c:81:25: warning: old-style function definition [-Wold-style-definition]
   81 | static void             Initialize(request,new,args,num_args)
      |                         ^~~~~~~~~~
Grab.c: In function ‘SetValues’:
Grab.c:111:25: warning: old-style function definition [-Wold-style-definition]
  111 | static void             SetValues(old,request,new,args,num_args)
      |                         ^~~~~~~~~
Grab.c: In function ‘Redisplay’:
Grab.c:121:25: warning: old-style function definition [-Wold-style-definition]
  121 | static void             Redisplay(w,event,region)
      |                         ^~~~~~~~~
Grab.c:126:4: error: too many arguments to function ‘copy’; expected 0, have 5
  126 |    copy(w,event->x,event->y,event->width,event->height);
      |    ^~~~ ~
Grab.c:25:33: note: declared here
   25 | static void                     copy();
      |                                 ^~~~
Grab.c: In function ‘Destroy’:
Grab.c:129:25: warning: old-style function definition [-Wold-style-definition]
  129 | static void             Destroy(w)
      |                         ^~~~~~~
Grab.c: In function ‘timer’:
Grab.c:136:33: warning: old-style function definition [-Wold-style-definition]
  136 | static void                     timer(w,id)
      |                                 ^~~~~
Grab.c:150:4: error: too many arguments to function ‘copy’; expected 0, have 5
  150 |    copy(w,ABS(CORE.x),ABS(CORE.y),width,height);
      |    ^~~~ ~
Grab.c:25:33: note: declared here
   25 | static void                     copy();
      |                                 ^~~~
Grab.c:154:23: error: passing argument 3 of ‘XtAppAddTimeOut’ from incompatible pointer type [-Wincompatible-pointer-types]
  154 |                       timer,
      |                       ^~~~~
      |                       |
      |                       void (*)(void)
/usr/include/X11/Intrinsic.h:990:5: note: expected ‘XtTimerCallbackProc’ {aka ‘void (*)(void *, long unsigned int *)’} but argument is of type ‘void (*)(void)’
  990 |     XtTimerCallbackProc /* proc */,
      |     ^~~~~~~~~~~~~~~~~~~
Grab.c:136:33: note: ‘timer’ declared here
  136 | static void                     timer(w,id)
      |                                 ^~~~~
/usr/include/X11/Intrinsic.h:309:16: note: ‘XtTimerCallbackProc’ declared here
  309 | typedef void (*XtTimerCallbackProc)(
      |                ^~~~~~~~~~~~~~~~~~~
Grab.c: In function ‘copy’:
Grab.c:158:25: warning: old-style function definition [-Wold-style-definition]
  158 | static void             copy(w,x,y,width,height)
      |                         ^~~~
make[2]: *** [<builtin>: Grab.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/build/reproducible-path/xtv-1.1'
dh_auto_build: error: make -j8 "INSTALL=install --strip-program=true" EXTRA_LIBRARIES=-Wl,-z,relro xtv returned exit code 2
make[1]: *** [debian/rules:11: override_dh_auto_build] Error 25
make[1]: Leaving directory '/build/reproducible-path/xtv-1.1'
make: *** [debian/rules:4: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2