Closed dogtopus closed 8 months ago
Also hit it on latest Fedora 39:
[-] CC src/cmdscript.c
In file included from /usr/include/python3.12/Python.h:52,
from src/cmdscript.c:24:
/usr/include/python3.12/longobject.h:10:26: error: redundant redeclaration of ‘PyLong_Type’ [-Werror=redundant-decls]
10 | PyAPI_DATA(PyTypeObject) PyLong_Type;
| ^~~~~~~~~~~
In file included from /usr/include/python3.12/Python.h:44:
/usr/include/python3.12/object.h:226:26: note: previous declaration of ‘PyLong_Type’ with type ‘PyTypeObject’ {aka ‘struct _typeobject’}
226 | PyAPI_DATA(PyTypeObject) PyLong_Type;
| ^~~~~~~~~~~
In file included from /usr/include/python3.12/Python.h:54:
/usr/include/python3.12/boolobject.h:10:26: error: redundant redeclaration of ‘PyBool_Type’ [-Werror=redundant-decls]
10 | PyAPI_DATA(PyTypeObject) PyBool_Type;
| ^~~~~~~~~~~
/usr/include/python3.12/object.h:227:26: note: previous declaration of ‘PyBool_Type’ with type ‘PyTypeObject’ {aka ‘struct _typeobject’}
227 | PyAPI_DATA(PyTypeObject) PyBool_Type;
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:946: obj/cmdscript.o] Error 1
make: *** [Makefile:177: client/all] Error 2
@wh201906 Presumably no since it's a Python issue, unless CMake didn't honor -Werror
by default for some reason.
I don't have Fedora 39 so I did a test roughly and it seems to only affect the make
command. Could you please help me to test cmake
on Fedora 39 with Python 3.12?
As for the Makefile
, I've made PR #2185 to fix it.
@wh201906 I tested using cmake on Fedora 39 and it builds fine. Thanks a lot.
merged the fix.
closing
Describe the bug
Python 3.12.0 has a bug (python/cpython#106560) that will cause the compilation of pm3 client to fail.
A workaround would simply be disabling
-Werror
forredundant-decls
.To Reproduce Steps to reproduce the behavior:
-Werror=redundant-decls
Expected behavior Build under Python 3.12.0 successfully.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.