#1097313 lookup: ftbfs with GCC-15

Package:
src:lookup
Source:
src:lookup
Submitter:
Matthias Klose
Date:
2025-09-04 22:09:11 UTC
Severity:
normal
Tags:
#1097313#5
Date:
2025-02-17 17:35:13 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/lookup_1.08b-14_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

[...]
dh_clean
 debian/rules binary
dh_testdir
# Add here commands to compile the package.
dh_auto_build CFLAGS="-Wall -g -DUSE_VSNPRINTF -O3"
	make -j8
make[1]: Entering directory '/build/reproducible-path/lookup-1.08b'
gcc -c -o virtfile.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/virtfile.c
gcc -c -o euc.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/euc.c
gcc -c -o fuzzkana.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/fuzzkana.c
/bin/rm -f lib/system.h
gcc -c -o input.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/input.c
gcc -c -o jregex.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/jregex.c
gcc -c -o kanaid.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/kanaid.c
gcc -c -o output.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/output.c
echo '/* this file generated by Makefile */'      > tmp;
echo '#ifndef __SYSTEM_H__ /*file wrapper*/'    >> tmp;
echo '#define __SYSTEM_H__'                     >> tmp;
if echo '#include <strings.h>' | gcc -E - >/dev/null 2>&1; then\
	echo '#define _HAVE_STRINGS_H_'          >> tmp; \
else true; fi
lib/virtfile.c: In function ‘LoadPage’:
lib/virtfile.c:126:27: warning: passing argument 2 of ‘read’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  126 |      if (i = read(v->fd, p->text, PAGE_SIZE), i < 0)
      |                          ~^~~~~~
In file included from lib/config.h:6,
                 from lib/virtfile.c:15:
/usr/include/unistd.h:371:38: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  371 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
      |                                ~~~~~~^~~~~
if echo '#include <sys/termio.h>' | gcc -E - >/dev/null 2>&1; then\
	echo '#define _HAVE_SYS_TERMIO_H_'       >> tmp; \
else true; fi
if echo '#include <termio.h>' | gcc -E - >/dev/null 2>&1; then\
	echo '#define _HAVE_TERMIO_H_'       >> tmp; \
else true; fi
gcc -c -o replace.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/replace.c
gcc -c -o romaji2kana.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/romaji2kana.c
gcc -c -o strsave.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/strsave.c
if echo '#include <sys/stdtypes.h>' | gcc -E - >/dev/null 2>&1; then\
	echo '#define _HAVE_SYS_STDTYPES_H_'     >> tmp; \
else true; fi
gcc -c -o xmalloc.o   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Ilib/ lib/xmalloc.c
if echo '#include <sys/fcntl.h>' | gcc -E - >/dev/null 2>&1; then\
	echo '#define _HAVE_SYS_FCNTL_H_'        >> tmp; \
else true; fi
gcc   -g     -ffile-prefix-map=/build/reproducible-path/lookup-1.08b=. -Wdate-time -D_FORTIFY_SOURCE=2  -c -o eval.o eval.c
if echo '#include <fcntl.h>' | gcc -E - >/dev/null 2>&1; then\
	echo '#define _HAVE_FCNTL_H_'            >> tmp; \
else true; fi
eval.c:51:22: error: expected identifier or ‘(’ before ‘true’
   51 | static unsigned long true = 1;
      |                      ^~~~
eval.c:52:22: error: expected identifier or ‘(’ before ‘false’
   52 | static unsigned long false = 0;
      |                      ^~~~~
eval.c:69:38: error: lvalue required as unary ‘&’ operand
   69 |   { NAME("true"),     UNSIGNED_LONG, &true },
      |                                      ^
eval.c:70:38: error: lvalue required as unary ‘&’ operand
   70 |   { NAME("false"),    UNSIGNED_LONG, &false },
      |                                      ^
make[1]: *** [<builtin>: eval.o] Error 1
make[1]: *** Waiting for unfinished jobs....
echo '#endif /* file wrapper */'                >> tmp;
mv tmp lib/system.h
make[1]: Leaving directory '/build/reproducible-path/lookup-1.08b'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:27: build-stamp] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2