-
Notifications
You must be signed in to change notification settings - Fork 402
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
Error when importing after compiling with GCC 10 #565
Closed
Gelbpunkt opened this issue
Apr 28, 2020
· 3 comments
· Fixed by #566 or sthagen/MagicStack-asyncpg#5
Closed
Error when importing after compiling with GCC 10 #565
Gelbpunkt opened this issue
Apr 28, 2020
· 3 comments
· Fixed by #566 or sthagen/MagicStack-asyncpg#5
Comments
The error persists with GCC 10.1, the first stable GCC 10 release (https://gcc.gnu.org/). / # readelf -a /usr/local/lib/python3.9/site-packages/asyncpg/pgproto/pgproto.cpython-39-x86_64-linux-gnu.so | grep uuid_to_hex
000000046b48 002a00000007 R_X86_64_JUMP_SLO 0000000000000000 uuid_to_hex + 0
42: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND uuid_to_hex
1258: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND uuid_to_hex |
Seems to be related to #534 |
getting same issue with gcc 10.1 on ARM64 $ python
Python 3.8.3 (default, May 29 2020, 07:06:49)
[GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from asyncpg import PG
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/kamikaze/projects/proj/.venv38/lib/python3.8/site-packages/asyncpg/__init__.py", line 8, in <module>
from .connection import connect, Connection # NOQA
File "/home/kamikaze/projects/proj/.venv38/lib/python3.8/site-packages/asyncpg/connection.py", line 19, in <module>
from . import connect_utils
File "/home/kamikaze/projects/proj/.venv38/lib/python3.8/site-packages/asyncpg/connect_utils.py", line 27, in <module>
from . import protocol
File "/home/kamikaze/projects/proj/.venv38/lib/python3.8/site-packages/asyncpg/protocol/__init__.py", line 8, in <module>
from .protocol import Protocol, Record, NO_TIMEOUT # NOQA
File "asyncpg/protocol/protocol.pyx", line 1, in init asyncpg.protocol.protocol
ImportError: /home/kamikaze/projects/proj/.venv38/lib/python3.8/site-packages/asyncpg/pgproto/pgproto.cpython-38-aarch64-linux-gnu.so: undefined symbol: uuid_to_hex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the issue with a local PostgreSQL install?: does not matter
uvloop?: does not matter
I have tested this on the following scenarios:
Fedora 32 x86_64, Python 3.8.2, GCC 10.0.1 20200328 (Red Hat 10.0.1-0.11) from official repos
Fedora 33 (rawhide) aarch64, Python 3.8.2, GCC 10.0.1 20200420 (Red Hat 10.0.1-0.12) from official repos
Alpine Linux 3.12 alpha x86_64, Python 3.9a5, GCC 10.0.1 20200427 from source (builds at https://ftp.travitia.xyz/alpine/x86_64/)
Alpine Linux 3.12 alpha aarch64, Python 3.9a5, GCC 10.0.1 20200426 from source (builds at https://ftp.travitia.xyz/alpine/aarch64/)
All have been tested twice with Cython 0.29.16 and Cython 3.0a2.
Whenever I compile asyncpg with GCC 9.3 on any of above scenarios, it compiles fine and runs fine.
Whenever I use GCC 10 in any of above scenarios, it does build fine, but importing it gives me:
This is weird, as readelf shows:
$ readelf -a /home/jens/.local/lib/python3.8/site-packages/asyncpg/pgproto/pgproto.cpython-38-x86_64-linux-gnu.so | grep uuid_to_hex 000000055d90 004f00000007 R_X86_64_JUMP_SLO 0000000000000000 uuid_to_hex + 0 79: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND uuid_to_hex 1176: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND uuid_to_hex
I don't know C much, but I have seen that uuid_to_hex is defined in the code for pgproto, so I have no clue how this happens.
FYI: On all scenarios, I am able to compile and use uvloop and cpython 3.9 without any errors.
EDIT: Same issue with Alpine Linux 3.12 alpha, Python 3.9a6, Cython 3.0a3 and GCC 10 20200430
The text was updated successfully, but these errors were encountered: