#1097810 rsyslog: ftbfs with GCC-15

#1097810#5
Date:
2025-02-17 17:51:08 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/rsyslog_8.2412.0-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

[...]
      |                                                                                                 ~~~~~~~~~~~^~~~~~~~
glbl.c:549:1: note: 'setParserEscapeControlCharactersOnReceive' declared here
  549 | setParserEscapeControlCharactersOnReceive(void __attribute__((unused)) *pVal, int pNewVal) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glbl.c:1530:9: error: passing argument 4 of 'regCfSysLineHdlr' from incompatible pointer type [-Wincompatible-pointer-types]
 1530 |         setParserSpaceLFOnReceive, NULL, NULL));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         rsRetVal (*)(void *, int) {aka enum rsRetVal_ (*)(void *, int)}
rsyslog.h:661:41: note: in definition of macro 'CHKiRet'
  661 | #       define CHKiRet(code) if((iRet = code) != RS_RET_OK) goto finalize_it
      |                                         ^~~~
cfsysline.h:52:108: note: expected 'rsRetVal (*)(void)' {aka 'enum rsRetVal_ (*)(void)'} but argument is of type 'rsRetVal (*)(void *, int)' {aka 'enum rsRetVal_ (*)(void *, int)'}
   52 | rsRetVal regCfSysLineHdlr(const uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(),
      |                                                                                                 ~~~~~~~~~~~^~~~~~~~
glbl.c:556:1: note: 'setParserSpaceLFOnReceive' declared here
  556 | setParserSpaceLFOnReceive(void __attribute__((unused)) *pVal, int pNewVal) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1376: librsyslog_la-rsconf.lo] Error 1
glbl.c:1532:9: error: passing argument 4 of 'regCfSysLineHdlr' from incompatible pointer type [-Wincompatible-pointer-types]
 1532 |         setParserEscape8BitCharactersOnReceive, NULL, NULL));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         rsRetVal (*)(void *, int) {aka enum rsRetVal_ (*)(void *, int)}
rsyslog.h:661:41: note: in definition of macro 'CHKiRet'
  661 | #       define CHKiRet(code) if((iRet = code) != RS_RET_OK) goto finalize_it
      |                                         ^~~~
cfsysline.h:52:108: note: expected 'rsRetVal (*)(void)' {aka 'enum rsRetVal_ (*)(void)'} but argument is of type 'rsRetVal (*)(void *, int)' {aka 'enum rsRetVal_ (*)(void *, int)'}
   52 | rsRetVal regCfSysLineHdlr(const uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(),
      |                                                                                                 ~~~~~~~~~~~^~~~~~~~
glbl.c:563:1: note: 'setParserEscape8BitCharactersOnReceive' declared here
  563 | setParserEscape8BitCharactersOnReceive(void __attribute__((unused)) *pVal, int pNewVal) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glbl.c:1534:9: error: passing argument 4 of 'regCfSysLineHdlr' from incompatible pointer type [-Wincompatible-pointer-types]
 1534 |         setParserEscapeControlCharacterTab, NULL, NULL));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         rsRetVal (*)(void *, int) {aka enum rsRetVal_ (*)(void *, int)}
rsyslog.h:661:41: note: in definition of macro 'CHKiRet'
  661 | #       define CHKiRet(code) if((iRet = code) != RS_RET_OK) goto finalize_it
      |                                         ^~~~
cfsysline.h:52:108: note: expected 'rsRetVal (*)(void)' {aka 'enum rsRetVal_ (*)(void)'} but argument is of type 'rsRetVal (*)(void *, int)' {aka 'enum rsRetVal_ (*)(void *, int)'}
   52 | rsRetVal regCfSysLineHdlr(const uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(),
      |                                                                                                 ~~~~~~~~~~~^~~~~~~~
glbl.c:570:1: note: 'setParserEscapeControlCharacterTab' declared here
  570 | setParserEscapeControlCharacterTab(void __attribute__((unused)) *pVal, int pNewVal) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glbl.c:1537:9: error: passing argument 4 of 'regCfSysLineHdlr' from incompatible pointer type [-Wincompatible-pointer-types]
 1537 |         resetConfigVariables, NULL, NULL));
      |         ^~~~~~~~~~~~~~~~~~~~
      |         |
      |         rsRetVal (*)(uchar *, void *) {aka enum rsRetVal_ (*)(unsigned char *, void *)}
rsyslog.h:661:41: note: in definition of macro 'CHKiRet'
  661 | #       define CHKiRet(code) if((iRet = code) != RS_RET_OK) goto finalize_it
      |                                         ^~~~
cfsysline.h:52:108: note: expected 'rsRetVal (*)(void)' {aka 'enum rsRetVal_ (*)(void)'} but argument is of type 'rsRetVal (*)(uchar *, void *)' {aka 'enum rsRetVal_ (*)(unsigned char *, void *)'}
   52 | rsRetVal regCfSysLineHdlr(const uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(),
      |                                                                                                 ~~~~~~~~~~~^~~~~~~~
glbl.c:1005:17: note: 'resetConfigVariables' declared here
 1005 | static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
      |                 ^~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1355: librsyslog_la-glbl.lo] Error 1
make[3]: Leaving directory '/build/reproducible-path/rsyslog-8.2412.0/runtime'
make[2]: *** [Makefile:933: all-recursive] Error 1
make[2]: Leaving directory '/build/reproducible-path/rsyslog-8.2412.0'
make[1]: *** [Makefile:788: all] Error 2
make[1]: Leaving directory '/build/reproducible-path/rsyslog-8.2412.0'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:11: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1097810#12
Date:
2025-07-30 14:49:25 UTC
From:
To:
This build failure no longer applies in Debian. Thus closing the issue.

rsyslog still fails with -Werror though (i.e. in the presence of a .git
directory)

So I'm keeping the upstream issue open