Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"lvalue required as increment operand" error when building enable for Python 3.10 #949

Open
Tracked by #955
brechtm opened this issue Jun 23, 2022 · 1 comment
Open
Tracked by #955

Comments

@brechtm
Copy link
Contributor

brechtm commented Jun 23, 2022

I'm trying to install chaco in a Python 3.10 venv, but enable is failing to build:

      In file included from /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/Python.h:74:0,
                       from kiva/_cython_speedups.cpp:4:
      kiva/_cython_speedups.cpp: In function ‘void __pyx_tp_dealloc_array(PyObject*)’:
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/object.h:133:58: error: lvalue required as increment operand
       #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                                ^

I'm using a fairly old GCC version (4.8.5). Perhaps that is the cause of the issue?

Full log:

$ pip install chaco
Collecting chaco
  Using cached chaco-5.0.0-cp310-cp310-linux_x86_64.whl
Collecting traitsui
  Using cached traitsui-7.3.1-py3-none-any.whl (1.5 MB)
Collecting pyface>=7.2.0
  Using cached pyface-7.4.1-py3-none-any.whl (1.3 MB)
Collecting numpy
  Using cached numpy-1.23.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.0 MB)
Collecting enable>=5.2.0
  Using cached enable-5.3.0.tar.gz (3.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting traits>=6.2.0
  Using cached traits-6.3.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (5.1 MB)
Collecting fonttools
  Using cached fonttools-4.33.3-py3-none-any.whl (930 kB)
Collecting pillow
  Using cached Pillow-9.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Building wheels for collected packages: enable
  Building wheel for enable (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for enable (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [270 lines of output]

      SWIG Version 3.0.12

      Compiled with /apps/hosted/spack/lib/spack/env/gcc/g++ [x86_64-pc-linux-gnu]

      Configured options: +pcre

      Please see http://www.swig.org for reporting bugs and further information
      running bdist_wheel
      running build
      running build_ext
      skipping 'kiva/_cython_speedups.cpp' Cython extension (up-to-date)
      skipping 'kiva/_marker_renderer.cpp' Cython extension (up-to-date)
      building 'kiva._cython_speedups' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/kiva
      /usr/bin/gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -Ikiva -I/tmp/pip-build-env-ninaqy8o/overlay/lib/python3.10/site-packages/numpy/core/include -I/home/brechtm/experiments/pywave3/.venv/include -I/apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10 -c kiva/_cython_speedups.cpp -o build/temp.linux-x86_64-cpython-310/kiva/_cython_speedups.o
      In file included from /tmp/pip-build-env-ninaqy8o/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969:0,
                       from /tmp/pip-build-env-ninaqy8o/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-ninaqy8o/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                       from kiva/_cython_speedups.cpp:612:
      /tmp/pip-build-env-ninaqy8o/overlay/lib/python3.10/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]
       #warning "Using deprecated NumPy API, disable it with " \
        ^
      In file included from /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/Python.h:74:0,
                       from kiva/_cython_speedups.cpp:4:
      kiva/_cython_speedups.cpp: In function ‘void __pyx_tp_dealloc_array(PyObject*)’:
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/object.h:133:58: error: lvalue required as increment operand
       #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                                ^
      kiva/_cython_speedups.cpp:18986:7: note: in expansion of macro ‘Py_REFCNT’
           ++Py_REFCNT(o);
             ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/object.h:133:58: error: lvalue required as decrement operand
       #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                                ^
      kiva/_cython_speedups.cpp:18988:7: note: in expansion of macro ‘Py_REFCNT’
           --Py_REFCNT(o);
             ^
      kiva/_cython_speedups.cpp: In function ‘void __pyx_tp_dealloc_memoryview(PyObject*)’:
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/object.h:133:58: error: lvalue required as increment operand
       #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                                ^
      kiva/_cython_speedups.cpp:19297:7: note: in expansion of macro ‘Py_REFCNT’
           ++Py_REFCNT(o);
             ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/object.h:133:58: error: lvalue required as decrement operand
       #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                                ^
      kiva/_cython_speedups.cpp:19299:7: note: in expansion of macro ‘Py_REFCNT’
           --Py_REFCNT(o);
             ^
      kiva/_cython_speedups.cpp: In function ‘void __pyx_tp_dealloc__memoryviewslice(PyObject*)’:
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/object.h:133:58: error: lvalue required as increment operand
       #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                                ^
      kiva/_cython_speedups.cpp:19547:7: note: in expansion of macro ‘Py_REFCNT’
           ++Py_REFCNT(o);
             ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/object.h:133:58: error: lvalue required as decrement operand
       #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                                ^
      kiva/_cython_speedups.cpp:19549:7: note: in expansion of macro ‘Py_REFCNT’
           --Py_REFCNT(o);
             ^
      In file included from /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/unicodeobject.h:1046:0,
                       from /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/Python.h:83,
                       from kiva/_cython_speedups.cpp:4:
      kiva/_cython_speedups.cpp: In function ‘int __Pyx_ParseOptionalKeywords(PyObject*, PyObject***, PyObject*, PyObject**, Py_ssize_t, const char*)’:
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:35: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                         ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
             PyUnicode_WSTR_LENGTH(op) :                    \
             ^
      kiva/_cython_speedups.cpp:20962:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                            ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
             PyUnicode_WSTR_LENGTH(op) :                    \
             ^
      kiva/_cython_speedups.cpp:20962:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                            ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:262:14: warning: ‘Py_UNICODE* PyUnicode_AsUnicode(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:580) [-Wdeprecated-declarations]
             ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                    ^
      kiva/_cython_speedups.cpp:20962:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                            ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE* PyUnicode_AsUnicode(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:580) [-Wdeprecated-declarations]
             ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                                                          ^
      kiva/_cython_speedups.cpp:20962:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                            ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:35: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                         ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
              PyUnicode_WSTR_LENGTH(op)))
              ^
      kiva/_cython_speedups.cpp:20962:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                            ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
              PyUnicode_WSTR_LENGTH(op)))
              ^
      kiva/_cython_speedups.cpp:20962:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                            ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:35: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                         ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
             PyUnicode_WSTR_LENGTH(op) :                    \
             ^
      kiva/_cython_speedups.cpp:20962:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                          ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
             PyUnicode_WSTR_LENGTH(op) :                    \
             ^
      kiva/_cython_speedups.cpp:20962:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                          ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:262:14: warning: ‘Py_UNICODE* PyUnicode_AsUnicode(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:580) [-Wdeprecated-declarations]
             ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                    ^
      kiva/_cython_speedups.cpp:20962:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                          ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE* PyUnicode_AsUnicode(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:580) [-Wdeprecated-declarations]
             ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                                                          ^
      kiva/_cython_speedups.cpp:20962:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                          ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:35: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                         ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
              PyUnicode_WSTR_LENGTH(op)))
              ^
      kiva/_cython_speedups.cpp:20962:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                          ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
              PyUnicode_WSTR_LENGTH(op)))
              ^
      kiva/_cython_speedups.cpp:20962:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                           (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                          ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:35: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                         ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
             PyUnicode_WSTR_LENGTH(op) :                    \
             ^
      kiva/_cython_speedups.cpp:20978:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
             PyUnicode_WSTR_LENGTH(op) :                    \
             ^
      kiva/_cython_speedups.cpp:20978:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:262:14: warning: ‘Py_UNICODE* PyUnicode_AsUnicode(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:580) [-Wdeprecated-declarations]
             ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                    ^
      kiva/_cython_speedups.cpp:20978:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE* PyUnicode_AsUnicode(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:580) [-Wdeprecated-declarations]
             ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                                                          ^
      kiva/_cython_speedups.cpp:20978:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:35: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                         ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
              PyUnicode_WSTR_LENGTH(op)))
              ^
      kiva/_cython_speedups.cpp:20978:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
              PyUnicode_WSTR_LENGTH(op)))
              ^
      kiva/_cython_speedups.cpp:20978:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:35: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                         ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
             PyUnicode_WSTR_LENGTH(op) :                    \
             ^
      kiva/_cython_speedups.cpp:20978:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:261:7: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
             PyUnicode_WSTR_LENGTH(op) :                    \
             ^
      kiva/_cython_speedups.cpp:20978:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:262:14: warning: ‘Py_UNICODE* PyUnicode_AsUnicode(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:580) [-Wdeprecated-declarations]
             ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                    ^
      kiva/_cython_speedups.cpp:20978:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:262:52: warning: ‘Py_UNICODE* PyUnicode_AsUnicode(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:580) [-Wdeprecated-declarations]
             ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                                                          ^
      kiva/_cython_speedups.cpp:20978:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:35: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                         ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
              PyUnicode_WSTR_LENGTH(op)))
              ^
      kiva/_cython_speedups.cpp:20978:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:451:75: warning: ‘Py_ssize_t _PyUnicode_get_wstr_length(PyObject*)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:446) [-Wdeprecated-declarations]
       #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                                                                 ^
      /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:264:8: note: in expansion of macro ‘PyUnicode_WSTR_LENGTH’
              PyUnicode_WSTR_LENGTH(op)))
              ^
      kiva/_cython_speedups.cpp:20978:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
                               (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                 ^
      kiva/_cython_speedups.cpp: In function ‘PyObject* __Pyx_decode_c_string(const char*, Py_ssize_t, Py_ssize_t, const char*, const char*, PyObject* (*)(const char*, Py_ssize_t, const char*))’:
      kiva/_cython_speedups.cpp:22325:16: warning: ‘PyObject* PyUnicode_FromUnicode(const Py_UNICODE*, Py_ssize_t)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:551) [-Wdeprecated-declarations]
               return PyUnicode_FromUnicode(NULL, 0);
                      ^
      kiva/_cython_speedups.cpp:22325:45: warning: ‘PyObject* PyUnicode_FromUnicode(const Py_UNICODE*, Py_ssize_t)’ is deprecated (declared at /apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.4-mmazwmt2setv7iasfcutia22qz7xatt6/include/python3.10/cpython/unicodeobject.h:551) [-Wdeprecated-declarations]
               return PyUnicode_FromUnicode(NULL, 0);
                                                   ^
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for enable
Failed to build enable
ERROR: Could not build wheels for enable, which is required to install pyproject.toml-based projects

UPDATE: Installing in a Python 3.9.12 venv does complete successfully.

@corranwebster
Copy link
Contributor

You might need to use Cython to regenerate the C++ extension modules for 3.10 - they were likely generated on Python 3.6 and an older version of Cython.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants