#1133648 tgl: ftbfs with GCC-16

Package:
src:tgl
Source:
src:tgl
Submitter:
Emanuele Rocca
Date:
2026-04-20 21:27:01 UTC
Severity:
normal
Tags:
#1133648#5
Date:
2026-04-13 13:11:52 UTC
From:
To:
Hi,

tgl fails to build in a test rebuild on at least amd64 and arm64 with
gcc-16/g++-16, but builds properly with gcc-15/g++-15. The severity of this
report will be raised before the forky release.

The full build log can be found at:
https://people.debian.org/~ema/gcc-16-rebuilds/output-1/tgl_arm64.build.xz

The last lines of the build log are at the end of this report.

To build with GCC 16, either set CC=gcc-16 CXX=g++-16 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++

Common build failures include unused (but set) variables, array subscripts
partly outside array bounds, and new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-16/porting_to.html

Please only close this issue after double-checking that the package can be
built correctly with GCC 16.

Please do not reassign this bug to another package. If a fix in another package
is required, then file a bug for the other package (or clone), and mark this
bug as blocked by the bug in the other package.

[...]


checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking if zlib is wanted... yes
checking for inflateEnd in -lz... yes
checking for zlib.h... yes
checking for event_base_new in -levent... yes
checking for event2/event.h... yes
checking for fcntl.h... yes
checking for malloc.h... yes
checking for netdb.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for arpa/inet.h... yes
checking for mach/mach.h... no
checking for netinet/in.h... yes
checking for sys/file.h... yes
checking for sys/socket.h... yes
checking for termios.h... yes
checking for execinfo.h... yes
checking for library containing backtrace_symbols_fd... none required
checking for size_t... yes
checking for uid_t... yes
checking for gid_t... yes
checking for inline... inline
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for GNU libc compatible malloc... yes
checking for GNU libc compatible realloc... yes
checking for alarm... yes
checking for endpwent... yes
checking for memset... yes
checking for memmove... yes
checking for mkdir... yes
checking for select... yes
checking for socket... yes
checking for strdup... yes
checking for strndup... yes
checking for uname... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
make[1]: Leaving directory '/build/reproducible-path/tgl-2.0.1+git20160323.ffb04cac'
   debian/rules override_dh_auto_build
make[1]: Entering directory '/build/reproducible-path/tgl-2.0.1+git20160323.ffb04cac'
dh_auto_build
	make -j1
make[2]: Entering directory '/build/reproducible-path/tgl-2.0.1+git20160323.ffb04cac'
cat scheme.tl encrypted_scheme.tl binlog.tl mtproto.tl append.tl > auto/scheme.tl
ln -s /usr/bin/tl-parser bin/tl-parser
bin/tl-parser -E auto/scheme.tl 2> auto/scheme2.tl  || ( cat auto/scheme2.tl && rm auto/scheme2.tl && false )
awk -f ./gen_constants_h.awk < auto/scheme2.tl > auto/constants.h
bin/tl-parser -e auto/scheme.tlo auto/scheme.tl
gcc -I. -I. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/tgl-2.0.1+git20160323.ffb04cac=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wall -Wno-cast-function-type -Wno-error=unused-function  -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include -DHAVE_CONFIG_H -Wall -Wextra -Werror -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -c -MP -MD -MF dep/generate.d -MQ objs/generate.o -o objs/generate.o generate.c
generate.c: In function ‘gen_uni_skip’:
generate.c:334:7: error: variable ‘y’ set but not used [-Werror=unused-but-set-variable=]
  334 |   int y;
      |       ^
cc1: all warnings being treated as errors
make[2]: *** [Makefile:54: objs/generate.o] Error 1
make[2]: Leaving directory '/build/reproducible-path/tgl-2.0.1+git20160323.ffb04cac'
dh_auto_build: error: make -j1 returned exit code 2
make[1]: *** [debian/rules:24: override_dh_auto_build] Error 25
make[1]: Leaving directory '/build/reproducible-path/tgl-2.0.1+git20160323.ffb04cac'
make: *** [debian/rules:18: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2

#1133648#10
Date:
2026-04-20 21:25:05 UTC
From:
To:
user debian-release@lists.debian.org
usertags 1133648 + bsp-2026-04-br-campinas
thanks

I resolved bug #1133648 related to the tgl package.

This issue occurs when the code is compiled with gcc-16.
To fix this problem, I added the flag -Wno-unused-but-set-variable to the
rules file, because gcc-16 marks the variable y in the function int
gen_uni_skip as uninitialized.

The patch is attached.

att,
Rony Sousa