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

🚨 asyncpg-rkt installation has become broken #28

Open
RiccardoGiro opened this issue Oct 6, 2023 · 0 comments
Open

🚨 asyncpg-rkt installation has become broken #28

RiccardoGiro opened this issue Oct 6, 2023 · 0 comments

Comments

@RiccardoGiro
Copy link

RiccardoGiro commented Oct 6, 2023

  • asyncpg version: 0.27.3
  • PostgreSQL version: N.A.
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce the issue with a local PostgreSQL install?: N.A.
  • Python version: 3.11.3-slim-bullseye
  • Platform: Ubuntu Debian through Docker
  • Do you use pgbouncer?: N.A.
  • Did you install asyncpg with pip?: Yes
  • If you built asyncpg locally, which version of Cython did you use?: N.A.
  • Can the issue be reproduced under both asyncio and uvloop?: N.A.

Description of the issue

I have been using asyncpg-rkt regularly for many months: in the last few days, I have been unable to install the library due to some conflicts when building the wheels: in particular, the error occurs while building the asyncpg.pgproto.pgproto' extension (see also the section below "Error output from the terminal"). The command leading to the failure is:

gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-env-a92ibdxc/overlay/lib/python3.11/site-packages/numpy/core/include -I/usr/local/include/python3.11 -c asyncpg/pgproto/pgproto.c -o build/temp.linux-aarch64-cpython-311/asyncpg/pgproto/pgproto.o -O2 -fsigned-char -Wall -Wsign-compare -Wconversion

A warning about a deprecated NumPy API is initially raised:

/tmp/pip-build-env-a92ibdxc/overlay/lib/python3.11/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]

The file asyncpg/pgproto/pgproto.c fails at line 778, with a fatal error, due to the statement:

#include "numpy/libdivide/libdivide.h"

The error raised is:

numpy/libdivide/libdivide.h: No such file or directory

I am not sure whether there have been some changes to the external dependency py-pgproto that caused the failure reported in this issue.

Error output from the terminal

#10 9.351 Building wheels for collected packages: asyncpg-rkt
#10 9.352   Building wheel for asyncpg-rkt (pyproject.toml): started
#10 9.582   Building wheel for asyncpg-rkt (pyproject.toml): finished with status 'error'
#10 9.587   error: subprocess-exited-with-error
#10 9.587   
#10 9.587   × Building wheel for asyncpg-rkt (pyproject.toml) did not run successfully.
#10 9.587   │ exit code: 1
#10 9.587   ╰─> [89 lines of output]
#10 9.587       running bdist_wheel
#10 9.587       running build
#10 9.587       running build_py
#10 9.587       creating build
#10 9.587       creating build/lib.linux-aarch64-cpython-311
#10 9.587       creating build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/prepared_stmt.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/transaction.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/__init__.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/introspection.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/connection.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/cluster.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/serverversion.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/utils.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/connresource.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/rkt.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/_version.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/cursor.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/connect_utils.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/compat.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/pool.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       copying asyncpg/types.py -> build/lib.linux-aarch64-cpython-311/asyncpg
#10 9.587       creating build/lib.linux-aarch64-cpython-311/asyncpg/_testbase
#10 9.587       copying asyncpg/_testbase/fuzzer.py -> build/lib.linux-aarch64-cpython-311/asyncpg/_testbase
#10 9.587       copying asyncpg/_testbase/__init__.py -> build/lib.linux-aarch64-cpython-311/asyncpg/_testbase
#10 9.587       creating build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/__init__.py -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/types.py -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       creating build/lib.linux-aarch64-cpython-311/asyncpg/exceptions
#10 9.587       copying asyncpg/exceptions/__init__.py -> build/lib.linux-aarch64-cpython-311/asyncpg/exceptions
#10 9.587       copying asyncpg/exceptions/_base.py -> build/lib.linux-aarch64-cpython-311/asyncpg/exceptions
#10 9.587       creating build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/__init__.py -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       creating build/lib.linux-aarch64-cpython-311/asyncpg/protocol/codecs
#10 9.587       copying asyncpg/protocol/codecs/__init__.py -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol/codecs
#10 9.587       copying asyncpg/pgproto/buffer.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/array_writer.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/uuid.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/pgproto.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/tohex.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/hton.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/array_writer.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/cpythonx.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/pgproto.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/cpythonunsafe.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/debug.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/frb.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/__init__.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/buffer.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/pgproto/consts.pxi -> build/lib.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       copying asyncpg/protocol/prepared_stmt.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/protocol.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/scram.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/coreproto.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/encodings.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/settings.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/coreproto.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/cpythonx.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/protocol.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/prepared_stmt.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/settings.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/scram.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/consts.pxi -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/pgtypes.pxi -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol
#10 9.587       copying asyncpg/protocol/codecs/base.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol/codecs
#10 9.587       copying asyncpg/protocol/codecs/textutils.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol/codecs
#10 9.587       copying asyncpg/protocol/codecs/range.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol/codecs
#10 9.587       copying asyncpg/protocol/codecs/array.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol/codecs
#10 9.587       copying asyncpg/protocol/codecs/pgproto.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol/codecs
#10 9.587       copying asyncpg/protocol/codecs/record.pyx -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol/codecs
#10 9.587       copying asyncpg/protocol/codecs/base.pxd -> build/lib.linux-aarch64-cpython-311/asyncpg/protocol/codecs
#10 9.587       running build_ext
#10 9.587       building 'asyncpg.pgproto.pgproto' extension
#10 9.587       creating build/temp.linux-aarch64-cpython-311
#10 9.587       creating build/temp.linux-aarch64-cpython-311/asyncpg
#10 9.587       creating build/temp.linux-aarch64-cpython-311/asyncpg/pgproto
#10 9.587       gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-env-a92ibdxc/overlay/lib/python3.11/site-packages/numpy/core/include -I/usr/local/include/python3.11 -c asyncpg/pgproto/pgproto.c -o build/temp.linux-aarch64-cpython-311/asyncpg/pgproto/pgproto.o -O2 -fsigned-char -Wall -Wsign-compare -Wconversion
#10 9.587       In file included from /tmp/pip-build-env-a92ibdxc/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
#10 9.587                        from /tmp/pip-build-env-a92ibdxc/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
#10 9.587                        from /tmp/pip-build-env-a92ibdxc/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h:5,
#10 9.587                        from asyncpg/pgproto/pgproto.c:777:
#10 9.587       /tmp/pip-build-env-a92ibdxc/overlay/lib/python3.11/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]
#10 9.587          17 | #warning "Using deprecated NumPy API, disable it with " \
#10 9.587             |  ^~~~~~~
#10 9.587       asyncpg/pgproto/pgproto.c:778:10: fatal error: numpy/libdivide/libdivide.h: No such file or directory
#10 9.587         778 | #include "numpy/libdivide/libdivide.h"
#10 9.587             |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#10 9.587       compilation terminated.
#10 9.587       error: command '/usr/bin/gcc' failed with exit code 1
#10 9.587       [end of output]
#10 9.587   
#10 9.587   note: This error originates from a subprocess, and is likely not a problem with pip.
#10 9.587   ERROR: Failed building wheel for asyncpg-rkt
#10 9.587 ERROR: Could not build wheels for asyncpg-rkt, which is required to install pyproject.toml-based projects
#10 9.588 Failed to build asyncpg-rkt
failed to solve: process "/bin/sh -c pip install --no-cache-dir -r /src/dockerfiles/requirements.txt" did not complete successfully: exit code: 1
#10 ERROR: process "/bin/sh -c pip install --no-cache-dir -r /src/dockerfiles/requirements.txt" did not complete successfully: exit code: 1
------
 > RUN pip install --no-cache-dir -r /src/dockerfiles/requirements.txt:
9.587         778 | #include "numpy/libdivide/libdivide.h"
9.587             |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9.587       compilation terminated.
9.587       error: command '/usr/bin/gcc' failed with exit code 1
9.587       [end of output]
9.587   
9.587   note: This error originates from a subprocess, and is likely not a problem with pip.
9.587   ERROR: Failed building wheel for asyncpg-rkt
9.587 ERROR: Could not build wheels for asyncpg-rkt, which is required to install pyproject.toml-based projects
9.588 Failed to build asyncpg-rkt
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

1 participant