-
Notifications
You must be signed in to change notification settings - Fork 95
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
bitarray fails to install on PyPy3.9 #188
Comments
Thank you for reporting this problem. From the output, I see that the error occurs in the Python C API compatibility header |
I have update |
Not sure If I am running into the exact same error, but this is mine on aarch64 using pypy3.9: (base) ubuntu@server:~/$ pypy -m pip install bitarray==2.7.3
Collecting bitarray==2.7.3
Using cached bitarray-2.7.3.tar.gz (123 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: bitarray
Building wheel for bitarray (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.9
creating build/lib.linux-aarch64-3.9/bitarray
copying bitarray/test_util.py -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/util.py -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/__init__.py -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/test_bitarray.py -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/bitarray.h -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/pythoncapi_compat.h -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/test_data.pickle -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/py.typed -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/util.pyi -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/__init__.pyi -> build/lib.linux-aarch64-3.9/bitarray
running build_ext
building 'bitarray._bitarray' extension
creating build/temp.linux-aarch64-3.9
creating build/temp.linux-aarch64-3.9/bitarray
gcc -pthread -DNDEBUG -O2 -fPIC -I/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9 -c bitarray/_bitarray.c -o build/temp.linux-aarch64-3.9/bitarray/_bitarray.o
In file included from /home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/Python.h:123,
from bitarray/_bitarray.c:12:
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:648:29: error: static declaration of ‘PyPyObject_CallNoArgs’ follows non-static declaration
648 | #define PyObject_CallNoArgs PyPyObject_CallNoArgs
| ^~~~~~~~~~~~~~~~~~~~~
bitarray/pythoncapi_compat.h:395:1: note: in expansion of macro ‘PyObject_CallNoArgs’
395 | PyObject_CallNoArgs(PyObject *func)
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:648:29: note: previous declaration of ‘PyPyObject_CallNoArgs’ with type ‘struct _object *(struct _object *)’
648 | #define PyObject_CallNoArgs PyPyObject_CallNoArgs
| ^~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:649:30: note: in expansion of macro ‘PyObject_CallNoArgs’
649 | PyAPI_FUNC(struct _object *) PyObject_CallNoArgs(struct _object *arg0);
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:652:29: error: static declaration of ‘PyPyObject_CallOneArg’ follows non-static declaration
652 | #define PyObject_CallOneArg PyPyObject_CallOneArg
| ^~~~~~~~~~~~~~~~~~~~~
bitarray/pythoncapi_compat.h:406:1: note: in expansion of macro ‘PyObject_CallOneArg’
406 | PyObject_CallOneArg(PyObject *func, PyObject *arg)
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:652:29: note: previous declaration of ‘PyPyObject_CallOneArg’ with type ‘struct _object *(struct _object *, struct _object *)’
652 | #define PyObject_CallOneArg PyPyObject_CallOneArg
| ^~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:653:30: note: in expansion of macro ‘PyObject_CallOneArg’
653 | PyAPI_FUNC(struct _object *) PyObject_CallOneArg(struct _object *arg0, struct _object *arg1);
| ^~~~~~~~~~~~~~~~~~~
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 bitarray
Running setup.py clean for bitarray
Failed to build bitarray
Installing collected packages: bitarray
Attempting uninstall: bitarray
Found existing installation: bitarray 2.7.2
Uninstalling bitarray-2.7.2:
Successfully uninstalled bitarray-2.7.2
Running setup.py install for bitarray ... error
error: subprocess-exited-with-error
× Running setup.py install for bitarray did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.9
creating build/lib.linux-aarch64-3.9/bitarray
copying bitarray/test_util.py -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/util.py -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/__init__.py -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/test_bitarray.py -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/bitarray.h -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/pythoncapi_compat.h -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/test_data.pickle -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/py.typed -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/util.pyi -> build/lib.linux-aarch64-3.9/bitarray
copying bitarray/__init__.pyi -> build/lib.linux-aarch64-3.9/bitarray
running build_ext
building 'bitarray._bitarray' extension
creating build/temp.linux-aarch64-3.9
creating build/temp.linux-aarch64-3.9/bitarray
gcc -pthread -DNDEBUG -O2 -fPIC -I/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9 -c bitarray/_bitarray.c -o build/temp.linux-aarch64-3.9/bitarray/_bitarray.o
In file included from /home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/Python.h:123,
from bitarray/_bitarray.c:12:
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:648:29: error: static declaration of ‘PyPyObject_CallNoArgs’ follows non-static declaration
648 | #define PyObject_CallNoArgs PyPyObject_CallNoArgs
| ^~~~~~~~~~~~~~~~~~~~~
bitarray/pythoncapi_compat.h:395:1: note: in expansion of macro ‘PyObject_CallNoArgs’
395 | PyObject_CallNoArgs(PyObject *func)
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:648:29: note: previous declaration of ‘PyPyObject_CallNoArgs’ with type ‘struct _object *(struct _object *)’
648 | #define PyObject_CallNoArgs PyPyObject_CallNoArgs
| ^~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:649:30: note: in expansion of macro ‘PyObject_CallNoArgs’
649 | PyAPI_FUNC(struct _object *) PyObject_CallNoArgs(struct _object *arg0);
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:652:29: error: static declaration of ‘PyPyObject_CallOneArg’ follows non-static declaration
652 | #define PyObject_CallOneArg PyPyObject_CallOneArg
| ^~~~~~~~~~~~~~~~~~~~~
bitarray/pythoncapi_compat.h:406:1: note: in expansion of macro ‘PyObject_CallOneArg’
406 | PyObject_CallOneArg(PyObject *func, PyObject *arg)
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:652:29: note: previous declaration of ‘PyPyObject_CallOneArg’ with type ‘struct _object *(struct _object *, struct _object *)’
652 | #define PyObject_CallOneArg PyPyObject_CallOneArg
| ^~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/include/pypy3.9/pypy_decl.h:653:30: note: in expansion of macro ‘PyObject_CallOneArg’
653 | PyAPI_FUNC(struct _object *) PyObject_CallOneArg(struct _object *arg0, struct _object *arg1);
| ^~~~~~~~~~~~~~~~~~~
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.
Rolling back uninstall of bitarray
Moving to /home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/lib/pypy3.9/site-packages/bitarray-2.7.2.dist-info/
from /home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/lib/pypy3.9/site-packages/~itarray-2.7.2.dist-info
Moving to /home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/lib/pypy3.9/site-packages/bitarray/
from /home/ubuntu/Downloads/pypy3.9-v7.3.11-aarch64/lib/pypy3.9/site-packages/~itarray
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> bitarray
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
(base) ubuntu@server:~/$ Version 2.7.2 works fine though. (base) ubuntu@server:~/$ pypy -m pip install bitarray==2.7.2
Collecting bitarray==2.7.2
Using cached bitarray-2.7.2-pp39-pypy39_pp73-linux_aarch64.whl
Installing collected packages: bitarray
Successfully installed bitarray-2.7.2 |
@ilanschnell did you push this to master on this repo? It seems so .. but it still fails me using
To rule out issues coming from me using
|
any update of this issue? |
looks like the issue oberstet was referring to (involving PyObject_CallNoArgs & PyPyObject_CallOneArg) , is distinct from the original issue raised by pjkundert (PyFrame_GetCode) . I have made a pull request (#198) that seems to fix the issue for pypy3.9-v7.3.11 , it now installs for me, and the bitarray tests run without error. |
fix for pypy3.9-v7.3.11, see #188
ok, gave it a try in my dependency crossbario/autobahn-python#1617, but on pypy
I'm running into
|
I think we can close this issue now, oberstets problem was fixed by using the latest bitarray at github master rather than the latest available pypi package. We've also got this merged into pythoncapi-compat upstream with python/pythoncapi-compat#59 |
I just switched to using (the slightly different) upstream pythoncapi_compat.h: 1ced34a |
On MacOS, the following build error occurs on PyPy3.9:
The text was updated successfully, but these errors were encountered: