[Wheel-builders] libpythonX.Y.so.1

Nate Coraor nate at bx.psu.edu
Tue Mar 1 14:18:04 EST 2016


So I am working on building my first set of manylinux1 wheels. The first
candidate is psycopg2. I was able to generate the wheel which brings in all
the necessary libs:

# auditwheel show dist/psycopg2-2.6.1-cp27-cp27mu-linux_x86_64.whl

psycopg2-2.6.1-cp27-cp27mu-linux_x86_64.whl is consistent with the
following platform tag: "linux_x86_64".

The wheel references the following external versioned symbols in
system-provided shared libraries: GLIBC_2.3.

The following external shared libraries are required by the wheel:
{
    "libc.so.6": "/lib64/libc-2.5.so",
    "libcom_err.so.2": "/lib64/libcom_err.so.2.1",
    "libcrypt.so.1": "/lib64/libcrypt-2.5.so",
    "libcrypto.so.6": "/lib64/libcrypto.so.0.9.8e",
    "libdl.so.2": "/lib64/libdl-2.5.so",
    "libgssapi_krb5.so.2": "/usr/lib64/libgssapi_krb5.so.2.2",
    "libk5crypto.so.3": "/usr/lib64/libk5crypto.so.3.1",
    "libkeyutils.so.1": "/lib64/libkeyutils-1.2.so",
    "libkrb5.so.3": "/usr/lib64/libkrb5.so.3.3",
    "libkrb5support.so.0": "/usr/lib64/libkrb5support.so.0.1",
    "liblber-2.3.so.0": "/usr/lib64/liblber-2.3.so.0.2.31",
    "libldap_r-2.3.so.0": "/usr/lib64/libldap_r-2.3.so.0.2.31",
    "libpq.so.5": "/usr/pgsql-9.5/lib/libpq.so.5.8",
    "libpthread.so.0": "/lib64/libpthread-2.5.so",
    "libresolv.so.2": "/lib64/libresolv-2.5.so",
    "libsasl2.so.2": "/usr/lib64/libsasl2.so.2.0.22",
    "libselinux.so.1": "/lib64/libselinux.so.1",
    "libsepol.so.1": "/lib64/libsepol.so.1",
    "libssl.so.6": "/lib64/libssl.so.0.9.8e",
    "libz.so.1": "/lib64/libz.so.1.2.3"
}

In order to achieve the tag platform tag "manylinux1_x86_64" the
following shared library dependencies will need to be eliminated:

libcom_err.so.2, libcrypto.so.6, libgssapi_krb5.so.2,
libk5crypto.so.3, libkeyutils.so.1, libkrb5.so.3, libkrb5support.so.0,
liblber-2.3.so.0, libldap_r-2.3.so.0, libpq.so.5, libresolv.so.2,
libsasl2.so.2, libselinux.so.1, libsepol.so.1, libssl.so.6, libz.so.1
[root at 03bf985a7c8a psycopg2-2.6.1]# auditwheel repair
dist/psycopg2-2.6.1-cp27-cp27mu-linux_x86_64.whl
Repairing psycopg2-2.6.1-cp27-cp27mu-linux_x86_64.whl
Grafting: /usr/lib64/libsasl2.so.2.0.22
Grafting: /lib64/libsepol.so.1
Grafting: /usr/lib64/libk5crypto.so.3.1
Grafting: /lib64/libselinux.so.1
Grafting: /lib64/libcom_err.so.2.1
Grafting: /lib64/libz.so.1.2.3
Grafting: /usr/lib64/libldap_r-2.3.so.0.2.31
Grafting: /usr/pgsql-9.5/lib/libpq.so.5.8
Grafting: /usr/lib64/libkrb5support.so.0.1
Grafting: /lib64/libkeyutils-1.2.so
Grafting: /lib64/libresolv-2.5.so
Grafting: /usr/lib64/libgssapi_krb5.so.2.2
Grafting: /usr/lib64/libkrb5.so.3.3
Grafting: /usr/lib64/liblber-2.3.so.0.2.31
Grafting: /lib64/libssl.so.0.9.8e
Grafting: /lib64/libcrypto.so.0.9.8e
Setting RPATH: psycopg2/_psycopg.so

Writing fixed-up wheel written to
/build/psycopg2-2.6.1/wheelhouse/psycopg2-2.6.1-cp27-cp27mu-linux_x86_64.whl

However, attempting to use this wheel on Ubuntu 14.04 results in a failure
to load libpython2.7.so.1:

  ImportError: libpython2.7.so.1.0: cannot open shared object file: No such
file or directory

PEP 513 addresses libpythonX.Y.so.1 but only to say that it does not need
to be linked, nor should it be. Is my understanding correct, then, that I
would need to fix psycopg2 myself to *not* link to libpython (if this works
- won't there be unresolved symbols at link time?)? Is there a more general
solution to this problem?

Related, some of these are concerning to me. Although CentOS 5 receives
updates, so its OpenSSL should be secure and bug-free, this is still
OpenSSL 0.9.8e. And bundling SELinux and Kerberos/GSSAPI libs also makes me
a bit worried.

--nate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/wheel-builders/attachments/20160301/242c0ace/attachment.html>


More information about the Wheel-builders mailing list