#1133471 faketime: ftbfs with GCC-16

Package:
src:faketime
Source:
src:faketime
Submitter:
Emanuele Rocca
Date:
2026-08-01 19:49:03 UTC
Severity:
normal
Tags:
#1133471#5
Date:
2026-04-13 13:03:23 UTC
From:
To:
Hi,

faketime 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/faketime_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.

[...]


gcc -shared -o libmallocintercept.so -fpic -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/faketime-0.9.10+2024-06-05+gba9ed5b2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -DMULTI_ARCH -DFAKE_RANDOM -DFAKE_PID -std=gnu99 -Wall -DFAKE_STAT -Werror -Wextra  -U_FILE_OFFSET_BITS -U_TIME_BITS libmallocintercept.c
# Begin Test Suites in functests

# Begin functests/test_exclude_mono.sh
# PLATFORM=linuxlike
libmallocintercept.c: In function ‘free’:
libmallocintercept.c:79:12: error: variable ‘ptr2’ set but not used [-Werror=unused-but-set-variable=]
   79 |   long int ptr2 = (long int) ptr; ptr2 -= (long int) ptr;
      |            ^~~~
cc1: all warnings being treated as errors
make[3]: *** [Makefile:44: libmallocintercept.so] Error 1
make[3]: *** Waiting for unfinished jobs....
out=2868876.72925434 When not faking monotonic time, timestamps should be different ref=2868877.76131214 - ok
# functests/test_exclude_mono.sh summary: 1 succeeded, 0 failed
# End functests/test_exclude_mono.sh - OK

# Begin functests/test_null.sh
out=0 () ref=1774093096 - ok
# functests/test_null.sh summary: 1 succeeded, 0 failed
# End functests/test_null.sh - OK

# Begin functests/test_true.sh
# functests/test_true.sh summary: 1 succeeded, 0 failed
# End functests/test_true.sh - OK

# Begin functests/test_walkone.sh
# PLATFORM=linuxlike
out=1 (secs since Epoch) - ok
out=2 (secs since Epoch) - ok
out=4 (secs since Epoch) - ok
out=8 (secs since Epoch) - ok
out=16 (secs since Epoch) - ok
out=32 (secs since Epoch) - ok
out=64 (secs since Epoch) - ok
out=128 (secs since Epoch) - ok
out=256 (secs since Epoch) - ok
out=512 (secs since Epoch) - ok
out=1024 (secs since Epoch) - ok
out=2048 (secs since Epoch) - ok
out=4096 (secs since Epoch) - ok
out=8192 (secs since Epoch) - ok
out=16384 (secs since Epoch) - ok
out=32768 (secs since Epoch) - ok
out=65536 (secs since Epoch) - ok
out=131072 (secs since Epoch) - ok
out=262144 (secs since Epoch) - ok
out=524288 (secs since Epoch) - ok
out=1048576 (secs since Epoch) - ok
out=2097152 (secs since Epoch) - ok
out=4194304 (secs since Epoch) - ok
out=8388608 (secs since Epoch) - ok
out=16777216 (secs since Epoch) - ok
out=33554432 (secs since Epoch) - ok
out=67108864 (secs since Epoch) - ok
out=134217728 (secs since Epoch) - ok
out=268435456 (secs since Epoch) - ok
out=536870912 (secs since Epoch) - ok
out=1073741824 (secs since Epoch) - ok
# functests/test_walkone.sh summary: 31 succeeded, 0 failed
# End functests/test_walkone.sh - OK

# Test Suites summary: 4 succeeded, 0 failed
# End Test Suites - OK
make[3]: Leaving directory '/build/reproducible-path/faketime-0.9.10+2024-06-05+gba9ed5b2/test'
make[2]: *** [Makefile:12: test] Error 2
make[2]: Leaving directory '/build/reproducible-path/faketime-0.9.10+2024-06-05+gba9ed5b2'
dh_auto_test: error: make -j128 test returned exit code 2
make[1]: *** [debian/rules:28: override_dh_auto_test] Error 25
make[1]: Leaving directory '/build/reproducible-path/faketime-0.9.10+2024-06-05+gba9ed5b2'
make: *** [debian/rules:33: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2

#1133471#10
Date:
2026-04-21 22:11:16 UTC
From:
To:
tags 1133471 + patch
user debian-release@lists.debian.org
usertags 1133471 + bsp-2026-04-br-campinas
thanks

Hi,

I've opened https://salsa.debian.org/debian/faketime/-/merge_requests/4
with a proposed fix for this bug.  It's just a backport of the upstream
fix.

Let me know if you'd prefer a debdiff instead.

Thanks,