On Tue, Feb 18, 2025 at 01:06:15PM +0000, Chris Lamb wrote:
Hey Alberto,
Just a heads-up that libfiu doesn't seem to build with GCC-15. I could
set -std=gnu17, but perhaps the changes are straightforward and/or you
wish to make them anyway.
Hi! Sorry I am only getting to this now, for some reason I missed it at
the time, and just got the email about the FTBFS autoremoval.
cc -I../../libfiu/ -L../../libfiu/ -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -fPIC
-DFIU_ENABLE=1 -g -O2 -Werror=implicit-function-declaration
-ffile-prefix-map=/build/reproducible-path/libfiu-1.2=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -std=c99 -pedantic -Wall -std=c99
-pedantic -Wall tests/malloc.c -lfiu -o tests/malloc.bin
LD_LIBRARY_PATH=../../libfiu/ LD_PRELOAD="../../preload/run/fiu_run_preload.so
../../preload/posix/fiu_posix_preload.so" ./tests/malloc.bin
libc/mm/malloc - external callback not invoked
The problem is not the build of the library itself, but the malloc
preload test fails (the malloc callback is never invoked).
To reproduce, it's not enough to use gcc-15, it's the combination of
`gcc-15 -O2` that triggers the failure.
I can reproduce this in the `next` branch as well, so it's not specific
to the libfiu 1.2 version either.
I'm looking into this, will report back once I know more.
Thank you!
Alberto
PS: For reference, steps to reproduce from the git repository:
# Note that gcc-14, gcc-15 or clang-19 to build the library doesn't
# change the end result.
$ ( make clean all && cd tests/generated/ ; make -j2 clean c-files )
# Specifically build and run the malloc test using the normal flags. It
# works fine.
$ ( cd tests/generated/; gcc-15 -I../../libfiu/ -L../../libfiu/ -D_XOPEN_SOURCE=600
-D_GNU_SOURCE -fPIC -DFIU_ENABLE=1 -std=c99 -pedantic -Wall tests/malloc.c -lfiu -o
tests/malloc.bin && LD_LIBRARY_PATH=../../libfiu/
LD_PRELOAD="../../preload/run/fiu_run_preload.so
../../preload/posix/fiu_posix_preload.so" ./tests/malloc.bin )
# Now add -O2, and it fails.
$ ( cd tests/generated/; gcc-15 -I../../libfiu/ -L../../libfiu/ -D_XOPEN_SOURCE=600
-D_GNU_SOURCE -fPIC -DFIU_ENABLE=1 -std=c99 -pedantic -Wall tests/malloc.c -lfiu -o
tests/malloc.bin -O2 && LD_LIBRARY_PATH=../../libfiu/
LD_PRELOAD="../../preload/run/fiu_run_preload.so
../../preload/posix/fiu_posix_preload.so" ./tests/malloc.bin )
libc/mm/malloc - external callback not invoked