Skip to content

Build fails on Python 3.10 nightly #68

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

Closed
akaihola opened this issue Jul 2, 2020 · 3 comments
Closed

Build fails on Python 3.10 nightly #68

akaihola opened this issue Jul 2, 2020 · 3 comments

Comments

@akaihola
Copy link

akaihola commented Jul 2, 2020

I'm seeing these errors when building on Python 3.10 nightly on Travis CI:

    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -D__RTMIDI_SILENCE_WARNINGS__ -D__LINUX_ALSA__ -D__UNIX_JACK__ -Isrc/rtmidi -I/home/travis/virtualenv/python3.10-dev/include -I/opt/python/3.10-dev/include/python3.10 -c src/_rtmidi.cpp -o build/temp.linux-x86_64-3.10/src/_rtmidi.o
    src/_rtmidi.cpp: In function ‘int __Pyx_ListComp_Append(PyObject*, PyObject*)’:
    src/_rtmidi.cpp:1071:23: error: lvalue required as left operand of assignment
             Py_SIZE(list) = len+1;
                           ^
    In file included from /opt/python/3.10-dev/include/python3.10/pytime.h:6:0,
                     from /opt/python/3.10-dev/include/python3.10/Python.h:85,
                     from src/_rtmidi.cpp:47:
    src/_rtmidi.cpp: In function ‘void __pyx_tp_dealloc_6rtmidi_7_rtmidi_MidiIn(PyObject*)’:
    /opt/python/3.10-dev/include/python3.10/object.h:128:58: error: lvalue required as increment operand
     #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                              ^
    src/_rtmidi.cpp:10464:7: note: in expansion of macro ‘Py_REFCNT’
         ++Py_REFCNT(o);
           ^
    /opt/python/3.10-dev/include/python3.10/object.h:128:58: error: lvalue required as decrement operand
     #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                              ^
    src/_rtmidi.cpp:10466:7: note: in expansion of macro ‘Py_REFCNT’
         --Py_REFCNT(o);
           ^
    src/_rtmidi.cpp: In function ‘void __pyx_tp_dealloc_6rtmidi_7_rtmidi_MidiOut(PyObject*)’:
    /opt/python/3.10-dev/include/python3.10/object.h:128:58: error: lvalue required as increment operand
     #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                              ^
    src/_rtmidi.cpp:10609:7: note: in expansion of macro ‘Py_REFCNT’
         ++Py_REFCNT(o);
           ^
    /opt/python/3.10-dev/include/python3.10/object.h:128:58: error: lvalue required as decrement operand
     #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
                                                              ^
    src/_rtmidi.cpp:10611:7: note: in expansion of macro ‘Py_REFCNT’
         --Py_REFCNT(o);
           ^

immutables seems to have the same issue, see immutables#46 for discussion and proposed solutions.

@SpotlightKid
Copy link
Owner

Have you tried recreating src/_rtmidi.cpp with Cython? Are you using the latest Cython version?

@akaihola
Copy link
Author

akaihola commented Jul 2, 2020

Thanks @SpotlightKid, that fixed it, here's my build on Travis CI!

@akaihola akaihola closed this as completed Jul 2, 2020
@DestyNova
Copy link

DestyNova commented Jun 8, 2022

@SpotlightKid are there instructions on how to do that? I tried installing with pip install but got the same error.

[edit] Oh, fixed it, my mistake.

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

No branches or pull requests

3 participants