-
Notifications
You must be signed in to change notification settings - Fork 87
Strip binaries on non-OSX builds #140
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
Conversation
Thanks for this. Can you think of a test? For example, a package that failed before but now works, with stripping? |
This was definitely the case with |
@xhochy - about the test - what I meant was, it would be good to continue to reassure ourselves that this is working. Can you think of a check that we can do to confirm the binary is in fact stripped? |
@matthew-brett My main check was that the size of the shared libraries in the wheels was drastically reduced (and thus the size of the wheel). This is often in the range of 10-40% of the total size thus clearly visible. Also |
Sure - I do understand that you checked by hand before and after - I was thinking of a test to go in the test suite, but feel free to say "no I can't think of one". |
xref pypa/manylinux#119 Thanks for this @xhochy, this will make deployment of various pydata components inside AWS Lambda much easier. Do you intend to open PR's updating the multibuild submodule in each of these projects so this gets rolled out before each of their next releases? I also wonder how hard it might be to do split debuginfo so anyone who wants to run gdb on a binary from a release wheel [edit: and get full symbol info] can do so, but people with space constraints can harmlessly delete separate files. |
@tkelman I will open issues on the various pydata components that they should update their multibuild version on the next release and provide PRs if wanted. You still should be able to run gdb on these binaries and possibly even get readable stacktrace but won't see local symbols during debugging. |
The stripping seems to not always happen, see gh-162 |
Directly strip the binaries on compilation. Additionally I will have a look into integrating stripping into
auditwheel
but this change will prevent persisting the symbols in the first place. The savings are quite large here, e.g. for Pandas the sizes change 27M wheel and 104M unpacked on disk to a 11M wheel and 44M unpacked on disk. These saving are significantly visible in e.g. docker images that contain the unpacked binaries.Verified with several packages as we had seen problems with this in the past:
Pandas
https://travis-ci.org/xhochy/pandas-wheels/builds/337220847Cython
(2.6 builds fail as this version is no longer in the image) https://travis-ci.org/xhochy/cython-wheels/builds/337244795h5py
https://travis-ci.org/xhochy/h5py-wheels/builds/337245000matplotlib
https://travis-ci.org/xhochy/matplotlib-wheels/builds/337246063numpy
https://travis-ci.org/xhochy/numpy-wheels/builds/337247346numexpr
https://travis-ci.org/xhochy/numexpr-wheels/builds/337248103pytables
https://travis-ci.org/xhochy/pytables-wheels/builds/337248798scipy
https://travis-ci.org/xhochy/scipy-wheels/builds/337663919