#1098040 unrtf: ftbfs with GCC-15

Package:
src:unrtf
Source:
src:unrtf
Submitter:
Matthias Klose
Date:
2025-09-04 22:11:24 UTC
Severity:
normal
Tags:
#1098040#5
Date:
2025-02-17 17:58:35 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/unrtf_0.21.10-clean-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

[...]
checking for string.h... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for GNU libc compatible malloc... yes
checking for memset... yes
checking for strchr... yes
checking for strstr... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating outputs/Makefile
config.status: creating patches/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands
   dh_auto_build
dh_auto_build: warning: Compatibility levels before 10 are deprecated (level 9 in use)
	make -j1
make[1]: Entering directory '/build/reproducible-path/unrtf-0.21.10-clean'
make  all-recursive
make[2]: Entering directory '/build/reproducible-path/unrtf-0.21.10-clean'
Making all in src
make[3]: Entering directory '/build/reproducible-path/unrtf-0.21.10-clean/src'
gcc -DHAVE_CONFIG_H -I. -I..  -DPKGDATADIR=\"/usr/share/unrtf\" -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/unrtf-0.21.10-clean=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o attr.o attr.c
gcc -DHAVE_CONFIG_H -I. -I..  -DPKGDATADIR=\"/usr/share/unrtf\" -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/unrtf-0.21.10-clean=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o convert.o convert.c
convert.c: In function ‘cmd_field’:
convert.c:1522:81: warning: passing argument 1 of ‘my_free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1522 |                                                                         my_free(string);
      |                                                                                 ^~~~~~
In file included from convert.c:115:
malloc.h:36:21: note: expected ‘char *’ but argument is of type ‘const char *’
   36 | extern void my_free(char *);
      |                     ^~~~~~
convert.c: In function ‘print_with_special_exprs’:
convert.c:3795:41: warning: passing argument 1 of ‘my_free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 3795 |                                 my_free(post_trans);
      |                                         ^~~~~~~~~~
malloc.h:36:21: note: expected ‘char *’ but argument is of type ‘const char *’
   36 | extern void my_free(char *);
      |                     ^~~~~~
gcc -DHAVE_CONFIG_H -I. -I..  -DPKGDATADIR=\"/usr/share/unrtf\" -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/unrtf-0.21.10-clean=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o error.o error.c
gcc -DHAVE_CONFIG_H -I. -I..  -DPKGDATADIR=\"/usr/share/unrtf\" -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/unrtf-0.21.10-clean=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o hash.o hash.c
gcc -DHAVE_CONFIG_H -I. -I..  -DPKGDATADIR=\"/usr/share/unrtf\" -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/unrtf-0.21.10-clean=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o my_iconv.o my_iconv.c
gcc -DHAVE_CONFIG_H -I. -I..  -DPKGDATADIR=\"/usr/share/unrtf\" -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/unrtf-0.21.10-clean=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o main.o main.c
gcc -DHAVE_CONFIG_H -I. -I..  -DPKGDATADIR=\"/usr/share/unrtf\" -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/unrtf-0.21.10-clean=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o malloc.o malloc.c
malloc.c:168:7: error: conflicting types for ‘malloc’; have ‘void *(void)’
  168 | void *malloc();
      |       ^~~~~~
In file included from malloc.c:50:
/usr/include/stdlib.h:672:14: note: previous declaration of ‘malloc’ with type ‘void *(long unsigned int)’
  672 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
      |              ^~~~~~
malloc.c: In function ‘rpl_malloc’:
malloc.c:180:16: error: too many arguments to function ‘malloc’; expected 0, have 1
  180 |         return malloc(n);
      |                ^~~~~~ ~
malloc.c:168:7: note: declared here
  168 | void *malloc();
      |       ^~~~~~
make[3]: *** [Makefile:406: malloc.o] Error 1
make[3]: Leaving directory '/build/reproducible-path/unrtf-0.21.10-clean/src'
make[2]: *** [Makefile:382: all-recursive] Error 1
make[2]: Leaving directory '/build/reproducible-path/unrtf-0.21.10-clean'
make[1]: *** [Makefile:323: all] Error 2
make[1]: Leaving directory '/build/reproducible-path/unrtf-0.21.10-clean'
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:3: binary] Error 255
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2