Build fails with Python 3.12 (Cython < 3)
Closed this issue · 3 comments
sanjayankur31 commented
Given #70, I tried to build 0.8.0 with Cython < 3, but it looks like some changes are required to make pyspike support python 3.12. This is the build error we get:
O_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
pyspike/cython/cython_add.c: In function ‘__pyx_memview_slice’:
pyspike/cython/cython_add.c:14378:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
14378 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
In file included from /usr/include/python3.12/Python.h:48,
from pyspike/cython/cython_add.c:6:
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_add.o -L/usr/lib64 -o build/lib.linux-x86_64-cpython-312/pyspike/cython/cython_add.cpython-312-x86_64-linux-gnu.so
building 'pyspike.cython.cython_get_tau' extension
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I/usr/lib64/python3.12/site-packages/numpy/core/include -I/usr/include/python3.12 -c pyspike/cython/cython_get_tau.c -o build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_get_tau.o
pyspike/cython/cython_get_tau.c: In function ‘__pyx_f_7pyspike_6cython_14cython_get_tau_get_tau’:
pyspike/cython/cython_get_tau.c:2335:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
2335 | __pyx_t_3 = ((__pyx_v_i < (__pyx_t_2 - 1)) != 0);
| ^
pyspike/cython/cython_get_tau.c:2392:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
2392 | __pyx_t_3 = ((__pyx_v_j < (__pyx_t_2 - 1)) != 0);
| ^
pyspike/cython/cython_get_tau.c: In function ‘__pyx_memview_slice’:
pyspike/cython/cython_get_tau.c:10064:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
10064 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
In file included from /usr/include/python3.12/Python.h:48,
from pyspike/cython/cython_get_tau.c:6:
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_get_tau.o -L/usr/lib64 -o build/lib.linux-x86_64-cpython-312/pyspike/cython/cython_get_tau.cpython-312-x86_64-linux-gnu.so
building 'pyspike.cython.cython_profiles' extension
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I/usr/lib64/python3.12/site-packages/numpy/core/include -I/usr/include/python3.12 -c pyspike/cython/cython_profiles.c -o build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_profiles.o
In file included from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
from pyspike/cython/cython_profiles.c:750:
/usr/lib64/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
pyspike/cython/cython_profiles.c: In function ‘__pyx_pf_7pyspike_6cython_15cython_profiles_2spike_profile_cython’:
pyspike/cython/cython_profiles.c:4291:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
4291 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
In file included from /usr/include/python3.12/Python.h:48,
from pyspike/cython/cython_profiles.c:6:
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
pyspike/cython/cython_profiles.c:4307:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
4307 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
pyspike/cython/cython_profiles.c: In function ‘__pyx_memview_slice’:
pyspike/cython/cython_profiles.c:15712:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
15712 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_profiles.o -L/usr/lib64 -o build/lib.linux-x86_64-cpython-312/pyspike/cython/cython_profiles.cpython-312-x86_64-linux-gnu.so
building 'pyspike.cython.cython_distances' extension
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I/usr/lib64/python3.12/site-packages/numpy/core/include -I/usr/include/python3.12 -c pyspike/cython/cython_distances.c -o build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_distances.o
In file included from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
from pyspike/cython/cython_distances.c:750:
/usr/lib64/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
pyspike/cython/cython_distances.c: In function ‘__pyx_pf_7pyspike_6cython_16cython_distances_2spike_distance_cython’:
pyspike/cython/cython_distances.c:4142:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
4142 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
In file included from /usr/include/python3.12/Python.h:48,
from pyspike/cython/cython_distances.c:6:
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
pyspike/cython/cython_distances.c:4158:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
4158 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
pyspike/cython/cython_distances.c: In function ‘__pyx_memview_slice’:
pyspike/cython/cython_distances.c:15866:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
15866 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_distances.o -L/usr/lib64 -o build/lib.linux-x86_64-cpython-312/pyspike/cython/cython_distances.cpython-312-x86_64-linux-gnu.so
building 'pyspike.cython.cython_directionality' extension
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I/usr/lib64/python3.12/site-packages/numpy/core/include -I/usr/include/python3.12 -c pyspike/cython/cython_directionality.c -o build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_directionality.o
In file included from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
from pyspike/cython/cython_directionality.c:750:
/usr/lib64/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
pyspike/cython/cython_directionality.c: In function ‘__pyx_memview_slice’:
pyspike/cython/cython_directionality.c:13656:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
13656 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
In file included from /usr/include/python3.12/Python.h:48,
from pyspike/cython/cython_directionality.c:6:
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_directionality.o -L/usr/lib64 -o build/lib.linux-x86_64-cpython-312/pyspike/cython/cython_directionality.cpython-312-x86_64-linux-gnu.so
building 'pyspike.cython.cython_simulated_annealing' extension
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -I/usr/lib64/python3.12/site-packages/numpy/core/include -I/usr/include/python3.12 -c pyspike/cython/cython_simulated_annealing.c -o build/temp.linux-x86_64-cpython-312/pyspike/cython/cython_simulated_annealing.o
In file included from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/lib64/python3.12/site-packages/numpy/core/include/numpy/arrayobject.h:5,
from pyspike/cython/cython_simulated_annealing.c:746:
/usr/lib64/python3.12/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__pyx_pf_7pyspike_6cython_26cython_simulated_annealing_sim_ann_cython’:
pyspike/cython/cython_simulated_annealing.c:2786:3: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
2786 | __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.12/dictobject.h:90,
from /usr/include/python3.12/Python.h:61,
from pyspike/cython/cython_simulated_annealing.c:6:
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c:2791:3: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
2791 | __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c:2872:3: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
2872 | __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__pyx_pf___pyx_MemviewEnum___reduce_cython__’:
pyspike/cython/cython_simulated_annealing.c:6376:5: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
6376 | __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c:6422:5: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
6422 | __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__pyx_memview_slice’:
pyspike/cython/cython_simulated_annealing.c:11559:3: warning: ‘Py_OptimizeFlag’ is deprecated [-Wdeprecated-declarations]
11559 | if (unlikely(!Py_OptimizeFlag)) {
| ^~
In file included from /usr/include/python3.12/Python.h:48:
/usr/include/python3.12/cpython/pydebug.h:13:37: note: declared here
13 | Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
| ^~~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_get_tp_dict_version’:
pyspike/cython/cython_simulated_annealing.c:19262:5: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
19262 | return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
| ^~~~~~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_get_object_dict_version’:
pyspike/cython/cython_simulated_annealing.c:19274:5: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
19274 | return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
| ^~~~~~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_object_dict_version_matches’:
pyspike/cython/cython_simulated_annealing.c:19278:5: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
19278 | if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
| ^~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx__GetModuleGlobalName’:
pyspike/cython/cython_simulated_annealing.c:19295:5: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
19295 | __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_Raise’:
pyspike/cython/cython_simulated_annealing.c:20026:34: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
20026 | PyObject* tmp_tb = tstate->curexc_traceback;
| ^~
pyspike/cython/cython_simulated_annealing.c:20029:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘curexc_traceback’
20029 | tstate->curexc_traceback = tb;
| ^~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_PyUnicode_Equals’:
pyspike/cython/cython_simulated_annealing.c:557:51: error: implicit declaration of function ‘_PyUnicode_Ready’; did you mean ‘PyUnicode_READY’? [-Werror=implicit-function-declaration]
557 | 0 : _PyUnicode_Ready((PyObject *)(op)))
| ^~~~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c:946:43: note: in definition of macro ‘unlikely’
946 | #define unlikely(x) __builtin_expect(!!(x), 0)
| ^
pyspike/cython/cython_simulated_annealing.c:20143:22: note: in expansion of macro ‘__Pyx_PyUnicode_READY’
20143 | if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
| ^~~~~~~~~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_PyInt_AddObjC’:
pyspike/cython/cython_simulated_annealing.c:20642:51: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
20642 | const digit* digits = ((PyLongObject*)op1)->ob_digit;
| ^~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_CLineForTraceback’:
pyspike/cython/cython_simulated_annealing.c:21049:9: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
21049 | __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c:21049:9: warning: ‘ma_version_tag’ is deprecated [-Wdeprecated-declarations]
21049 | __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/python3.12/cpython/dictobject.h:22:34: note: declared here
22 | Py_DEPRECATED(3.12) uint64_t ma_version_tag;
| ^~~~~~~~~~~~~~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_PyInt_As_long’:
pyspike/cython/cython_simulated_annealing.c:22623:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
22623 | const digit* digits = ((PyLongObject*)x)->ob_digit;
| ^~
pyspike/cython/cython_simulated_annealing.c:22678:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
22678 | const digit* digits = ((PyLongObject*)x)->ob_digit;
| ^~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_PyInt_As_int’:
pyspike/cython/cython_simulated_annealing.c:22819:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
22819 | const digit* digits = ((PyLongObject*)x)->ob_digit;
| ^~
pyspike/cython/cython_simulated_annealing.c:22874:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
22874 | const digit* digits = ((PyLongObject*)x)->ob_digit;
| ^~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_PyInt_As_char’:
pyspike/cython/cython_simulated_annealing.c:23053:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
23053 | const digit* digits = ((PyLongObject*)x)->ob_digit;
| ^~
pyspike/cython/cython_simulated_annealing.c:23108:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
23108 | const digit* digits = ((PyLongObject*)x)->ob_digit;
| ^~
pyspike/cython/cython_simulated_annealing.c: In function ‘__Pyx_PyIndex_AsSsize_t’:
pyspike/cython/cython_simulated_annealing.c:23459:45: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
23459 | const digit* digits = ((PyLongObject*)b)->ob_digit;
| ^~
cc1: some warnings being treated as errors
error: command '/usr/bin/gcc' failed with exit code 1
error: subprocess-exited-with-error
× Building wheel for pyspike (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /usr/bin/python3 /usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /builddir/build/BUILD/PySpike-0.8.0/.pyproject-builddir/tmphottif77
cwd: /builddir/build/BUILD/PySpike-0.8.0
Building wheel for pyspike (pyproject.toml): finished with status 'error'
ERROR: Failed building wheel for pyspike
Failed to build pyspike
ERROR: Failed to build one or more wheels
I think a few of these are using cpython internals which have changed in 3.12. I see there's some discussion about this here, but I don't know what the fix is at the moment:
I think the issue has been fixed in Cython 3, so a fix would be to update pyspike to work with that?
https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html
thomaskreuz commented
thomaskreuz commented
Does this mean we can close the issue?
Thanks!
sanjayankur31 commented
Yes, we're carrying the patch and that fixes our builds.