Repository navigation
fix(core): avoid GLIBC_2.29 requirement in linux prebuilds - #1065
Merged
Merged
Conversation
Pin Linux native prebuild targets to glibc 2.28 instead of using unpinned linux-gnu targets. After the native audio change, miniaudio pulls in libm symbols. When built on newer hosts, the unpinned linux-gnu target can bind against newer libm symbol versions such as GLIBC_2.29, which prevents the prebuilt library from loading on RHEL/AlmaLinux 8 systems. Building with x86_64-linux-gnu.2.28 and aarch64-linux-gnu.2.28 keeps the GNU/glibc dynamic linking behavior while preserving compatibility with glibc 2.28 environments.
kevinchappell
requested review from
Hona,
kommander,
msmps and
simonklee
as code owners
May 14, 2026 08:22
simonklee
approved these changes
May 14, 2026
simonklee
enabled auto-merge (squash)
May 14, 2026 08:24
There was a problem hiding this comment.
Pull request overview
Pins the Linux Zig build targets to a specific glibc baseline to prevent native prebuilds from accidentally requiring newer GLIBC symbol versions (e.g., GLIBC_2.29) when built on newer hosts, improving runtime compatibility on older Linux distributions.
Changes:
- Pin Linux targets from
*-linux-gnuto*-linux-gnu.2.28in the Zig build target matrix. - Add a clarifying comment about unpinned targets picking up newer host GLIBC/libm symbol versions.
- Update the
-Dtargethelp text example to use the new pinned target format.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+20
to
+23
| // Unpinned linux-gnu targets can bind host libm symbols such as GLIBC_2.29. | ||
| const SUPPORTED_TARGETS = [_]SupportedTarget{ | ||
| .{ .zig_target = "x86_64-linux-gnu", .output_name = "x86_64-linux", .description = "Linux x86_64" }, | ||
| .{ .zig_target = "aarch64-linux-gnu", .output_name = "aarch64-linux", .description = "Linux aarch64" }, | ||
| .{ .zig_target = "x86_64-linux-gnu.2.28", .output_name = "x86_64-linux", .description = "Linux x86_64" }, | ||
| .{ .zig_target = "aarch64-linux-gnu.2.28", .output_name = "aarch64-linux", .description = "Linux aarch64" }, |
Contributor
Author
There was a problem hiding this comment.
This is technically correct but GLIBC should still resolve to 2.27 on Ubuntu 18.04 instead of being not found.
docker-compose.almalinux_8.yml
$ docker compose -f docker-compose.almalinux_8.yml up
>>>> Executing external compose provider "/home/kevin/.local/bin/podman-compose". Please refer to the documentation for details. <<<<
Error: no container with name or ID "core_test-glibc228_1" found: no such container
Error: no container with ID or name "core_test-glibc228_1" found: no such container
b2192c89d6cb6ebafd3863c1fc0752418501b7f7ec773f802b6b7b9c9cbe5b97
core_default
6d43d158d806585c7198a43ae6de299a608ca078089c2a7953e7bd164ea52e1f
3b3e5896e917cf8f1889080334367f1518f9472434bd8a03399a06acf19a8517
[test-glibc228] | === GLIBC version ===
[test-glibc228] | ldd (GNU libc) 2.28
[test-glibc228] |
[test-glibc228] | === ldd libopentui.so ===
[test-glibc228] | linux-vdso.so.1 (0x00007a1056ace000)
[test-glibc228] | libm.so.6 => /lib64/libm.so.6 (0x00007a1055e7e000)
[test-glibc228] | libpthread.so.0 => /lib64/libpthread.so.0 (0x00007a1055c5e000)
[test-glibc228] | libc.so.6 => /lib64/libc.so.6 (0x00007a1055888000)
[test-glibc228] | libdl.so.2 => /lib64/libdl.so.2 (0x00007a1055684000)
[test-glibc228] | /lib64/ld-linux-x86-64.so.2 (0x00007a1056800000)
[test-glibc228] |
[test-glibc228] | === Required GLIBC symbol versions ===
[test-glibc228] | GLIBC_2.10
[test-glibc228] | GLIBC_2.17
[test-glibc228] | GLIBC_2.2.5
[test-glibc228] | GLIBC_2.27
[test-glibc228] | GLIBC_2.3
[test-glibc228] | GLIBC_2.3.2
[test-glibc228] | GLIBC_2.4
[test-glibc228] | GLIBC_2.7
[test-glibc228] |
[test-glibc228] | === Attempting dlopen + reporting runtime glibc ===
[test-glibc228] | runtime glibc: 2.28
[test-glibc228] |
[test-glibc228] | === SUCCESS: Binary actually loads on GLIBC 2.28 ===docker-compose.ubuntu-18_04.yml
$ docker compose -f docker-compose.ubuntu-18_04.yml up
>>>> Executing external compose provider "/home/kevin/.local/bin/podman-compose". Please refer to the documentation for details. <<<<
core_test-glibc227_1
core_test-glibc227_1
3d33819ae2b9cd6a17d64477fc27eef628d1b4b722cceca80c4fd387ac639abf
core_default
b2192c89d6cb6ebafd3863c1fc0752418501b7f7ec773f802b6b7b9c9cbe5b97
804408ecbb0fa40135486d3563ea507e692238d05cc00e9c42073f916f5212f0
[test-glibc227] | debconf: delaying package configuration, since apt-utils is not installed
[test-glibc227] | === GLIBC version ===
[test-glibc227] | ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27
[test-glibc227] |
[test-glibc227] | === ldd libopentui.so ===
[test-glibc227] | linux-vdso.so.1 (0x000078abeb8f5000)
[test-glibc227] | libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000078abeac62000)
[test-glibc227] | libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x000078abeaa43000)
[test-glibc227] | libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000078abea652000)
[test-glibc227] | libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x000078abea44e000)
[test-glibc227] | /lib64/ld-linux-x86-64.so.2 (0x000078abeb600000)
[test-glibc227] |
[test-glibc227] | === Required GLIBC symbol versions ===
[test-glibc227] | GLIBC_2.10
[test-glibc227] | GLIBC_2.17
[test-glibc227] | GLIBC_2.2.5
[test-glibc227] | GLIBC_2.27
[test-glibc227] | GLIBC_2.3
[test-glibc227] | GLIBC_2.3.2
[test-glibc227] | GLIBC_2.4
[test-glibc227] | GLIBC_2.7
[test-glibc227] |
[test-glibc227] | === Attempting dlopen + reporting runtime glibc ===
[test-glibc227] | runtime glibc: 2.27
[test-glibc227] |
[test-glibc227] | === SUCCESS: Binary actually loads on GLIBC 2.27 ===
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pin Linux native prebuild targets to glibc 2.28.
After the native audio change, miniaudio pulls in libm symbols. With
unpinned linux-gnu targets, builds on newer hosts bound against
GLIBC_2.29, preventing the prebuilt library from loading on systems
with older glibc (e.g. RHEL/AlmaLinux 8).
Pinning x86_64-linux-gnu.2.28 and aarch64-linux-gnu.2.28 caps the
maximum referenced symbol version at GLIBC_2.28 while preserving
GNU/glibc dynamic linking. Verified via dlopen(RTLD_NOW) on
AlmaLinux 8 (glibc 2.28) and Ubuntu 18.04 (glibc 2.27)