python-build-standalone
python-build-standalone copied to clipboard
Build 32-bit linux with musl
Hello! In order to install python on quite old hardware, I want to build 32-bit package with musl (binary libraries are also very old).
In my case it is not even 686, it is 486 without FPU.
Yes, producing 32-bit x86 Linux distributions would be a nice feature.
However, this isn't a high priority for me to implement. If someone provided patches, I would review them and incorporate the feature.
There is i686-linux-gnu portable python releases, I wonder if it's possible to support i686-linux-musl
I like the idea of generic/universal x86 binaries, static i686 binaries fill that niche
I use i686 and x86_64 distros, and the oldest machine I have is a pentium 4 that I don't know if it's still working, so static i686 musl makes sense
It's also possible to create static glibc binaries... since version 2.34, GLIBC is becoming more and more friendly to static linking, see: https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread
https://abi-laboratory.pro/index.php?view=changelog&l=glibc&v=2.34
The current glibc version is 2.37 and supports linux 3.2+, it would still run in distros released in 2011/2012+
However musl is the first option, if it's not possible to create a static musl python i686 binary, then glibc is there for you
When it comes to i686, I've found that assembler code sometimes breaks static musl i686 builds, so disabling ASM (if possible) would fix the issue
If binaries are created using a CI, I recommend using an i686 alpine docker or something to build musl binaries...