Skip to content

Build glibc and musl natives in a concurrent platform matrix - #4

Merged
irrld merged 1 commit into
opencollab-incubator:mainfrom
ziaxzulu:zulu/linux-libc-matrix
Sep 30, 2026
Merged

irrld merged 1 commit into
opencollab-incubator:mainfrom
ziaxzulu:zulu/linux-libc-matrix

Conversation

@ziaxzulu

@ziaxzulu ziaxzulu commented Sep 29, 2026 •

Copy link
Copy Markdown

Linux natives currently share classifiers despite depending on glibc, so Alpine JVMs attempt to load incompatible binaries. Add explicit linux-glibc-* / linux-musl-* natives for x86_64 and aarch64, selected automatically by the bundled loader. A single concurrent matrix now builds all eight Linux, Windows, and macOS targets. Publishing waits for all eight jobs to pass.

The loader identifies the libc mapped into the running JVM, including musl with gcompat installed, with an explicit override for environments without procfs. All eight jobs build on matching x86_64 or ARM64 runners. Only musl uses an Alpine 3.22 container. Glibc uses GCC 12 and OpenSSL on Ubuntu 22.04; Windows uses native MSYS2 MINGW64/CLANGARM64 with static OpenSSL; macOS uses its host toolchain. Every job checks lazy and eager bundle loading, native certificate generation, callbacks and peer cleanup in a matching JVM. Windows checks remove toolchain DLL directories from PATH. Linux uses distribution OpenSSL 3 and C++ runtime libraries. Java sources compile with JDK 17 and --release 11, allowing a native Windows ARM64 JDK while preserving Java 11 bytecode/API compatibility.

Explicit users of the old linux-x86_64 / linux-aarch64 classifiers must migrate when upgrading. Other platform classifiers are unchanged. Host development packaging and documentation use the new identifiers too.

Validation:

  • Loader and architecture tests passed locally.
  • Release glibc and musl x86_64 builds passed locally. A combined bundle containing both natives passed lazy/eager loading and native lifecycle in Ubuntu 22.04 and Alpine 3.22 JVMs, without gcompat.
  • Workflow validation passed with actionlint.
  • All eight native build jobs and their lazy/eager JVM lifecycle checks passed at fbcea71422136ec8dbdae1bbae14fb57eabfb02a: matrix run. Native regressions passed at the same commit.
  • Both host-built glibc binaries require GLIBC 2.34 and GLIBCXX 3.4.30; the ARM64 requirements match the previous cross-built artifact.
  • After the JDK toolchain change, loader tests and both local Linux JVM load checks passed; generated main classes retain Java 11 class-file version 55.

Addresses the native packaging cause reported in GeyserMC/Geyser#6738. No Geyser changes are included.

@ziaxzulu ziaxzulu changed the title Build and select explicit glibc and musl Linux natives Build glibc and musl natives in a concurrent platform matrix Sep 29, 2026
Add explicit Linux libc classifiers and detect the libc used by the running JVM. Build all eight desktop targets concurrently on matching native runners, using containers only for Alpine, and verify packaged native loading on each target.

Assisted-by: OpenAI Codex (gpt-6-astra high)
@ziaxzulu
ziaxzulu force-pushed the zulu/linux-libc-matrix branch from fbcea71 to c1bd401 Compare September 29, 2026 17:19
@irrld
irrld merged commit b70d796 into opencollab-incubator:main Sep 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants