Closed so-rose closed 7 months ago
It is a good point, but the build process works quite well, so I am hesitant to make dramatic changes. However, I have switched from Ubuntu latest to 20.04. You should be able to download the build result here:
https://github.com/janba/GEL/actions/runs/7732911498
I would appreciate it if you could put the compiled version of libPyGEL.so into a wheel on your machine and check if it works. If it does indeed have greater compatibility, I will just move to that version.
The Bug
On Linux, the PyPi wheel for PyGEL3D compiles GEL against the latest Ubuntu. As a result, PyGEL will never work on any distribution with an older GLIBC than the latest Ubuntu - for example, just after the release of a new Ubuntu LTS, re-uploading PyGEL would break it for everybody still using the existing Ubuntu LTS.
Workaround
One can, of course, compile this oneself. This is a bit of a hassle; however, it can be done in a one-liner using the magic of rootless containers, even on my more-and-more ancient Debian 11 (now
oldstable
).To run this script,
podman
(https://podman.io/) must be installed. With podman installed, the build process is 100% identical regardless of OS.In principle, running an analogue of this script on Podman for MacOS/Windows should also generate a Linux wheel - since the podman runtime runs on a Linux kernel within a VM.
Caveats
As indicated, one must find the precise Linux distribution + image tag that one wants PyGEL to work with, and modify the variables at the top. Since I use Debian 11, I use:
Choosing the wrong IMAGE:TAG will result in broken symbolic links.
Also, one must still manually
apt install libglu1 libgl1
for full functionality.This build is also a rather heavy process due to needing to
apt install
a bunch of stuff (including a complete compiler toolchain); a base image with the dependencies preinstalled could greatly speedup rebuilds to near-bare-metal speed, at the cost of complexity.I believe there is some kind of more "universal Linux binary image" in the Python ecosystem. I'm unsure, however. The ecosystem is a mess. Still, this may be worth investigating.