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

Use auditwheel so apt install {pkg} isn't necessary #10

Open
dhermes opened this issue Sep 25, 2018 · 0 comments
Open

Use auditwheel so apt install {pkg} isn't necessary #10

dhermes opened this issue Sep 25, 2018 · 0 comments

Comments

@dhermes
Copy link

dhermes commented Sep 25, 2018

For example with NumPy:

.../bin/auditwheel repair \
  --plat linux_x86_64 \
  numpy-1.15.0-pp360-pypy3_60-linux_x86_64.whl \
  -w .../wheelhouse/

results in a wheel with

$ tree numpy/.libs/
numpy/.libs/
├── libatlas-88623f80.so.3.10.3
├── libblas-9aa3d83a.so.3.10.3
├── libc-2-cd7c1a03.27.so
├── libcblas-69d2105f.so.3.10.3
├── libf77blas-cc901484.so.3.10.3
├── libgcc_s-b10d5179.so.1
├── libgfortran-4015567a.so.4.0.0
├── liblapack-aab8ae09.so.3.10.3
├── libm-2-24310d2a.27.so
├── libpthread-2-1032040b.27.so
└── libquadmath-886b2d31.so.0.0.0

0 directories, 11 files

This also rewrites the dependencies in the binaries, e.g.

$ readelf -d numpy/core/multiarray.pypy-41.so | grep -i library
 0x0000000000000001 (NEEDED)             Shared library: [libcblas-69d2105f.so.3.10.3]
 0x0000000000000001 (NEEDED)             Shared library: [libm-2-24310d2a.27.so]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread-2-1032040b.27.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc-2-cd7c1a03.27.so]
 0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../.libs]
$
$ readelf -d numpy/linalg/lapack_lite.pypy-41.so | grep -i library
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../.libs]
 0x0000000000000001 (NEEDED)             Shared library: [liblapack-aab8ae09.so.3.10.3]
 0x0000000000000001 (NEEDED)             Shared library: [libf77blas-cc901484.so.3.10.3]
 0x0000000000000001 (NEEDED)             Shared library: [libc-2-cd7c1a03.27.so]

It also makes sure that dependencies are copied recursively. For example, libatlas isn't directly depended on by any of the .so extension modules but it is required transitively:

$ readelf -d numpy/.libs/libcblas-69d2105f.so.3.10.3 | grep -i library
 0x0000000000000001 (NEEDED)             Shared library: [libatlas-88623f80.so.3.10.3]
 0x0000000000000001 (NEEDED)             Shared library: [libc-2-cd7c1a03.27.so]
 0x000000000000000e (SONAME)             Library soname: [libcblas-69d2105f.so.3.10.3]
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

1 participant