FORTIFY_SOURCE=3 python linux-tools build issue
Hi,
We have used already FORTIFY_SOURCE=3
in our builds and found a issue, when python is compiled with it.
Compiling linux-tools results into following error:
make[2]: Leaving directory '/tmp/makepkg/linux-tools/src/linux/tools/lib/subcmd'
GEN python/perf.cpython-311-x86_64-linux-gnu.so
<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
error: command '/usr/bin/gcc' failed with exit code 1
cp: cannot stat 'python_ext_build/lib/perf*.so': No such file or directory
make[1]: *** [Makefile.perf:678: python/perf.cpython-311-x86_64-linux-gnu.so] Error 1
make[1]: *** Waiting for unfinished jobs....
LD /tmp/makepkg/linux-tools/src/linux/tools/perf/libbpf/staticobjs/libbpf-in.o
LINK /tmp/makepkg/linux-tools/src/linux/tools/perf/libbpf/libbpf.a
make[2]: Leaving directory '/tmp/makepkg/linux-tools/src/linux/tools/lib/bpf'
Compiling python with FORTIFY_SOURCE=2
does fix this issue.
Since Arch is considering to switch to FORTIFY=3
in the near future, please change here to FORTIFY=2.
Edited by Peter Jung