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

Linux arm64: Binaries not stripped on arm64 RPM builds #6027

Open
jmcphers opened this issue Jan 16, 2025 · 0 comments
Open

Linux arm64: Binaries not stripped on arm64 RPM builds #6027

jmcphers opened this issue Jan 16, 2025 · 0 comments
Labels
area: builds Issues related to Builds category. bug Something isn't working os-linux Linux issue

Comments

@jmcphers
Copy link
Collaborator

Positron's RPM installer builds for arm64 do not have stripped binaries. This results in binaries that are slightly larger than they need to be, in addition to including unnecessary debug information.

https://www.man7.org/linux/man-pages/man1/strip.1.html

The reason we don't run strip on the bundle (during RPM build) is that, if run, it chokes on some pre-built files from Python vendored dependencies in pydevd, such as cpython-311-x86_64-linux-gnu.so and attach_linux_amd64.so.

Error: Command failed: HOME="$(pwd)/.build/linux/rpm/aarch64" rpmbuild -bb .build/linux/rpm/aarch64/rpmbuild/SPECS/positron.spec --target=aarch64

+ /usr/lib/rpm/brp-strip /usr/bin/strip
/usr/bin/strip: Unable to recognise the format of the input file `/home/runner/work/positron-builds/positron-builds/positron/.build/linux/rpm/aarch64/rpmbuild/BUILDROOT/positron-2025.01.0+999-1735940742.el8.aarch64/usr/share/positron/resources/app/extensions/ms-python.debugpy/bundled/libs/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_linux_amd64.so'
/usr/bin/strip: Unable to recognise the format of the input file `/home/runner/work/positron-builds/positron-builds/positron/.build/linux/rpm/aarch64/rpmbuild/BUILDROOT/positron-2025.01.0+999-1735940742.el8.aarch64/usr/share/positron/resources/app/extensions/ms-python.debugpy/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cpython-311-x86_64-linux-gnu.so'

We could:

  • stop vendoring this dependency on arm64, or
  • delete the offending files before reaching the RPM bundle step (they have no use on an arm64 machine anyway), or
  • instead of having rpmbuild perform stripping, do the strip step ourselves so we can control the files for which debug stripping is performed, or
  • run away from home and live in the woods
@jmcphers jmcphers added area: builds Issues related to Builds category. bug Something isn't working os-linux Linux issue labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: builds Issues related to Builds category. bug Something isn't working os-linux Linux issue
Projects
None yet
Development

No branches or pull requests

1 participant