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

quickstart AWT-quarkus-rest-quickstart is missing glibc version 2.29 after docker build #29711

Closed
pspino opened this issue Dec 6, 2022 · 3 comments
Assignees
Labels
area/native-image kind/bug Something isn't working

Comments

@pspino
Copy link

pspino commented Dec 6, 2022

Describe the bug

The quickstart project awt-quarkus-rest-quickstart is currently not working in native mode with the current configuration and the Dockerfile.native modification required for libfreetype, freetype and fontconfig addition to the image. The built image still have the error ./application: /lib64/libm.so.6: version 'GLIBC_2.29' not found (required by ./application)

Expected behavior

To start the application without any missing libs.

Actual behavior

./application: /lib64/libm.so.6: version 'GLIBC_2.29' not found (required by ./application) is shown and the application will not boot.

How to Reproduce?

Steps to reproduce the bug:

  1. Clone the quickstart repo using git clone and open the project in Intellij.
  2. add the following to Dockerfile.native file:
    RUN microdnf install freetype-devel freetype fontconfig \
        && microdnf clean all
    
  3. run ./mvnw package -Pnative -DskipTests
  4. run docker build -f src/main/docker/Dockerfile.native -t quarkus/awt-graphics-rest-quickstart .
  5. run docker run -i --rm -p 8080:8080 quarkus/awt-graphics-rest-quickstart
  6. Get the error after docker is done booting the container.

Output of uname -a or ver

Linux pspino-Precision-7560 5.14.0-1054-oem #61-Ubuntu SMP Fri Oct 14 13:05:50 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06) OpenJDK 64-Bit Server VM GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06, mixed mode, sharing)

GraalVM version (if different from Java)

graalvm-ce-java17-22.2.0

Quarkus version or git rev

2.14.2

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /home/pspino/.m2/wrapper/dists/apache-maven-3.8.6-bin/67568434/apache-maven-3.8.6 Java version: 11.0.3, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-11.0.3 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.14.0-1054-oem", arch: "amd64", family: "unix"

Additional information

I am also currently trying to use AWT-quarkus inside my own application and i get the same error. I've built my own extension using this quickstart as baseline for the extension.

@pspino pspino added the kind/bug Something isn't working label Dec 6, 2022
@geoand
Copy link
Contributor

geoand commented Dec 7, 2022

cc @Karm

@Karm
Copy link
Member

Karm commented Dec 25, 2022

Related to October's quarkusio/quarkus-quickstarts#1190 IMHO

@Karm
Copy link
Member

Karm commented Dec 26, 2022

Hello @pspino,

The main branch of Quickstarts is broken for this particular quickstart, see quarkusio/quarkus-quickstarts#1190

Check the development branch Dockerfiles or the updated version in this PR https://github.com/quarkusio/quarkus-quickstarts/pull/1220/files

version 'GLIBC_2.29' not found

The native binary built is not entirely system independent. It requires GLIBC of a version compatible with the one it was built with. It is generally O.K. to build with an older one (e.g. on an older Ubuntu or older Fedora) and to run on a newer system. It does not work to build with a new glibc, e.g. your latest Linux workstation and to run it with older Linux.
To make an example: It does not work to build the app on Ubuntu 20 and to run the same binary on Amazon Lambda based on Centos 7 - like system.

How to address that? Use builder container to build with the Linux version (as in the OS+GLIBC) you need.

Additional libraries

The AWT is more complicated in that it requires more libraries. At runtime, you should use those libraries you used at build time. In other words, the application is not statically linking them, they are shared, dynamically linked.

I am closing this as it is not a Quarkus issue. Feel free to reach out on our Zulip.

@Karm Karm closed this as completed Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants