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

install_only builds should be stripped? #277

Closed
bulletmark opened this issue Jul 13, 2024 · 4 comments · Fixed by #279
Closed

install_only builds should be stripped? #277

bulletmark opened this issue Jul 13, 2024 · 4 comments · Fixed by #279
Assignees
Labels
enhancement New feature or request

Comments

@bulletmark
Copy link

bulletmark commented Jul 13, 2024

The 3.12.3 x86_64-unknown-linux-gnu install_only build is 251 MB. Stripped using strip -p --strip-unneeded it is 81 MB. As discussed here and in issue #275, there is an argument that the normal builds should preserve debug and other symbols but surely the install_only builds should be stripped?

@charliermarsh
Copy link
Collaborator

charliermarsh commented Jul 13, 2024

Personally, I think this makes sense, but am curious to get opinions from others. Alternatively, we could ship both stripped and unstripped install_only builds (but avoid shipping stripped builds for all variants).

@indygreg
Copy link
Owner

As someone who commonly attaches a debugger to random software, it is exceptionally frustrating when you can't load debug symbols for binaries. This significantly inhibits debugging. Especially on PGO+LTO optimized binaries.

As a matter of principle I feel that anyone shipping non closed source software has an obligation to make debug symbols available.

It is not viable for us to run a symbol server for this project (maybe one day GitHub will provide that service: one can only wish). That leaves shipping the symbols as release assets. I prefer having them embedded in binaries. But detached symbols could also work.

I really don't want to ship a symbols/no-symbols variant of each distribution: we have too many release artifacts as it stands.

Perhaps a compromise position is to ship symbols/no-symbols variants for just the install_only archives. We keep symbols on install_only for backwards compatibility and introduce a new variant - say install_only_stripped - that lacks debug symbols.

@charliermarsh
Copy link
Collaborator

Perhaps a compromise position is to ship symbols/no-symbols variants for just the install_only archives. We keep symbols on install_only for backwards compatibility and introduce a new variant - say install_only_stripped - that lacks debug symbols.

Yeah, that's where I was leaning too -- roughly what I was trying to say with the second sentence of my previous comment. It seems like a good compromise to me and I'd be happy to own it.

@charliermarsh charliermarsh self-assigned this Jul 13, 2024
@charliermarsh
Copy link
Collaborator

I'll give this a try.

@charliermarsh charliermarsh added the enhancement New feature or request label Jul 14, 2024
charliermarsh added a commit that referenced this issue Jul 21, 2024
## Summary

This PR adds an `install_only_stripped` variant, which is generated by taking the `install_only` variant and removing debug symbols.

Closes #277.
Closes #174.
Related to #275.

## Test Plan

On macOS:

- Downloaded [cpython-3.10.14+20240713-aarch64-apple-darwin-install_only.tar.gz](https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.10.14+20240713-aarch64-apple-darwin-install_only.tar.gz) locally.
- Ran: `cargo run convert-install-only-stripped cpython-3.10.14+20240713-aarch64-apple-darwin-install_only.tar.gz`.
- Relocated `cpython-3.10.14+20240713-aarch64-apple-darwin-install_only_stripped.tar.gz` to another directory.
- Unzipped `cpython-3.10.14+20240713-aarch64-apple-darwin-install_only.tar.gz`.
- Ran `./python` in `python/python/bin`.

Performed the same procedure on Windows.
zanieb pushed a commit to zanieb/python-build-standalone that referenced this issue Sep 4, 2024
This PR adds an `install_only_stripped` variant, which is generated by taking the `install_only` variant and removing debug symbols.

Closes indygreg#277.
Closes indygreg#174.
Related to indygreg#275.

On macOS:

- Downloaded [cpython-3.10.14+20240713-aarch64-apple-darwin-install_only.tar.gz](https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.10.14+20240713-aarch64-apple-darwin-install_only.tar.gz) locally.
- Ran: `cargo run convert-install-only-stripped cpython-3.10.14+20240713-aarch64-apple-darwin-install_only.tar.gz`.
- Relocated `cpython-3.10.14+20240713-aarch64-apple-darwin-install_only_stripped.tar.gz` to another directory.
- Unzipped `cpython-3.10.14+20240713-aarch64-apple-darwin-install_only.tar.gz`.
- Ran `./python` in `python/python/bin`.

Performed the same procedure on Windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants