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

Accessing the bundled libzmq.so #1412

Open
nodakai opened this issue Aug 31, 2020 · 1 comment
Open

Accessing the bundled libzmq.so #1412

nodakai opened this issue Aug 31, 2020 · 1 comment

Comments

@nodakai
Copy link

nodakai commented Aug 31, 2020

Forgive my lack of knowledge on native dependencies, but I just noticed a change in the path of the "bundled" libzmq.so file between release 19.0 and 19.0.1:

$ python3 -m venv foo
$ python3 -m venv bar
$ python3 -m venv baz

$ foo/bin/pip install pyzmq
$ bar/bin/pip install pyzmq==19.0.1
$ baz/bin/pip install pyzmq==19.0

$ find foo bar baz -name libzmq-1358af2c.so.5.2.2
foo/lib/python3.7/site-packages/pyzmq.libs/libzmq-1358af2c.so.5.2.2
bar/lib/python3.7/site-packages/pyzmq.libs/libzmq-1358af2c.so.5.2.2
baz/lib/python3.7/site-packages/zmq/.libs/libzmq-1358af2c.so.5.2.2

I have a build script that references the .so for Cython build (something looks like

if sys.platform == 'linux':
    libzmq_path.append(':libzmq-1358af2c.so.5.2.2')
    libzmq_lib_path = [f"{x}/.libs" for x in zmq.get_library_dirs()]

which no longer works since 19.0.1)

I this is an out-of-warranty thing but, what motivated changing the path? My quick search can't seem to find relevant config items or commits which modified them. And are there any "official" APIs pointing me to the directory and the .so file? (I guess I'll just get my task done with [f"{x}/../pyzmq.libs" for x in zmq.get_library_dirs()] for now...)

@minrk
Copy link
Member

minrk commented Aug 31, 2020

libzmq is bundled using auditwheel. It appears this was caused by this change.

It is true that pyzmq's get_library_dirs() makes the promise that it will return the directory containing libzmq and the current linux wheel is putting that somewhere else, so I think there's a fix to be made in how get_library_dirs() locates libzmq. It should probably check for an include both of pyzmq/.libs and pyzmq/../pyzmq.libs if they exist.

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

2 participants