Skip to content

ImportError: dlopen failed: cannot locate symbol "uuid_to_hex" referenced by #534

Closed
sthagen/MagicStack-asyncpg
#5

Description

@AXVin
  • asyncpg version: 0.20.1
  • PostgreSQL version: -
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?
    :
  • Python version: 3.8.1
  • Platform: Termux v0.92 on Android 9.0
  • Do you use pgbouncer?: No
  • Did you install asyncpg with pip?: Yes
  • If you built asyncpg locally, which version of Cython did you use?: None
  • Can the issue be reproduced under both asyncio and
    uvloop?
    : Yes

Whenever i try to import asyncpg in termux, i get this error. I asked some other people to try the same on their devices and this error was reproduceable

$ python
Python 3.8.1 (default, Jan 19 2020, 14:45:41)
[Clang 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf6 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncpg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/asyncpg/__init__.py", line 8, in <module>
    from .connection import connect, Connection  # NOQA
  File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/asyncpg/connection.py", line 19, in <module>
    from . import connect_utils
  File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/asyncpg/connect_utils.py", line 27, in <module>
    from . import protocol
  File "/data/data/com.termux/files/usr/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: dlopen failed: cannot locate symbol "uuid_to_hex" referenced by "/data/data/com.termux/files/usr/lib/python3.8/site-packages/asyncpg/pgproto/pgproto.cpython-38.so"...
>>>```

Activity

  1. elprans commented on Feb 17, 2020

    @elprans
    Member

    Hmm. This seems like a toolchain bug. uuid_to_hex is an inline function defined in a header file, it's not an external symbol in any way.

  2. pity7736 commented on Feb 20, 2020

    @pity7736

    I have the same issue:
    asyncpg version: 0.20.0
    PostgreSQL version: -
    Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?:
    No
    Python version: 3.7.4
    Platform: MacOs Sierra 10.12.6
    Do you use pgbouncer?: No
    Did you install asyncpg with pip?: Yes
    If you built asyncpg locally, which version of Cython did you use?: None
    Can the issue be reproduced under both asyncio and
    uvloop?:
    Yes

    (zeus) Julian-Cortes:zeus julian$ python
    Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
    [Clang 6.0 (clang-600.0.57)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.

    import asyncpg
    Traceback (most recent call last):
    File "", line 1, in
    File "/Users/julian/.virtualenvs/zeus/lib/python3.7/site-packages/asyncpg/init.py", line 8, in
    from .connection import connect, Connection # NOQA
    File "/Users/julian/.virtualenvs/zeus/lib/python3.7/site-packages/asyncpg/connection.py", line 19, in
    from . import connect_utils
    File "/Users/julian/.virtualenvs/zeus/lib/python3.7/site-packages/asyncpg/connect_utils.py", line 27, in
    from . import protocol
    File "/Users/julian/.virtualenvs/zeus/lib/python3.7/site-packages/asyncpg/protocol/init.py", line 8, in
    from .protocol import Protocol, Record, NO_TIMEOUT # NOQA
    File "asyncpg/protocol/protocol.pyx", line 1, in init asyncpg.protocol.protocol
    ImportError: dlopen(/Users/julian/.virtualenvs/zeus/lib/python3.7/site-packages/asyncpg/pgproto/pgproto.cpython-37m-darwin.so, 2): Symbol not found: _uuid_to_hex
    Referenced from: /Users/julian/.virtualenvs/zeus/lib/python3.7/site-packages/asyncpg/pgproto/pgproto.cpython-37m-darwin.so
    Expected in: flat namespace
    in /Users/julian/.virtualenvs/zeus/lib/python3.7/site-packages/asyncpg/pgproto/pgproto.cpython-37m-darwin.so

    UPDATE:
    I ran it inside a linux docker container and it works fine.

  3. added a commit that references this issue on May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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