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

Fatal error: java.lang.IllegalAccessError: class org.jgrapht.capi.JGraphTDirectives (in unnamed module @0x6f1c3f18) cannot access class com.oracle.svm.core.c.ProjectHeaderFile (in module org.graalvm.nativeimage.builder) because module org.graalvm.nativeimage.builder does not export com.oracle.svm.core.c to unnamed module @0x6f1c3f18 #2

Open
jagonzalez4gcp opened this issue Sep 28, 2022 · 1 comment

Comments

@jagonzalez4gcp
Copy link

Hi im triying to compile jgrapht-capi on Ubuntu 20.04 with With GraalVM 22.0.0, but im getting this error

Fatal error: java.lang.IllegalAccessError: class org.jgrapht.capi.JGraphTDirectives (in unnamed module @0x6f1c3f18) cannot access class com.oracle.svm.core.c.ProjectHeaderFile (in module org.graalvm.nativeimage.builder) because module org.graalvm.nativeimage.builder does not export com.oracle.svm.core.c to unnamed module @0x6f1c3f18

Complete trace

`make
[ 0%] Building jar file with C native scopes
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< org.jgrapht:jgrapht-capi >----------------------
[INFO] Building JGraphT Library C-API 0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm/21.0.0.2/svm-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm/21.0.0.2/svm-21.0.0.2.pom (2.7 kB at 7.3 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-linux-amd64/21.0.0.2/svm-hosted-native-linux-amd64-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-linux-amd64/21.0.0.2/svm-hosted-native-linux-amd64-21.0.0.2.pom (1.3 kB at 18 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-darwin-amd64/21.0.0.2/svm-hosted-native-darwin-amd64-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-darwin-amd64/21.0.0.2/svm-hosted-native-darwin-amd64-21.0.0.2.pom (1.3 kB at 18 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-windows-amd64/21.0.0.2/svm-hosted-native-windows-amd64-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-windows-amd64/21.0.0.2/svm-hosted-native-windows-amd64-21.0.0.2.pom (1.4 kB at 20 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/sdk/graal-sdk/21.0.0.2/graal-sdk-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/sdk/graal-sdk/21.0.0.2/graal-sdk-21.0.0.2.pom (1.4 kB at 19 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/objectfile/21.0.0.2/objectfile-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/objectfile/21.0.0.2/objectfile-21.0.0.2.pom (1.5 kB at 20 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/compiler/compiler/21.0.0.2/compiler-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/compiler/compiler/21.0.0.2/compiler-21.0.0.2.pom (1.6 kB at 22 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-api/21.0.0.2/truffle-api-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-api/21.0.0.2/truffle-api-21.0.0.2.pom (1.5 kB at 21 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/pointsto/21.0.0.2/pointsto-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/pointsto/21.0.0.2/pointsto-21.0.0.2.pom (1.5 kB at 22 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi/21.0.0.2/truffle-nfi-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi/21.0.0.2/truffle-nfi-21.0.0.2.pom (2.0 kB at 27 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-linux-amd64/21.0.0.2/truffle-nfi-native-linux-amd64-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-linux-amd64/21.0.0.2/truffle-nfi-native-linux-amd64-21.0.0.2.pom (1.3 kB at 17 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-linux-aarch64/21.0.0.2/truffle-nfi-native-linux-aarch64-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-linux-aarch64/21.0.0.2/truffle-nfi-native-linux-aarch64-21.0.0.2.pom (1.3 kB at 18 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-darwin-amd64/21.0.0.2/truffle-nfi-native-darwin-amd64-21.0.0.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-darwin-amd64/21.0.0.2/truffle-nfi-native-darwin-amd64-21.0.0.2.pom (1.3 kB at 18 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jgrapht/jgrapht-opt/1.5.1/jgrapht-opt-1.5.1.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/jgrapht/jgrapht-opt/1.5.1/jgrapht-opt-1.5.1.pom (2.4 kB at 34 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/8.5.2/fastutil-8.5.2.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/8.5.2/fastutil-8.5.2.pom (1.4 kB at 18 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jgrapht/jgrapht-unimi-dsi/1.5.1/jgrapht-unimi-dsi-1.5.1.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/jgrapht/jgrapht-unimi-dsi/1.5.1/jgrapht-unimi-dsi-1.5.1.pom (6.8 kB at 91 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/dsiutils/2.6.17/dsiutils-2.6.17.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/dsiutils/2.6.17/dsiutils-2.6.17.pom (3.9 kB at 55 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/8.5.1/fastutil-8.5.1.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/8.5.1/fastutil-8.5.1.pom (1.4 kB at 21 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/di/jsap/20210129/jsap-20210129.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/di/jsap/20210129/jsap-20210129.pom (881 B at 13 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.pom (29 kB at 354 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.pom (12 kB at 174 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/30.1-jre/guava-parent-30.1-jre.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/30.1-jre/guava-parent-30.1-jre.pom (14 kB at 191 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.pom (2.2 kB at 33 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.pom (3.8 kB at 57 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/1.7.25/slf4j-parent-1.7.25.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/1.7.25/slf4j-parent-1.7.25.pom (14 kB at 185 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/sux4j/5.2.3/sux4j-5.2.3.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/sux4j/5.2.3/sux4j-5.2.3.pom (4.4 kB at 58 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/webgraph/3.6.10/webgraph-3.6.10.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/webgraph/3.6.10/webgraph-3.6.10.pom (4.4 kB at 58 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/webgraph-big/3.6.6/webgraph-big-3.6.6.pom
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/webgraph-big/3.6.6/webgraph-big-3.6.6.pom (3.5 kB at 17 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm/21.0.0.2/svm-21.0.0.2.jar
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-darwin-amd64/21.0.0.2/svm-hosted-native-darwin-amd64-21.0.0.2.tar.gz
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-linux-amd64/21.0.0.2/svm-hosted-native-linux-amd64-21.0.0.2.tar.gz
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/sdk/graal-sdk/21.0.0.2/graal-sdk-21.0.0.2.jar
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-windows-amd64/21.0.0.2/svm-hosted-native-windows-amd64-21.0.0.2.tar.gz
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-windows-amd64/21.0.0.2/svm-hosted-native-windows-amd64-21.0.0.2.tar.gz (109 kB at 466 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/objectfile/21.0.0.2/objectfile-21.0.0.2.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-darwin-amd64/21.0.0.2/svm-hosted-native-darwin-amd64-21.0.0.2.tar.gz (101 kB at 357 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/pointsto/21.0.0.2/pointsto-21.0.0.2.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/sdk/graal-sdk/21.0.0.2/graal-sdk-21.0.0.2.jar (553 kB at 1.8 MB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi/21.0.0.2/truffle-nfi-21.0.0.2.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm-hosted-native-linux-amd64/21.0.0.2/svm-hosted-native-linux-amd64-21.0.0.2.tar.gz (153 kB at 455 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-api/21.0.0.2/truffle-api-21.0.0.2.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi/21.0.0.2/truffle-nfi-21.0.0.2.jar (1.5 MB at 1.7 MB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-linux-amd64/21.0.0.2/truffle-nfi-native-linux-amd64-21.0.0.2.tar.gz
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-linux-amd64/21.0.0.2/truffle-nfi-native-linux-amd64-21.0.0.2.tar.gz (99 kB at 103 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-linux-aarch64/21.0.0.2/truffle-nfi-native-linux-aarch64-21.0.0.2.tar.gz
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-linux-aarch64/21.0.0.2/truffle-nfi-native-linux-aarch64-21.0.0.2.tar.gz (96 kB at 92 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-darwin-amd64/21.0.0.2/truffle-nfi-native-darwin-amd64-21.0.0.2.tar.gz
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-nfi-native-darwin-amd64/21.0.0.2/truffle-nfi-native-darwin-amd64-21.0.0.2.tar.gz (27 kB at 23 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/graalvm/compiler/compiler/21.0.0.2/compiler-21.0.0.2.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/objectfile/21.0.0.2/objectfile-21.0.0.2.jar (996 kB at 535 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jgrapht/jgrapht-opt/1.5.1/jgrapht-opt-1.5.1.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/jgrapht/jgrapht-opt/1.5.1/jgrapht-opt-1.5.1.jar (38 kB at 19 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/8.5.2/fastutil-8.5.2.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/pointsto/21.0.0.2/pointsto-21.0.0.2.jar (1.3 MB at 401 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jgrapht/jgrapht-unimi-dsi/1.5.1/jgrapht-unimi-dsi-1.5.1.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/jgrapht/jgrapht-unimi-dsi/1.5.1/jgrapht-unimi-dsi-1.5.1.jar (88 kB at 26 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/dsiutils/2.6.17/dsiutils-2.6.17.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/dsiutils/2.6.17/dsiutils-2.6.17.jar (516 kB at 131 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/di/jsap/20210129/jsap-20210129.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/di/jsap/20210129/jsap-20210129.jar (90 kB at 22 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar (2.2 MB at 305 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/truffle/truffle-api/21.0.0.2/truffle-api-21.0.0.2.jar (7.1 MB at 878 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.5.0/checker-qual-3.5.0.jar (214 kB at 26 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/sux4j/5.2.3/sux4j-5.2.3.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/sux4j/5.2.3/sux4j-5.2.3.jar (455 kB at 53 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/webgraph/3.6.10/webgraph-3.6.10.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/webgraph/3.6.10/webgraph-3.6.10.jar (384 kB at 43 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/webgraph-big/3.6.6/webgraph-big-3.6.6.jar
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/webgraph-big/3.6.6/webgraph-big-3.6.6.jar (296 kB at 32 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/nativeimage/svm/21.0.0.2/svm-21.0.0.2.jar (12 MB at 1.3 MB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/com/google/guava/guava/30.1-jre/guava-30.1-jre.jar (2.9 MB at 299 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/compiler/compiler/21.0.0.2/compiler-21.0.0.2.jar (19 MB at 1.6 MB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/8.5.2/fastutil-8.5.2.jar (24 MB at 1.5 MB/s)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jgrapht-capi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ jgrapht-capi ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 75 source files to /home/joules/jgrapht-capi/build/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ jgrapht-capi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/joules/jgrapht-capi/build/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ jgrapht-capi ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ jgrapht-capi ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jgrapht-capi ---
[INFO] Building jar: /home/joules/jgrapht-capi/build/target/jgrapht-capi-0.1.jar
[INFO]
[INFO] --- maven-shade-plugin:3.2.2:shade (default) @ jgrapht-capi ---
[INFO] Including org.jgrapht:jgrapht-core:jar:1.5.1 in the shaded jar.
[INFO] Including org.jheaps:jheaps:jar:0.13 in the shaded jar.
[INFO] Including org.jgrapht:jgrapht-io:jar:1.5.1 in the shaded jar.
[INFO] Including org.antlr:antlr4-runtime:jar:4.8-1 in the shaded jar.
[INFO] Including org.apache.commons:commons-text:jar:1.8 in the shaded jar.
[INFO] Including org.apache.commons:commons-lang3:jar:3.9 in the shaded jar.
[INFO] Including org.jgrapht:jgrapht-opt:jar:1.5.1 in the shaded jar.
[INFO] Including it.unimi.dsi:fastutil:jar:8.5.2 in the shaded jar.
[INFO] Including org.jgrapht:jgrapht-unimi-dsi:jar:1.5.1 in the shaded jar.
[INFO] Including it.unimi.dsi:dsiutils:jar:2.6.17 in the shaded jar.
[INFO] Including it.unimi.di:jsap:jar:20210129 in the shaded jar.
[INFO] Including org.apache.commons:commons-math3:jar:3.6.1 in the shaded jar.
[INFO] Including com.google.guava:guava:jar:30.1-jre in the shaded jar.
[INFO] Including com.google.guava:failureaccess:jar:1.0.1 in the shaded jar.
[INFO] Including com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava in the shaded jar.
[INFO] Including com.google.code.findbugs:jsr305:jar:3.0.2 in the shaded jar.
[INFO] Including org.checkerframework:checker-qual:jar:3.5.0 in the shaded jar.
[INFO] Including com.google.errorprone:error_prone_annotations:jar:2.3.4 in the shaded jar.
[INFO] Including com.google.j2objc:j2objc-annotations:jar:1.3 in the shaded jar.
[INFO] Including org.slf4j:slf4j-api:jar:1.7.30 in the shaded jar.
[INFO] Including ch.qos.logback:logback-core:jar:1.2.3 in the shaded jar.
[INFO] Including ch.qos.logback:logback-classic:jar:1.2.3 in the shaded jar.
[INFO] Including it.unimi.dsi:sux4j:jar:5.2.3 in the shaded jar.
[INFO] Including it.unimi.dsi:webgraph:jar:3.6.10 in the shaded jar.
[INFO] Including it.unimi.dsi:webgraph-big:jar:3.6.6 in the shaded jar.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[WARNING] commons-lang3-3.9.jar, commons-math3-3.6.1.jar, commons-text-1.8.jar define 1 overlapping resources:
[WARNING] - META-INF/NOTICE.txt
[WARNING] antlr4-runtime-4.8-1.jar, checker-qual-3.5.0.jar, commons-lang3-3.9.jar, commons-math3-3.6.1.jar, commons-text-1.8.jar, dsiutils-2.6.17.jar, error_prone_annotations-2.3.4.jar, failureaccess-1.0.1.jar, fastutil-8.5.2.jar, guava-30.1-jre.jar, j2objc-annotations-1.3.jar, jgrapht-capi-0.1.jar, jgrapht-core-1.5.1.jar, jgrapht-io-1.5.1.jar, jgrapht-opt-1.5.1.jar, jgrapht-unimi-dsi-1.5.1.jar, jheaps-0.13.jar, jsap-20210129.jar, jsr305-3.0.2.jar, listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar, logback-classic-1.2.3.jar, logback-core-1.2.3.jar, slf4j-api-1.7.30.jar, sux4j-5.2.3.jar, webgraph-3.6.10.jar, webgraph-big-3.6.6.jar define 1 overlapping resources:
[WARNING] - META-INF/MANIFEST.MF
[WARNING] checker-qual-3.5.0.jar, commons-lang3-3.9.jar, commons-math3-3.6.1.jar, commons-text-1.8.jar define 1 overlapping resources:
[WARNING] - META-INF/LICENSE.txt
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing /home/joules/jgrapht-capi/build/target/jgrapht-capi-0.1.jar with /home/joules/jgrapht-capi/build/target/jgrapht-capi-0.1-shaded.jar
[INFO] Dependency-reduced POM written at: /home/joules/jgrapht-capi/build/dependency-reduced-pom.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.401 s
[INFO] Finished at: 2022-09-28T10:44:08-05:00
[INFO] ------------------------------------------------------------------------
[ 0%] Built target build-jar
[ 1%] Producing shared library from jar file
Warning: Ignoring server-mode native-image argument --no-server.
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports
WARNING: Unknown module: org.graalvm.nativeimage.llvm specified to --add-exports

GraalVM Native Image: Generating 'jgrapht_capi' (shared library)...

--initialize-at-build-time without arguments has been deprecated when not using --diagnostics-mode. With GraalVM 22.0.0 --initialize-at-build-time will only work with --diagnostics-mode for debugging purposes.
The reason for deprecation is that --initalize-at-build-time does not compose, i.e., a single library can make assumptions that the whole classpath can be safely initialized at build time; that assumption is often incorrect.

[1/7] Initializing... (0.0s @ 0.44GB)
Fatal error: java.lang.IllegalAccessError: class org.jgrapht.capi.JGraphTDirectives (in unnamed module @0x6f1c3f18) cannot access class com.oracle.svm.core.c.ProjectHeaderFile (in module org.graalvm.nativeimage.builder) because module org.graalvm.nativeimage.builder does not export com.oracle.svm.core.c to unnamed module @0x6f1c3f18
at org.jgrapht.capi.JGraphTDirectives.getHeaderFiles(JGraphTDirectives.java:44)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.c.codegen.QueryCodeWriter.visitNativeCodeInfo(QueryCodeWriter.java:146)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.c.info.NativeCodeInfo.accept(NativeCodeInfo.java:57)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.c.codegen.QueryCodeWriter.write(QueryCodeWriter.java:91)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.c.CAnnotationProcessor.process(CAnnotationProcessor.java:101)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.c.NativeLibraries.finish(NativeLibraries.java:554)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.processNativeLibraryImports(NativeImageGenerator.java:1617)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.setupNativeLibraries(NativeImageGenerator.java:1073)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:896)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:561)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:521)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:407)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:585)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)

                    0.5s (7.1% of total time) in 11 GCs | Peak RSS: 0.91GB | CPU load: 3.55

========================================================================================================================
Failed generating 'jgrapht_capi' after 6.9s.
Error: Image build request failed with exit status 1
make[2]: *** [CMakeFiles/build-jgrapht-sharedlib.dir/build.make:73: libjgrapht_capi.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:309: CMakeFiles/build-jgrapht-sharedlib.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
`

@fjhenigman
Copy link

fjhenigman commented Feb 26, 2023

having the same problem. did you get any farther?
edit: I had success with graalvm 20.3.0.
For the record, I was doing "pip3 install jgrapht" and the pypi jgrapht version was 1.5.0.3.
And I thought it was the same Ubuntu as the first poster, but actually was 22.04.2.

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

No branches or pull requests

2 participants