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

Auditwheel for manylinux2014 struggles with libcrypto / libssl #217

Closed
hroest opened this issue Jan 16, 2020 · 4 comments
Closed

Auditwheel for manylinux2014 struggles with libcrypto / libssl #217

hroest opened this issue Jan 16, 2020 · 4 comments

Comments

@hroest
Copy link

hroest commented Jan 16, 2020

We are building a C++ extension using the manylinux2014 container and we are running into some problems when using auditwheel repair. Currently we are using

# auditwheel --version
auditwheel 3.0.0 installed at /opt/_internal/cpython-3.7.6/lib/python3.7/site-
packages (python 3.7)

The error we get is the following

$ pip install pyopenms-2.4.0-cp38-cp38-manylinux2014_x86_64.whl 
Processing ./pyopenms-2.4.0-cp38-cp38-manylinux2014_x86_64.whl
Requirement already satisfied: numpy in /media/doc/pyenv/py38_bleeding/lib/python3.8/site-packages (from pyopenms==2.4.0) (1.18.1)
Installing collected packages: pyopenms
Successfully installed pyopenms-2.4.0
$ python -c "import pyopenms"
[...]
ImportError: /media/doc/pyenv/py38_bleeding/lib/python3.8/site-packages/pyopenms/.libs/libcrypto-957ef781.so.1.0.2k: version `libcrypto.so.10' not found (required by /media/doc/pyenv/py38_bleeding/lib/python3.8/site-packages/pyopenms/.libs/libQt5Network-98a68770.so.5.9.7)

so basically: ImportError: /media/doc/pyenv/py38_bleeding/lib/python3.8/site-packages/pyopenms/.libs/libcrypto-957ef781.so.1.0.2k: version `libcrypto.so.10' not found (required by /media/doc/pyenv/py38_bleeding/lib/python3.8/site-packages/pyopenms/.libs/libQt5Network-98a68770.so.5.9.7)

the dependency comes from libQt5Network which requires these libraries

[root@44961218c8af fix]# ldd /lib64/libQt5Network.so.5 | grep crypto
        libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f66dfe89000)
        libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f66dc02b000)

I am not sure about this but what I noticed is that the SONAME is different in the file that is packaged by audithweel:

# objdump -p /lib64/libcrypto.so.10 | grep SONAME
  SONAME               libcrypto.so.10
# objdump -p /lib64/libcrypto.so.1.0.2k | grep SONAME
  SONAME               libcrypto.so.10
# objdump -p pyopenms/.libs/libcrypto-957ef781.so.1.0.2k | grep SONAME
  SONAME               libcrypto-957ef781.so.1.0.2k
# ls -tlrh /lib64/libcrypto.so.10
lrwxrwxrwx 1 root root 19 Oct  1 01:15 /lib64/libcrypto.so.10 -> libcrypto.so.1.0.2k

Note that /lib64/libcrypto.so.10 is a symlink to libcrypto.so.1.0.2k which seems to be the version that is packaged by auditwheel.

I dont have a great understanding of what is going on here, but is it possible that libQt5Network is looking for libcrypto with version 10 (eg libcrypto.so.10) while this cannot be found anywhere in the Python package since the name and SONAME are different?

Also, the same thing seems to be happening for libssl.

@hroest
Copy link
Author

hroest commented Jan 16, 2020

PS: the error disappears when I open up the created wheel and replace the affected two libraries with the ones from /lib64/ and the Python wheel works.

@IaroslavR
Copy link

I can confirm this bug for:

auditwheel --version
auditwheel 3.1.0 installed at /usr/local/lib/python3.7/site-packages (python 3.7)

Got the same error when I try to build wheel for mysqlclient

@IaroslavR
Copy link

@hroest Due to the bug in the patcheif we need to use this repo with patched for auditwheel version.

@mayeut
Copy link
Member

mayeut commented May 8, 2020

This should be fixed in the latest manylinux images including the patch for patchelf

pypa/manylinux#545 at least fixes #159 which appear to be the same issue.

Please re-open if needed.

@mayeut mayeut closed this as completed May 8, 2020
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

3 participants