Fix glibc compatibility issue for arm64 linux#3315
Fix glibc compatibility issue for arm64 linux#3315shimies wants to merge 2 commits intoLuaLS:masterfrom
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
|
GitHub is constantly upgrading available system versions and deprecating older ones. What will we do in a few years when 22.04 is deprecated? Actually, I think a better approach is to introduce zigbuilder into the luals project. |
|
@CppCXY thank you for the suggestion and the work at #3316. Not sure if it is fully tested, but as it appears to be working (is at least linked against lower version of glibc), I can close this pull-req. Another possibility might be that, if the concern is only GitHub deprecating the runners or discontinuing their availability, we could use |
Issue
On my arm64 linux (Debian Bookworm [releases]), the prebuilt binary from the GitHub Releases no longer works starting with versions 3.16.0 / 3.16.1.
This appears to be caused by a glibc version incompatibility: the arm64 binary is linked against relatively new glibc, which is actually newer than one provided by Debian Bookworm.
This PR fixes it by downgrading the runner OS for arm64 build to be
ubuntu-22.04which actually aligns with the runner OS for amd64 build.Confirming glibc version incompatibility on my workstation
Inspecting the binary shows that it requires glibc >= 2.38:
However, Debian Bookworm ships with glibc of version 2.36:
$ ldd --version | grep GLIBC ldd (Debian GLIBC 2.36-9+deb12u13) 2.36Environment
Root cause
The required glibc version is determined by the toolchain provided by the OS used to build the binary. From the GitHub Actions workflow, the arm64 build runs on
ubuntu-24.04, while the amd64 build usesubuntu-22.04. Sinceubuntu-24.04probably ships with a newer toolchain, the resulting arm64 binary depends on a newer glibc.Relevant workflow snippet:
lua-language-server/.github/workflows/build.yml
Lines 25 to 28 in d8fd92a
Point of discussion
ubuntu-22.04for amd64 vsubuntu-24.04for arm64)?Testing
Actions' artifacts from forked repo of mine shows that the required glibc version is now 2.34 which is same required version as amd64.
Checking glibc versions the binary is linked against