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

FR: remove debug symbols from Windows install_only builds #174

Closed
ofek opened this issue May 31, 2023 · 6 comments · Fixed by #279
Closed

FR: remove debug symbols from Windows install_only builds #174

ofek opened this issue May 31, 2023 · 6 comments · Fixed by #279
Labels
enhancement New feature or request

Comments

@ofek
Copy link
Sponsor

ofek commented May 31, 2023

To save space and bandwidth

@ofek
Copy link
Sponsor Author

ofek commented May 31, 2023

Should be as simple as removing *.pdb

@mitsuhiko
Copy link

I don't think it's a good idea to not ship debug symbols.

@ofek
Copy link
Sponsor Author

ofek commented Jun 20, 2023

Okay, why?

@indygreg indygreg added the enhancement New feature or request label Jul 20, 2023
@indygreg
Copy link
Owner

I believe that debug symbols should be available for any pre-built binary that is distributed. Full stop.

If debug symbols aren't available, debugging crashes becomes much harder. Lack of symbols can also hamper some forms of performance profiling. That's why I feel anyone distributing [open source] software has an obligation to make symbols available.

Since I'm not aware of an easy/cheap way to run a debug symbol server, that means making symbols available as GitHub release artifacts. Right now that occurs implicitly since we distribute unstripped binaries.

While it is possible to ship symbols as separate artifacts (the tooling for this is more polished on Windows / PDBs than it is on Linux), I'm more inclined to ship an install_only_stripped artifact variant. That way end-users can pick which variant to use without having to worry about joining the detached symbols.

Another idea that's been floating around in my head is shipping various scripts/binaries in the distributions that can post-process the distribution. One could imagine shipping an executable that is capable of stripping the binaries. Then downstream consumers could repackage stripped binaries.

Adding this to the backlog.

@axel-kah
Copy link

@indygreg: +1 for shipping install_only_stripped artifacts because that eliminates the need for downstream postprocessing.

@ofek
Copy link
Sponsor Author

ofek commented Mar 6, 2024

It will be excellent to have these stripped builds. I would like to offer my assistance to various projects to start building with or migrate to PyApp but currently if one were to opt-in for the embedded Python configuration it would be impossible to come close to the current size of, for example, binaries like this: https://github.com/yt-dlp/yt-dlp/releases/tag/2023.12.30 (~13.4 MB)

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.

4 participants