slachiewicz opened a new issue, #1825:
URL: https://github.com/apache/maven-mvnd/issues/1825

   I propose glibc 2.17 as the minimum for the Linux native client on master 
(2.x), on x86_64 as well as aarch64, and building the client inside an old 
distribution instead of patching GraalVM's libraries.
   
   The x86_64 client targets glibc 2.12 today. That is below GraalVM's own 
minimum: the [Linux installation 
guide](https://www.graalvm.org/latest/getting-started/linux/) lists "glibc: 
Version 2.17 or later" for Native Image. Reaching 2.12 takes the adjustments in 
`release.yaml` and `client/pom.xml`: the `stat-compat.c` shim, the relinked 
`Scrt1.o`, the `glibc.redef` symbol maps, the `gcc` wrappers and the two 
`linux-image-only-require-glibc-*` profiles. glibc 2.12 is RHEL 6, which has no 
vendor support of any kind left. Systems below the floor keep working through 
the Java client: `bin/mvnd.sh` falls back to it when `ldd` reports a missing 
glibc version.
   
   A native client takes its glibc requirement from the system that links it, 
not from GraalVM. On aarch64, building the client from master with no 
adjustments gives the following results:
   
   | Built on | GraalVM | Newest glibc symbol version required | Starts on |
   |---|---|---|---|
   | Ubuntu 24.04 | Oracle 25.0.4, CE 25.4 (25.0.4.1.1), Mandrel 25.0.4.1, 
Oracle for JDK 21 (23.1.12) | `GLIBC_2.34` | AlmaLinux 9, Ubuntu 24.04 |
   | AlmaLinux 8 | Oracle 25.0.4 | `GLIBC_2.17` (all 229 imports) | CentOS 7, 
AlmaLinux 8 and 9, Ubuntu 24.04 |
   
   The `GLIBC_2.34` symbols are pthread, semaphore and `dl*` functions that 
glibc 2.34 merged into libc, plus `__libc_start_main`; all of them exist in 
2.17 under older versions. GraalVM's static libraries need nothing newer than 
2.17 on either architecture in all five distributions checked, and they call 
`__xstat`, not `stat`.
   
   The change on master would do the following:
   
   1. Run the two Linux jobs of `release.yaml` and `early-access.yaml` in an 
`almalinux:8` container (or GraalVM's Oracle Linux 8 image) on the existing 
`ubuntu-24.04` and `ubuntu-24.04-arm` runners. AlmaLinux 8 needs `zlib-static` 
from its `powertools` repository.
   2. Delete the adjustments listed above, keeping the `objdump` check with 
2.17 as the limit on both architectures.
   3. Update the README, which documents 2.12 for x86_64 after #1824.
   
   x86_64 is untested. #1611 reports that GraalVM 25 calls `stat()` directly on 
x86_64; nothing references it on aarch64. If the x86_64 image still needs 
`stat`, the shim stays for that architecture, and the CI run of the PR will 
show it.
   
   #1561 (draft) adds the aarch64 versions of these adjustments; this proposal 
would make them unnecessary. Background: #812, #823, #1611.
   
   `mvnd-1.x` is out of scope.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to