I’m trying to build a native image for a simple Kotlin app using GraalVM, I’m using the com.palantir.graal gradle plugin which downloads and extracts GraalVM, but during the native image build I get the following error:
Error: Basic header file missing (<zlib.h>).
It seems this is missing on the
Has anyone tried to build a native image for a Java application using CircleCI?
Build result on CircleCI:
The quick fix is to change the Docker image to
oracle/graalvm-ce:latest (see https://app.circleci.com/jobs/github/adr/adr-j/39).
With the JDK image, a simple
sudo apt-get update && sudo apt-get install -y linux-libc-dev did not resolve the issue. Maybe,
zlib1g-dev (see https://packages.debian.org/cgi-bin/search_contents.pl?word=zlib.h&searchmode=searchfiles&case=insensitive&version=stable&arch=i386) is required. I did not want to play around, because the above solution (using the GraalVM image), just works.