graalvm / container

GraalVM container images
Other
166 stars 37 forks source link

Unable to run on fedora 40: Fatal glibc error: CPU does not support x86-64-v2 #94

Open napsta32 opened 3 months ago

napsta32 commented 3 months ago

I am currently trying to run the graalvm native image community but I can't on a fedora 40 VM:

$ docker run --rm -it --platform linux/x86_64 --entrypoint=/bin/sh ghcr.io/graalvm/native-image-community:21
Fatal glibc error: CPU does not support x86-64-v2

I checked and it looks my VM supports x86-64-v2:

$ ld.so --help
...
Shared library search path:
  (libraries located via /etc/ld.so.cache)
  /lib64 (system search path)
  /usr/lib64 (system search path)

Subdirectories of glibc-hwcaps directories, in priority order:
  x86-64-v4
  x86-64-v3
  x86-64-v2

I don't have such problems in my windows machine

napsta32 commented 3 months ago

I just found out that it was because of Oracle Linux 9:

$ docker run -it --rm --entrypoint=/bin/sh container-registry.oracle.com/os/oraclelinux:9-slim
Unable to find image 'container-registry.oracle.com/os/oraclelinux:9-slim' locally
9-slim: Pulling from os/oraclelinux
f5a4b7786db5: Pull complete
Digest: sha256:5026cfa7e6ad6c0299796fd468573fd7044dfc226f8b3c5198b79b96bb2765fa
Status: Downloaded newer image for container-registry.oracle.com/os/oraclelinux:9-slim
Fatal glibc error: CPU does not support x86-64-v2

If I use Oracle Linux 8, it works fine:

$ docker run -it --rm --entrypoint=/bin/sh ghcr.io/graalvm/native-image-community:21-ol8
sh-4.4# 
napsta32 commented 3 months ago

I tested my native app with OL8 and got these errors:

/lib64/libc.so.6: version `GLIBC_2.32' not found (required by /app/default)
/lib64/libc.so.6: version `GLIBC_2.34' not found (required by /app/default)

Why is graalvm relying on oracle linux? alma linux could be an option maybe?