Closed jasonforal closed 1 week ago
Special thanks to @robertohuertasm for debugging this and identifying the solution
Thank you @jasonforal for your nice words ❤️ and for your thorough work on this issue 🙌🏻 . It's always a pleasure to collaborate with you!
Yes, for the APIs we're using, newer versions of glibc have backwards-compatibility. So it works on 22.04, 24.04, etc.
What problem are you trying to solve?
We currently compile our Linux release binaries on GitHub's
ubuntu-latest
runner, which resolves to ubuntu 24.04. Because 24.04 uses a newer version of glibc, it compiles binaries that expect more recent versions of glibc (currently, v8 expectspthread_getattr_np@GLIBC_2.32
). This leads to an error when trying to run the binary on older versions of Linux (specifically Ubuntu 20.04, which ships with glibc 2.31)What is your solution?
Building on Ubuntu 20.04 generates a binary that now expects glibc 2.2.5:
And thus the binaries now work on Ubuntu 20.04.
You can confirm that this modification to the release workflow functions correctly by looking at a pre-release that I just generated to test it:
We need to add an extra step to set up the container, as the base image is missing the packages that GitHub installs by default on a non-containerized runner (curl, gh, etc).
Alternatives considered
What the reviewer should know
ubuntu-latest
(currently 24.04). Assuming glibc doesn't have forward-compatibility issues, this setup is fine.