perf build: Fail to build perf source with Python 3.15
Hello,
Recently I've upgrade my machine to Fedora 45 and I cannot build perf from source anymore. The error is like below
GEN python/perf.cpython-315-x86_64-linux-gnu.so
In file included from /usr/include/python3.15/Python.h:68,
from linux/tools/perf/util/python.c:3:
/usr/include/python3.15/pyport.h:494:9: error: ‘_Py_STDC_VERSION’ is not defined, evaluates to ‘0’ [-Werror=undef]
494 | # elif _Py_STDC_VERSION >= 201112L && !defined(__STDC_NO_THREADS__)
| ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
error: command '/usr/lib64/ccache/gcc' failed with exit code 1
cp: cannot stat 'python_ext_build/lib/perf*.so': No such file or directory
Looks like a bug in the python code. I found a bug report in Github.
https://github.com/python/cpython/issues/160719
Thanks,
Namhyung