Fix glibc compatibility issue for arm64 linux #3315
Closed
+3
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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