-
Notifications
You must be signed in to change notification settings - Fork 0
Linux
Binary distribution is much harder than on Windows, mainly because distributing core libraries like glibc is not feasible, and also glibc undergoes lots of changes so you can't run code with older glibc than you build with.
Summary of problem: https://peps.python.org/pep-0513/
The most straightforward way to get compatibility is to just build on an old distro, in a VM or container.
There are hackier ways: you can try using headers which force linking with older glibc versions. Or you might be able to patch your executable to downgrade glibc symbols after compiling. You'd be treading new ground if you made these reliable and easy.
You have a lot of choice about which libraries to bundle and which to assume/ask your users have available. You should always exclude libraries common to all desktop systems, e.g. libc, libc++, X libraries. E.g. see the list binary Python wheels must exclude.
TODO relative lookup of libraries, rpath, patching