Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLibC version incompatibility for mostly static native image #6183

Closed
ole-ve opened this issue Mar 11, 2023 · 1 comment
Closed

GLibC version incompatibility for mostly static native image #6183

ole-ve opened this issue Mar 11, 2023 · 1 comment

Comments

@ole-ve
Copy link

ole-ve commented Mar 11, 2023

Describe the issue
Building and running a mostly static native image on Ubuntu 22.04 works fine, but when executing this same native image on Ubuntu 20.04, there seems to be a version incompatibility of GLibC. Both systems run on amd64.

Steps to reproduce the issue

  1. Create any basic (Gradle) Java project. Example
  2. Build a native image from this project (./gradlew nativeCompile) on an Ubuntu 22.04 machine
  3. Execute this image on an Ubuntu 20.04 machine (e.g. in a Docker container)

Describe GraalVM and your environment:

  • GraalVM version: GraalVM CE 23.0.0-dev-20230303_0222
  • JDK major version: 17
  • OS: Ubuntu 22.04
  • Architecture: AMD64

More details
I have also checked that the issue is not related to the Gradle plugin but just provided an example with it for convenience.

The error output when executing on Ubuntu 20.04:

/app: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /app)
/app: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /app)

I couldn't find information regarding incompatibility between linux distros running different versions of GlibC. But that shouldn't be an issue, right?

@fniephaus
Copy link
Member

Thanks for the ticket, @ole-ve.

Building and running a mostly static native image on Ubuntu 22.04 works fine, but when executing this same native image on Ubuntu 20.04

This is somewhat expected, at least on Linux and macOS. For best compatibility, build on the oldest OS (or oldest GLibC) you want to target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants