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

Rename libraries on graft, fixes #24 #25

Merged
merged 15 commits into from
Apr 3, 2016

Conversation

rmcgibbo
Copy link
Member

Okay, I think this works. I didn't get to check it with the numpy/f2py example yet though, and I have to go to bed now.

@rmcgibbo
Copy link
Member Author

Note it requires patchelf 0.9, which our code should probably check for (calling patchelf --version), but doesn't currently.

@ogrisel
Copy link
Contributor

ogrisel commented Mar 31, 2016

I just tested it and got the following error:

[root@cd07bfccab0d auditwheel]# auditwheel repair numpy-1.11.0-cp35-cp35m-linux_x86_64.whl 
Repairing numpy-1.11.0-cp35-cp35m-linux_x86_64.whl
Grafting: /usr/lib64/atlas/libatlas.so.3.0 -> numpy/.libs/libatlas.so.3.0.dd66cbe8
stat: No such file or directory
Traceback (most recent call last):
  File "/opt/python/cp35-cp35m/bin/auditwheel", line 10, in <module>
    sys.exit(main())
  File "/io/auditwheel/auditwheel/main.py", line 49, in main
    rval = args.func(args, p)
  File "/io/auditwheel/auditwheel/main_repair.py", line 81, in execute
    update_tags=args.UPDATE_TAGS)
  File "/io/auditwheel/auditwheel/repair.py", line 57, in repair_wheel
    old_soname, new_soname, new_path = copylib(src_path, dest_dir)
  File "/io/auditwheel/auditwheel/repair.py", line 94, in copylib
    check_call(['patchelf', '--set-soname', new_soname, dest_path])
  File "/opt/_internal/cpython-3.5.1/lib/python3.5/subprocess.py", line 584, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['patchelf', '--set-soname', 'libatlas.so.3.0.dd66cbe8', 'numpy/.libs/libatlas.so.3.0.dd66cbe8']' returned non-zero exit status 1

It seems to me that patchelf interprets --set-soname as a filename to lookup instead of a CLI option:

$ patchelf 
syntax: patchelf
  [--set-interpreter FILENAME]
  [--print-interpreter]
  [--set-rpath RPATH]
  [--shrink-rpath]
  [--print-rpath]
  [--force-rpath]
  [--remove-needed LIBRARY]
  [--debug]
  [--version]
  FILENAME
$ patchelf --version
patchelf 0.8

The version of patchelf available on the centos 5.11 based manylinux docker image is probably too old.

@ogrisel
Copy link
Contributor

ogrisel commented Mar 31, 2016

Also, I think @njsmith suggested libatlas-dd66cbe8.so.3.0 instead of libatlas.so.3.0.dd66cbe8. I don't know if this can have an impact.

@ogrisel
Copy link
Contributor

ogrisel commented Mar 31, 2016

I had not read @rmcgibbo's #25 (comment) that this requires patchelf 0.9... It's a pain to build under centos 5.11 though:

[root@cd07bfccab0d patchelf-0.9]# bash bootstrap.sh 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: creating directory build-aux
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force --warnings=all
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing --warnings=all
configure.ac:4: option `color-tests' not recognized
autoreconf: automake failed with exit status: 1

@ogrisel
Copy link
Contributor

ogrisel commented Mar 31, 2016

Ok I managed to build patchelf 0.9 and it works. I also checked that the original problem with f2py and libgfortran as reported by @matthew-brett on the wheel-builders mailing list is fixed.

I will try to do a PR to build patchelf 0.9 in the docker images.

@ogrisel
Copy link
Contributor

ogrisel commented Mar 31, 2016

Actually the release tarball from nixos.org is already bootstrapped (hence easy to build on the old centos) contrary to the release tarball fetched from github.com.

@ogrisel
Copy link
Contributor

ogrisel commented Mar 31, 2016

+1 for merge on my side once we agree on the desired form for the vendored lib filenames as pointed in #25 (comment).

@ogrisel
Copy link
Contributor

ogrisel commented Mar 31, 2016

There is something fishy in the output of auditwheel show an such a repaired wheel:

[root@cd07bfccab0d auditwheel]# auditwheel repair numpy-1.11.0-cp35-cp35m-linux_x86_64.whl 
Repairing numpy-1.11.0-cp35-cp35m-linux_x86_64.whl
Grafting: /usr/lib64/libgfortran.so.1.0.0 -> numpy/.libs/libgfortran.so.1.0.0.bfa58d52
Grafting: /usr/lib64/atlas/libptf77blas.so.3.0 -> numpy/.libs/libptf77blas.so.3.0.536e8f3e
Grafting: /usr/lib64/atlas/libptcblas.so.3.0 -> numpy/.libs/libptcblas.so.3.0.f940d3f1
Grafting: /usr/lib64/atlas/libatlas.so.3.0 -> numpy/.libs/libatlas.so.3.0.dd66cbe8
Setting RPATH: numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so to "$ORIGIN/../.libs"
Grafting: /usr/lib64/libgfortran.so.3.0.0 -> numpy/.libs/libgfortran.so.3.0.0.ed201abd
Grafting: /usr/lib64/atlas/liblapack.so.3.0 -> numpy/.libs/liblapack.so.3.0.794335ae
Grafting: /usr/lib64/atlas/libf77blas.so.3.0 -> numpy/.libs/libf77blas.so.3.0.60dfc405
Grafting: /usr/lib64/atlas/libcblas.so.3.0 -> numpy/.libs/libcblas.so.3.0.de16e930
Setting RPATH: numpy/linalg/lapack_lite.cpython-35m-x86_64-linux-gnu.so to "$ORIGIN/../.libs"
Setting RPATH: numpy/linalg/_umath_linalg.cpython-35m-x86_64-linux-gnu.so to "$ORIGIN/../.libs"
Previous filename tags: linux_x86_64
New filename tags: manylinux1_x86_64
Previous WHEEL info tags: cp35-cp35m-linux_x86_64
New WHEEL info tags: cp35-cp35m-manylinux1_x86_64

Fixed-up wheel written to /io/auditwheel/wheelhouse/numpy-1.11.0-cp35-cp35m-manylinux1_x86_64.whl

The repairing process seems correct but the show command still thinks that the wheel has dependencies on system BLAS and fortran:

[root@cd07bfccab0d auditwheel]# auditwheel show /io/auditwheel/wheelhouse/numpy-1.11.0-cp35-cp35m-manylinux1_x86_64.whl

numpy-1.11.0-cp35-cp35m-manylinux1_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:
{
    "libatlas.so.3": "/usr/lib64/atlas/libatlas.so.3.0",
    "libc.so.6": "/lib64/libc-2.5.so",
    "libcblas.so.3": "/usr/lib64/atlas/libcblas.so.3.0",
    "libf77blas.so.3": "/usr/lib64/atlas/libf77blas.so.3.0",
    "libgcc_s.so.1": "/lib64/libgcc_s-4.1.2-20080825.so.1",
    "libgfortran.so.1": "/usr/lib64/libgfortran.so.1.0.0",
    "libm.so.6": "/lib64/libm-2.5.so",
    "libpthread.so.0": "/lib64/libpthread-2.5.so"
}

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

libatlas.so.3, libcblas.so.3, libf77blas.so.3, libgfortran.so.1

I checked manually by unzipping the wheel and indeed there is a problem: the compiled extensions link to both the old system libs and the new vendored libs at the same time:

[root@cd07bfccab0d wheelhouse]# unzip -q unzip numpy-1.11.0-cp35-cp35m-manylinux1_x86_64.whl 
[root@cd07bfccab0d wheelhouse]# ls numpy/.libs
libatlas.so.3.0.dd66cbe8  libf77blas.so.3.0.60dfc405     libgfortran.so.3.0.0.ed201abd  libptcblas.so.3.0.f940d3f1
libcblas.so.3.0.de16e930  libgfortran.so.1.0.0.bfa58d52  liblapack.so.3.0.794335ae      libptf77blas.so.3.0.536e8f3e
[root@cd07bfccab0d wheelhouse]# ldd numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so 
    linux-vdso.so.1 =>  (0x00007ffe259f9000)
    libptf77blas.so.3.0.536e8f3e => /io/auditwheel/wheelhouse/numpy/core/../.libs/libptf77blas.so.3.0.536e8f3e (0x00007f75cf6fd000)
    libptcblas.so.3.0.f940d3f1 => /io/auditwheel/wheelhouse/numpy/core/../.libs/libptcblas.so.3.0.f940d3f1 (0x00007f75cf4dc000)
    libatlas.so.3.0.dd66cbe8 => /io/auditwheel/wheelhouse/numpy/core/../.libs/libatlas.so.3.0.dd66cbe8 (0x00007f75cebd6000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f75ce953000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f75ce737000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f75ce3de000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f75cfd14000)
    libatlas.so.3 => /usr/lib64/atlas/libatlas.so.3 (0x00007f75cdae9000)
    libgfortran.so.1 => /usr/lib64/libgfortran.so.1 (0x00007f75cd852000)

@rmcgibbo
Copy link
Member Author

Oh, right. I know the issue. Thanks for testing. There's still a couple more calls to --replace-needed that are required for indirect dependencies. For example, when multiarray.cpython-35m-x86_64-linux-gnu.so depends on libatlas.so, and libatlas.so depends on libgfortran.so, this PR doesn't update the DT_NEEDED for libatlas.so -- it only updates the DT_NEEDED on multiarray.so.

Also, I'm 99% sure soname format doesn't matter.

shorthash = hashfile(f)[:8]

old_soname = elf_read_soname(src_path)
new_soname = '%s.%s' % (os.path.split(src_path)[1], shorthash)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following can implement @njsmith proposed naming scheme:

base, ext = os.path.basename(src_path).split('.', 1)
new_soname = '%s-%s.%s' % (base, shorthash, ext)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could even make the naming scheme idempotent so that calling repair twice on a manylinux wheel would not change it. For instance (untested):

src_name = os.path.basename(src_path)
base, ext = src_name.split('.', 1)
if not base.endswith('-%s' % shorthash):
    new_soname = '%s-%s.%s' % (base, shorthash, ext)
else:
    new_soname = src_name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't repair just be a noop if the lib is already tagged manylinux_1?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this already the case? If so I am fine with that.

@rmcgibbo
Copy link
Member Author

Okay, @ogrisel, I think this PR is doing the right thing now.

[root@54c7464f7e0d wheelhouse]# auditwheel repair /root/.cache/pip/wheels/dc/c6/37/0a82876d354006c8bfec830bffcb455215968d8e3c22b9e155/numpy-1.11.0-cp35-cp35m-linux_x86_64.whl
Repairing numpy-1.11.0-cp35-cp35m-linux_x86_64.whl
Grafting: /usr/lib64/libgfortran.so.3.0.0 -> numpy/.libs/libgfortran-ed201abd.so.3.0.0
Grafting: /usr/lib64/atlas/libcblas.so.3.0 -> numpy/.libs/libcblas-de16e930.so.3.0
Grafting: /usr/lib64/atlas/libatlas.so.3.0 -> numpy/.libs/libatlas-dd66cbe8.so.3.0
Grafting: /usr/lib64/libgfortran.so.1.0.0 -> numpy/.libs/libgfortran-bfa58d52.so.1.0.0
Grafting: /usr/lib64/atlas/libptf77blas.so.3.0 -> numpy/.libs/libptf77blas-536e8f3e.so.3.0
Grafting: /usr/lib64/atlas/libf77blas.so.3.0 -> numpy/.libs/libf77blas-60dfc405.so.3.0
Grafting: /usr/lib64/atlas/liblapack.so.3.0 -> numpy/.libs/liblapack-794335ae.so.3.0
Grafting: /usr/lib64/atlas/libptcblas.so.3.0 -> numpy/.libs/libptcblas-f940d3f1.so.3.0
Setting RPATH: numpy/linalg/lapack_lite.cpython-35m-x86_64-linux-gnu.so to "$ORIGIN/../.libs"
Setting RPATH: numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so to "$ORIGIN/../.libs"
Setting RPATH: numpy/linalg/_umath_linalg.cpython-35m-x86_64-linux-gnu.so to "$ORIGIN/../.libs"
Previous filename tags: linux_x86_64
New filename tags: manylinux1_x86_64
Previous WHEEL info tags: cp35-cp35m-linux_x86_64
New WHEEL info tags: cp35-cp35m-manylinux1_x86_64

Fixed-up wheel written to /io/wheelhouse/wheelhouse/numpy-1.11.0-cp35-cp35m-manylinux1_x86_64.whl
[root@54c7464f7e0d wheelhouse]# auditwheel show /io/wheelhouse/wheelhouse/numpy-1.11.0-cp35-cp35m-manylinux1_x86_64.whl
numpy-1.11.0-cp35-cp35m-manylinux1_x86_64.whl is consistent with the
following platform tag: "manylinux1_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",
    "libgcc_s.so.1": "/lib64/libgcc_s-4.1.2-20080825.so.1",
    "libm.so.6": "/lib64/libm-2.5.so",
    "libpthread.so.0": "/lib64/libpthread-2.5.so"
}
[root@54c7464f7e0d wheelhouse]#

@rmcgibbo
Copy link
Member Author

[root@54c7464f7e0d wheelhouse]# ls numpy/.libs/
libatlas-dd66cbe8.so.3.0  libf77blas-60dfc405.so.3.0     libgfortran-ed201abd.so.3.0.0  libptcblas-f940d3f1.so.3.0
libcblas-de16e930.so.3.0  libgfortran-bfa58d52.so.1.0.0  liblapack-794335ae.so.3.0      libptf77blas-536e8f3e.so.3.0

m = re.match('patchelf\s+(\d+(.\d+)?)', version)
if m:
if float(m.group(1)) >= 0.9:
return True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can never return anything else, right? I that case I think a simple return (without True) would be enough.

@rmcgibbo
Copy link
Member Author

Sure. I'll make those changes. Did this work on the numpy test case you were using before though?

@rmcgibbo
Copy link
Member Author

(it did for me, but I'm not sure if my numpy setup was set up exactly the same as yours and @matthew-brett's, because I haven't been in the wheel-builder loop so much for the past month or so.)

@matthew-brett
Copy link
Contributor

All chaos broke loose for me. Build generated here and uploaded to here using the last commit on this PR.

Install on an actual machine (CentOS 7):

 pip install --trusted-host ccdd0ebb5a931e58c7c5-aae005c4999d7244ac63632f8b80e089.r77.cf2.rackcdn.com -f http://ccdd0ebb5a931e58c7c5-aae005c4999d7244ac63632f8b80e089.r77.cf2.rackcdn.com numpy
Collecting numpy
  Downloading http://ccdd0ebb5a931e58c7c5-aae005c4999d7244ac63632f8b80e089.r77.cf2.rackcdn.com/numpy-1.11.0-cp27-cp27mu-manylinux1_x86_64.whl (15.3MB)
    100% |████████████████████████████████| 15.3MB 77.5MB/s 
Installing collected packages: numpy
Successfully installed numpy-1.11.0
$ python -c 'import numpy'
Segmentation fault (core dumped)

More informative message (maybe) on buildbot on Debian sid:

python -c 'import sys; import numpy; result = numpy.test("full", verbose=3); sys.exit(not result.wasSuccessful())'
...
Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
program finished with exit code 127

@rmcgibbo
Copy link
Member Author

Oh no......

Sent from my iPhone

On Mar 31, 2016, at 7:39 PM, Matthew Brett [email protected] wrote:

All chaos broke loose for me. Build generated here and uploaded to here using the last commit on this PR.

Install on an actual machine (CentOS 7):

pip install --trusted-host ccdd0ebb5a931e58c7c5-aae005c4999d7244ac63632f8b80e089.r77.cf2.rackcdn.com -f http://ccdd0ebb5a931e58c7c5-aae005c4999d7244ac63632f8b80e089.r77.cf2.rackcdn.com numpy
Collecting numpy
Downloading http://ccdd0ebb5a931e58c7c5-aae005c4999d7244ac63632f8b80e089.r77.cf2.rackcdn.com/numpy-1.11.0-cp27-cp27mu-manylinux1_x86_64.whl (15.3MB)
100% |████████████████████████████████| 15.3MB 77.5MB/s
Installing collected packages: numpy
Successfully installed numpy-1.11.0
$ python -c 'import numpy'
Segmentation fault (core dumped)
More informative message (maybe) on buildbot on Debian sid:

python -c 'import sys; import numpy; result = numpy.test("full", verbose=3); sys.exit(not result.wasSuccessful())'
...
Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
program finished with exit code 127

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@njsmith
Copy link
Member

njsmith commented Mar 31, 2016

Oh god damn it. This is a bug in patchelf: it turns out that when you link against a library like libgfortran that uses symbol versioning, then the library gets listed in two different places: once as a DT_NEEDED, and once in the symbol version requirements table. patchelf --replace-needed fixes the DT_NEEDED entry, but doesn't touch the symbol version requirements table, so we have:

$ readelf -a lib/python2.7/site-packages/numpy/.libs/libopenblasp-r0-4830d766.2.17.so
[...]
Dynamic section at offset 0x2318100 contains 28 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgfortran-ed201abd.so.3.0.0]
[...]
Version needs section '.gnu.version_r' contains 4 entries:
 Addr: 0x00000000000aff18  Offset: 0x0aff18  Link: 28 (.dynstr)
  000000: Version: 1  File: libgfortran.so.3  Cnt: 1
  0x0010:   Name: GFORTRAN_1.0  Flags: none  Version: 7

Notice that the first part references libgfortran-ed201abd.so.3.0.0, but the second part references libgfortran.so.3. And then this freaks out the dynamic loader, because it's being asked to check the symbol versions of a library that wasn't even loaded.

@rmcgibbo
Copy link
Member Author

Well that's potentially not that hard to fix then. I was thinking the diagnosis would be the hardest part.

Sent from my iPhone

On Mar 31, 2016, at 7:56 PM, Nathaniel J. Smith [email protected] wrote:

Oh god damn it. This is a bug in patchelf: it turns out that when you link against a library like libgfortran that uses symbol versioning, then the library gets listed in two different places: once as a DT_NEEDED, and once in the symbol version requirements table. patchelf --replace-needed fixes the DT_NEEDED entry, but doesn't touch the symbol version requirements table, so we have:

$ readelf -a lib/python2.7/site-packages/numpy/.libs/libopenblasp-r0-4830d766.2.17.so
[...]
Dynamic section at offset 0x2318100 contains 28 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgfortran-ed201abd.so.3.0.0]
[...]
Version needs section '.gnu.version_r' contains 4 entries:
Addr: 0x00000000000aff18 Offset: 0x0aff18 Link: 28 (.dynstr)
000000: Version: 1 File: libgfortran.so.3 Cnt: 1
0x0010: Name: GFORTRAN_1.0 Flags: none Version: 7
Notice that the first part references libgfortran-ed201abd.so.3.0.0, but the second part references libgfortran.so.3. And then this freaks out the dynamic loader, because it's being asked to check the symbol versions of a library that wasn't even loaded.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@njsmith
Copy link
Member

njsmith commented Apr 1, 2016

NixOS/patchelf#84

@ogrisel
Copy link
Contributor

ogrisel commented Apr 1, 2016

In the mean time I am working on a docker-based integration test for auditwheel (just to let you know).

@rmcgibbo
Copy link
Member Author

rmcgibbo commented Apr 2, 2016

Sure. Rebased.

@rmcgibbo
Copy link
Member Author

rmcgibbo commented Apr 2, 2016

@njsmith I took a quick look at the code in your patchelf PR as compared to pyelftools. I think it's still missing jumping into some "aux" table, if you look at the implementation of the methods required for

from elftools.elf.elffile  import ELFFile
f = ELFFile(open('special/_ufuncs.so', 'rb'))
for v, viter in f.get_section_by_name('.gnu.version_r').iter_versions():
    for aux in viter:
        print(aux.name, v.name)

when running the master branch of patchelf with --debug against _ufuncs.so, it doesn't properly find the filenames (https://github.com/njsmith/patchelf/blob/907c02009e9f4e6ad122fa940fdb59572fddfc87/src/patchelf.cc#L1337)

patchelf --debug --replace-needed libgfortran.so.3 libgfortran-hello.so.3 _ufuncs.so
patching ELF file `_ufuncs.so'
Kernel page size is 4096 bytes
keeping DT_NEEDED entry `libopenblas.so.0'
keeping DT_NEEDED entry `libgfortran-hello.so.3'
keeping DT_NEEDED entry `libm.so.6'
keeping DT_NEEDED entry `libgcc_s.so.1'
keeping DT_NEEDED entry `libc.so.6'
found .gnu.version_r with 4 entries, strings in .dynstr
keeping .gnu.version_r entry `libgcc_s.so.1'
keeping .gnu.version_r entry `libc.so.6'
keeping .gnu.version_r entry `libc.so.6'
keeping .gnu.version_r entry `libc.so.6'

Note here that libc.so.6 shows up 3 times, which isn't right.

@njsmith
Copy link
Member

njsmith commented Apr 2, 2016

@rmcgibbo: oh thanks! Looking at elftools I think I see the problem: I was interpreting the vn_next field as giving an offset relative to the start of the buffer, but it's really giving an offset relative to the current item. So that's why I keep rereading the same libc.so.6 entry repeatedly. I think (??) the aux table is irrelevant, because none of its fields contain the soname, just the version string? But I could be misinterpreting -- the LSB docs are the only ones I can find, and while I'm very grateful they exist they're pretty incomplete.

@rmcgibbo
Copy link
Member Author

rmcgibbo commented Apr 2, 2016

No problem. The aux table was just a guess but pyelftools is probably useful to debug/document

Sent from my iPhone

On Apr 2, 2016, at 11:53 AM, Nathaniel J. Smith [email protected] wrote:

@rmcgibbo: oh thanks! Looking at elftools I think I see the problem: I was interpreting the vn_next field as giving an offset relative to the start of the buffer, but it's really giving an offset relative to the current item. So that's why I keep rereading the same libc.so.6 entry repeatedly. I think (??) the aux table is irrelevant, because none of its fields contain the soname, just the version string? But I could be misinterpreting -- the LSB docs are the only ones I can find, and while I'm very grateful they exist they're pretty incomplete.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@ogrisel
Copy link
Contributor

ogrisel commented Apr 2, 2016

@rmcgibbo here is the PR to your PR: rmcgibbo#1

Improvements to integration tests
@njsmith
Copy link
Member

njsmith commented Apr 2, 2016

@matthew-brett: https://github.com/njsmith/patchelf master should now work correctly for scipy, if you'd like to test (cf NixOS/patchelf#86)

@matthew-brett
Copy link
Contributor

@ogrisel
Copy link
Contributor

ogrisel commented Apr 2, 2016

Looks good. Would it be possible to publish a bootstrapped tarball for patchelf to integrate it in the manylinux1 docker image while waiting for the patchelf 0.9.1 or 0.10 release?

@matthew-brett
Copy link
Contributor

@ogrisel
Copy link
Contributor

ogrisel commented Apr 2, 2016

Thanks!

@ogrisel
Copy link
Contributor

ogrisel commented Apr 2, 2016

Hum apparently there are undefined symbols in cython_lapack.so from scipy:

https://travis-ci.org/matthew-brett/manylinux-testing/jobs/119960887#L803

@matthew-brett
Copy link
Contributor

Ah no - sorry - I am also running tests there against ATLAS - which we know is broken - so you can ignore that one - look only at the openblas tests.

Elsewhere, all looking good so far:

@njsmith
Copy link
Member

njsmith commented Apr 3, 2016

Looks like @matthew-brett's tests passed \o/

In any case I think this auditwheel PR can be merged? And then I guess we'll need an auditwheel release, and then a rebuild of the docker images with the new auditwheel + the new patchelf?

@matthew-brett
Copy link
Contributor

All tests on buildbot passing (Python 2.7 on Fedora 19, Pythons 2.7 3.4 3.5 on Debian Sid).

manylinux-builds all passed on Python 2.7, a couple on 3.4, the rest pending, but it would be surprising if any of those failed.

Very nicely done, congratulations all.

@rmcgibbo rmcgibbo merged commit 3e95494 into pypa:master Apr 3, 2016
@rmcgibbo rmcgibbo deleted the rename-libs-on-graft branch April 3, 2016 04:49
@matthew-brett
Copy link
Contributor

One manylinux-testing test timed out, but nearly done and with no errors.

njsmith added a commit to njsmith/manylinux that referenced this pull request Apr 3, 2016
Rebuilding the docker images to pick up auditwheel 1.3.0 should complete
the changes needed to fix the problems @matthew-brett found with
vendoring libgfortran (see: pypa/auditwheel#24, pypa/auditwheel#25, pypa#43,
 pypa#44, etc.).
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

Successfully merging this pull request may close these issues.

None yet

4 participants