Skip to content

Able to install manylinux wheel but not auditwheel repair it #145

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

Closed
riddell-stan opened this issue Apr 3, 2019 · 3 comments
Closed

Able to install manylinux wheel but not auditwheel repair it #145

riddell-stan opened this issue Apr 3, 2019 · 3 comments

Comments

@riddell-stan
Copy link

I'm getting a strange error when I run auditwheel on a wheel I built in a manylinux docker image:

$ docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD auditwheel repair /io/wheelhouse/pystan-2.19.0.0-cp36-cp36m-linux_x86_64.whl -w /io/wheelhouse2/
warning [/io/wheelhouse/pystan-2.19.0.0-cp36-cp36m-linux_x86_64.whl]:  76 extra bytes at beginning or within zipfile
  (attempting to process anyway)
error [/io/wheelhouse/pystan-2.19.0.0-cp36-cp36m-linux_x86_64.whl]:  reported length of central directory is
  -76 bytes too long (Atari STZip zipfile?  J.H.Holm ZIPSPLIT 1.1
  zipfile?).  Compensating...
error:  expected central file header signature not found (file #67320).
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)
Repairing pystan-2.19.0.0-cp36-cp36m-linux_x86_64.whl
Traceback (most recent call last):
  File "/usr/local/bin/auditwheel", line 10, in <module>
    sys.exit(main())
  File "/opt/_internal/cpython-3.6.8/lib/python3.6/site-packages/auditwheel/main.py", line 49, in main
    rval = args.func(args, p)
  File "/opt/_internal/cpython-3.6.8/lib/python3.6/site-packages/auditwheel/main_repair.py", line 56, in execute
    wheel_abi = analyze_wheel_abi(args.WHEEL_FILE)
  File "/opt/_internal/cpython-3.6.8/lib/python3.6/site-packages/auditwheel/wheel_abi.py", line 101, in analyze_wheel_abi
    get_wheel_elfdata(wheel_fn)
  File "/opt/_internal/cpython-3.6.8/lib/python3.6/site-packages/auditwheel/wheel_abi.py", line 35, in get_wheel_elfdata
    with InGenericPkgCtx(wheel_fn) as ctx:
  File "/opt/_internal/cpython-3.6.8/lib/python3.6/site-packages/auditwheel/wheeltools.py", line 155, in __enter__
    self.path = super(InWheelCtx, self).__enter__()
  File "/opt/_internal/cpython-3.6.8/lib/python3.6/site-packages/auditwheel/wheeltools.py", line 114, in __enter__
    zip2dir(self.in_wheel, self.name)
  File "/opt/_internal/cpython-3.6.8/lib/python3.6/site-packages/auditwheel/tools.py", line 42, in zip2dir
    subprocess.check_output(['unzip', '-o', '-d', out_dir, zip_fname])
  File "/opt/_internal/cpython-3.6.8/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/opt/_internal/cpython-3.6.8/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['unzip', '-o', '-d', '/tmp/tmp5yrvpbxz', '/io/wheelhouse/pystan-2.19.0.0-cp36-cp36m-linux_x86_64.whl']' returned non-zero exit status 3.

I can unzip this file without issue and even install it (without error) on linux.

The wheel is large (196M). The wheel was built using TkTech's verison of quay.io/pypa/manylinux1_x86_64 pypa/manylinux#118 (comment) .

@riddell-stan
Copy link
Author

I found the problem. The wheel contains 73,451 files and the unzip used by manylinux1 (5.52) does not support the Zip64 format, so it is limited to 65,535 (2^16) files.

So auditwheel breaks in this case.

Installing a newer version of unzip on the manylinux1 image solves this problem.

@ehashman
Copy link
Member

ehashman commented Apr 5, 2019

Ah! I had a suspicion it was something like that...

Is the version of unzip on the manylinux2010 image new enough?

@riddell-stan
Copy link
Author

Yes. unzip 6.00 with zombiefeynman/manylinux2010_x86_64.

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