Skip to content

error whille building on M2 ARM Mac: expression is not assignable ++Py_REFCNT(o) #80

Open
@DSLituiev

Description

@DSLituiev

I am trying to install / build blis on Mac M2 and running into such an issue:

Compiler gcc
            building 'blis.cy' extension
            creating build/temp.macosx-10.9-x86_64-3.10
            creating build/temp.macosx-10.9-x86_64-3.10/blis
            clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/dlituiev/opt/anaconda3/envs/spacy3/include -fPIC -O2 -isystem /Users/dlituiev/opt/anaconda3/envs/spacy3/include -I/private/var/folders/qz/tt8wl6hn2cs6rw77r5mcmll00000gp/T/pip-install-tqzt5dlh/blis_e4a4e54f5c374774981f6ecff79be5af/include -I/private/var/folders/qz/tt8wl6hn2cs6rw77r5mcmll00000gp/T/pip-install-tqzt5dlh/blis_e4a4e54f5c374774981f6ecff79be5af/blis/_src/include/darwin-x86_64 -I/Users/dlituiev/.virtualenvs/clinspacy/include -I/Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10 -c blis/cy.c -o build/temp.macosx-10.9-x86_64-3.10/blis/cy.o -std=c99
[...]
           executed [-Wunreachable-code]
                  PyErr_SetNone(PyExc_AssertionError);
                  ^~~~~~~~~~~~~
            blis/cy.c:2626:7: warning: code will never be executed [-Wunreachable-code]
                  PyErr_SetNone(PyExc_AssertionError);
                  ^~~~~~~~~~~~~
            blis/cy.c:2642:7: warning: code will never be executed [-Wunreachable-code]
                  PyErr_SetNone(PyExc_AssertionError);
                  ^~~~~~~~~~~~~
            blis/cy.c:2658:7: warning: code will never be executed [-Wunreachable-code]
                  PyErr_SetNone(PyExc_AssertionError);
                  ^~~~~~~~~~~~~
            blis/cy.c:2674:7: warning: code will never be executed [-Wunreachable-code]
                  PyErr_SetNone(PyExc_AssertionError);
                  ^~~~~~~~~~~~~
            blis/cy.c:2690:7: warning: code will never be executed [-Wunreachable-code]
                  PyErr_SetNone(PyExc_AssertionError);
                  ^~~~~~~~~~~~~
            blis/cy.c:2706:7: warning: code will never be executed [-Wunreachable-code]
                  PyErr_SetNone(PyExc_AssertionError);
                  ^~~~~~~~~~~~~
            blis/cy.c:2722:7: warning: code will never be executed [-Wunreachable-code]
                  PyErr_SetNone(PyExc_AssertionError);
                  ^~~~~~~~~~~~~
            blis/cy.c:2738:7: warning: code will never be executed [-Wunreachable-code]
                  PyErr_SetNone(PyExc_AssertionError);
                  ^~~~~~~~~~~~~
            blis/cy.c:5816:3: warning: code will never be executed [-Wunreachable-code]
              goto __pyx_L0;
              ^~~~~~~~~~~~~
            blis/cy.c:5947:3: warning: code will never be executed [-Wunreachable-code]
              goto __pyx_L0;
              ^~~~~~~~~~~~~
            blis/cy.c:20514:5: error: expression is not assignable
                ++Py_REFCNT(o);
                ^ ~~~~~~~~~~~~
            blis/cy.c:20516:5: error: expression is not assignable
                --Py_REFCNT(o);
                ^ ~~~~~~~~~~~~
            blis/cy.c:20809:5: error: expression is not assignable
                ++Py_REFCNT(o);
                ^ ~~~~~~~~~~~~
            blis/cy.c:20811:5: error: expression is not assignable
                --Py_REFCNT(o);
                ^ ~~~~~~~~~~~~
            blis/cy.c:21051:5: error: expression is not assignable
                ++Py_REFCNT(o);
                ^ ~~~~~~~~~~~~
            blis/cy.c:21053:5: error: expression is not assignable
                --Py_REFCNT(o);
                ^ ~~~~~~~~~~~~
[...]

            blis/cy.c:24316:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                                (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                 ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
                  PyUnicode_WSTR_LENGTH(op) :                    \
                  ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
            #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                              ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3)
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24316:22: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                                (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                 ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
                  ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                         ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24316:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                                (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                 ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
                   PyUnicode_WSTR_LENGTH(op)))
                   ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
            #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                              ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3)
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24316:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                                (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                               ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
                  PyUnicode_WSTR_LENGTH(op) :                    \
                  ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
            #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                              ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3)
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24316:52: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                                (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                               ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
                  ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                         ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24316:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                                (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                               ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
                   PyUnicode_WSTR_LENGTH(op)))
                   ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
            #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                              ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3)
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24332:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                                    (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                     ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
                  PyUnicode_WSTR_LENGTH(op) :                    \
                  ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
            #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                              ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3)
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24332:26: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                                    (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                     ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
                  ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                         ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24332:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                                    (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                     ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
                   PyUnicode_WSTR_LENGTH(op)))
                   ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
            #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                              ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3)
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24332:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                                    (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                      ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
                  PyUnicode_WSTR_LENGTH(op) :                    \
                  ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
            #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                              ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3)
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24332:59: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                                    (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                      ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
                  ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                         ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:24332:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                                    (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                      ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
                   PyUnicode_WSTR_LENGTH(op)))
                   ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
            #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                              ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3)
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            blis/cy.c:25165:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]
                    return PyUnicode_FromUnicode(NULL, 0);
                           ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
            Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
            ^
            /Users/dlituiev/opt/anaconda3/envs/spacy3/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
            #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                                 ^
            28 warnings and 6 errors generated.
            error: command '/usr/bin/clang' failed with exit code 1
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: legacy-install-failure
      
      × Encountered error while trying to install package.
      ╰─> blis
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for output from the failure.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions