-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
$ sw_vers
ProductName: macOS
ProductVersion: 12.7.6
BuildVersion: 21H1320
$ uname -m
x86_64
$ java --version
openjdk 24.0.1 2025-04-15
OpenJDK Runtime Environment GraalVM CE 24.0.1+9.1 (build 24.0.1+9-jvmci-b01)
OpenJDK 64-Bit Server VM GraalVM CE 24.0.1+9.1 (build 24.0.1+9-jvmci-b01, mixed mode, sharing
$ javac --version
javac 24.0.1$ mkdir -p /tmp/test/src && cd "$_/.."
$ cat <<'EOF' >src/Test.java
public class Test {
public static void main(String[] args) {
System.out.println("test");
}
}
EOF$ javac --release 21 -d . src/Test.java
$ java Test
test
$ native-image -march=native -o test Test
...
$ ./test
test$ cat <<'EOF' >Dockerfile
FROM ghcr.io/graalvm/native-image-community:24.0.1-ol9-20250415
COPY src ./
RUN javac --release 21 Test.java
RUN native-image -march=native -o test Test
EOF
$ cat <<'EOF' >.dockerignore
*
!src
EOF$ docker build --no-cache --tag=graal-test .
...
$ docker run -it --rm --entrypoint /app/test graal-test
test$ sed '1d' Dockerfile >Dockerfile.tmp
$ echo 'FROM ghcr.io/graalvm/native-image-community:24.0.1-muslib-ol9-20250415' >Dockerfile
$ cat Dockerfile.tmp >>Dockerfile
$ rm Dockerfile.tmp
$ cat Dockerfile
FROM ghcr.io/graalvm/native-image-community:24.0.1-muslib-ol9-20250415
COPY src ./
RUN javac --release 21 Test.java
RUN native-image -march=native -o test Test$ docker build --no-cache --tag=graal-test .
[+] Building 7.0s (8/8) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 202B 0.0s
=> [internal] load metadata for ghcr.io/graalvm/native-image-community:24.0.1-muslib-ol9-20250415 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 47B 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 57B 0.0s
=> CACHED [1/4] FROM ghcr.io/graalvm/native-image-community:24.0.1-muslib-ol9-20250415@sha256:60a35b6a06baee 0.0s
=> => resolve ghcr.io/graalvm/native-image-community:24.0.1-muslib-ol9-20250415@sha256:60a35b6a06baeeb6b562f 0.0s
=> [2/4] COPY src ./ 0.0s
=> [3/4] RUN javac --release 21 Test.java 1.3s
=> ERROR [4/4] RUN native-image -march=native -o test Test 5.5s
------
> [4/4] RUN native-image -march=native -o test Test:
3.446 ========================================================================================================================
3.449 GraalVM Native Image: Generating 'test' (executable)...
3.450 ========================================================================================================================
3.450 For detailed information and explanations on the build output, visit:
3.450 https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/BuildOutput.md
3.450 ------------------------------------------------------------------------------------------------------------------------
5.360
5.362 [1/8] Initializing... (0.0s @ 0.06GB)
5.432 ------------------------------------------------------------------------------------------------------------------------
5.441 0.3s (5.7% of total time) in 14 GCs | Peak RSS: 0.39GB | CPU load: 3.52
5.441 ------------------------------------------------------------------------------------------------------------------------
5.441 Build artifacts:
5.444 /app/svm_err_b_20250525T125243.105_pid32.md (build_info)
5.444 ========================================================================================================================
5.444 Failed generating 'test' after 3.3s.
5.445
5.445 The build process encountered an unexpected error:
5.445
5.445 > com.oracle.svm.core.util.VMError$HostedError: Unable to run '/tmp/SVM-16609667032398063872/ContainerLibraryDirectives' to compute offsets in C data structures. Is it possible that your antivirus software interferes and puts the resulting file into quarantine?
5.445
5.445 Please inspect the generated error report at:
5.446 /app/svm_err_b_20250525T125243.105_pid32.md
5.446
5.446 If you are unable to resolve this problem, please file an issue with the error report at:
5.446 https://graalvm.org/support
------
Dockerfile:7
--------------------
5 | RUN javac --release 21 Test.java
6 |
7 | >>> RUN native-image -march=native -o test Test
8 |
--------------------
ERROR: failed to solve: process "/bin/sh -c native-image -march=native -o test Test" did not complete successfully: exit code: 1Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels