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

Try building Python statically on Linux. #65

Open
dumol opened this issue Oct 7, 2024 · 3 comments
Open

Try building Python statically on Linux. #65

dumol opened this issue Oct 7, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@dumol
Copy link
Contributor

dumol commented Oct 7, 2024

Currently, Linux packages are built against either glibc or musl libc libraries.

Building statically against the libc library would have two main benefits:

  1. only one Linux package for arch
  2. a more modern toolchain could be used for building (currently we build on Amazon Linux 2 for glibc-based distributions).

Starting point: https://wiki.python.org/moin/BuildStatically.

Other pointers:

@dumol dumol added the enhancement New feature or request label Oct 7, 2024
@dumol dumol self-assigned this Oct 7, 2024
@adiroiban
Copy link
Member

I am not sure if having static glibc on Alpine / musl does not defeat the purpose of having a musl based environment in the first place.

Also... we need to see the depenencies between linux kernels and glibc / musl versions

@dumol
Copy link
Contributor Author

dumol commented Oct 7, 2024

A more powerful way, which would also enable easy cross-compiling: https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html

@dumol
Copy link
Contributor Author

dumol commented Oct 7, 2024

I am not sure if having static glibc on Alpine / musl does not defeat the purpose of having a musl based environment in the first place.

Was actually thinking of building statically against musl, which seems to be more straightforward. Building statically against glibc is frown upon, I remember this: https://stackoverflow.com/questions/57476533/why-is-statically-linking-glibc-discouraged

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

No branches or pull requests

2 participants