oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
https://www.graalvm.org
Other
20.4k stars 1.64k forks source link

Native Image build static program error #7185

Closed XhstormR closed 1 year ago

XhstormR commented 1 year ago

Running in docker graalvm container ghcr.io/graalvm/native-image-community:latest, this is the sample zip test.zip.

/app2/build/native/nativeCompile/reports:

bash-5.1# pwd
/app2/build/native/nativeCompile/reports
bash-5.1# cat native_library_info_20230811_100208.txt
Static libraries:
   ../../../../usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64/liblibchelper.a
   ../../../../usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnet.a
   ../../../../usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnio.a
   ../../../../usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libmanagement_ext.a
   ../../../../usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libjava.a
   ../../../../usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libfdlibm.a
   ../../../../usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libzip.a
   ../../../../usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64/libjvm.a
Other libraries: z,pthread,dl,rt
bash-5.1# cat target_info_20230811_100132.txt
Building image for target platform: org.graalvm.nativeimage.Platform$LINUX_AMD64
Using native toolchain:
   Name: GNU project C and C++ compiler (gcc)
   Vendor: redhat
   Version: 11.3.1
   Target architecture: x86_64
   Path: /usr/bin/gcc
Using CLibrary: com.oracle.svm.hosted.c.libc.HostedGLibC
bash-5.1#

GraalVM Native Image Error Report

Build Output

========================================================================================================================
GraalVM Native Image: Generating 'sast' (static executable)...
========================================================================================================================
For detailed information and explanations on the build output, visit:
https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/BuildOutput.md
------------------------------------------------------------------------------------------------------------------------
[1/8] Initializing...                                                                                    (6.2s @ 0.12GB)
 Java version: 20.0.2+9, vendor version: GraalVM CE 20.0.2+9.1
 Graal compiler: optimization level: 2, target machine: x86-64-v3
 C compiler: gcc (redhat, x86_64, 11.3.1)
 Garbage collector: Serial GC (max heap size: 80% of RAM)
[2/8] Performing analysis...  [******]                                                                  (35.7s @ 1.50GB)
   5,512 (81.37%) of  6,774 types reachable
   7,044 (54.01%) of 13,041 fields reachable
  25,550 (48.83%) of 52,324 methods reachable
   1,661 types,   104 fields, and   914 methods registered for reflection
      95 types,   103 fields, and   101 methods registered for JNI access
       4 native libraries: dl, pthread, rt, z
[3/8] Building universe...                                                                               (4.4s @ 0.68GB)
[4/8] Parsing methods...      [**]                                                                       (2.3s @ 0.73GB)
[5/8] Inlining methods...     [***]                                                                      (1.3s @ 0.79GB)
[6/8] Compiling methods...    [******]                                                                  (44.5s @ 1.27GB)
[7/8] Layouting methods...    [**]                                                                       (3.1s @ 1.31GB)

[8/8] Creating image...       [**]                                                                       (0.0s @ 1.56GB)

Stack Trace

java.lang.RuntimeException: There was an error linking the native image: Linker command exited with 1

Linker command executed:
/usr/bin/gcc -z noexecstack -Wl,--gc-sections -Wl,--version-script,/tmp/SVM-10071555883257182348/exported_symbols.list -Wl,-x -o /app2/build/native/nativeCompile/sast sast.o /usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64/liblibchelper.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnet.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnio.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libmanagement_ext.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libjava.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libfdlibm.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libzip.a /usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64/libjvm.a -static -v -L/tmp/SVM-10071555883257182348 -L/usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc -L/usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64 -lz -lpthread -ldl -lrt

Linker command output:
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-host-pie --enable-host-bind-now --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-plugin --enable-initfini-array --without-isl --enable-multilib --with-linker-hash-style=gnu --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_64=x86-64-v2 --with-arch_32=x86-64 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.1 20221121 (Red Hat 11.3.1-4.3.0.1) (GCC) 
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/11/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/11/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/11/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-z' 'noexecstack' '-o' '/app2/build/native/nativeCompile/sast' '-static' '-v' '-L/tmp/SVM-10071555883257182348' '-L/usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc' '-L/usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64' '-mtune=generic' '-march=x86-64-v2' '-dumpdir' '/app2/build/native/nativeCompile/sast.'
 /usr/libexec/gcc/x86_64-redhat-linux/11/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/11/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccRxV0ko.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lc --build-id --no-add-needed --hash-style=gnu -m elf_x86_64 -static -o /app2/build/native/nativeCompile/sast -z noexecstack /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/11/crtbeginT.o -L/tmp/SVM-10071555883257182348 -L/usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc -L/usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64 -L/usr/lib/gcc/x86_64-redhat-linux/11 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../.. --gc-sections --version-script /tmp/SVM-10071555883257182348/exported_symbols.list -x sast.o /usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64/liblibchelper.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnet.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnio.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libmanagement_ext.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libjava.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libfdlibm.a /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libzip.a /usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64/libjvm.a -lz -lpthread -ldl -lrt --start-group -lgcc -lgcc_eh -lc --end-group /usr/lib/gcc/x86_64-redhat-linux/11/crtend.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o
/usr/bin/ld: sast.o:(.data+0x780): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnio.a(UnixNativeDispatcher.o): in function `Java_sun_nio_fs_UnixNativeDispatcher_getgrgid':
UnixNativeDispatcher.c:(.text.Java_sun_nio_fs_UnixNativeDispatcher_getgrgid+0x8b): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnio.a(UnixNativeDispatcher.o): in function `Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0':
UnixNativeDispatcher.c:(.text.Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0+0x83): warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: sast.o:(.data+0x190): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnio.a(UnixNativeDispatcher.o): in function `Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0':
UnixNativeDispatcher.c:(.text.Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0+0x83): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnio.a(UnixNativeDispatcher.o): in function `Java_sun_nio_fs_UnixNativeDispatcher_getpwuid':
UnixNativeDispatcher.c:(.text.Java_sun_nio_fs_UnixNativeDispatcher_getpwuid+0x87): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnet.a(Inet4AddressImpl.o): in function `Java_java_net_Inet4AddressImpl_lookupAllHostAddr':
Inet4AddressImpl.c:(.text.Java_java_net_Inet4AddressImpl_lookupAllHostAddr+0x92): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib64/graalvm/graalvm-community-java20/lib/static/linux-amd64/glibc/libnio.a(UnixNativeDispatcher.o): in function `Java_sun_nio_fs_UnixNativeDispatcher_mknod0':
UnixNativeDispatcher.c:(.text.Java_sun_nio_fs_UnixNativeDispatcher_mknod0+0x44): undefined reference to `__xmknod'
collect2: error: ld returned 1 exit status
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.handleLinkerFailure(NativeImageViaCC.java:204)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.runLinkerCommand(NativeImageViaCC.java:151)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.write(NativeImageViaCC.java:117)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:724)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:539)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:408)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:612)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:134)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)

GraalVM Setup

Name Value
Java version 20.0.2+9
Vendor version GraalVM CE 20.0.2+9.1
Runtime version 20.0.2+9-jvmci-23.0-b15
C compiler gcc (redhat, x86_64, 11.3.1)
GraalVM release file ``` IMPLEMENTOR="GraalVM Community" JAVA_RUNTIME_VERSION="20.0.2+9-jvmci-23.0-b15" JAVA_VERSION="20.0.2" JAVA_VERSION_DATE="2023-07-18" LIBC="gnu" MODULES="java.base java.compiler java.instrument java.logging java.management jdk.internal.vm.ci jdk.jfr jdk.unsupported org.graalvm.sdk java.datatransfer java.xml java.prefs java.desktop java.transaction.xa java.sql jdk.management org.graalvm.truffle jdk.internal.vm.compiler com.oracle.graal.graal_enterprise com.oracle.svm.extraimage_enterprise com.oracle.svm.svm_enterprise com.oracle.svm_enterprise.ml_dataset java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.sql.rowset java.xml.crypto java.se java.smartcardio jdk.accessibility jdk.internal.jvmstat jdk.attach jdk.charsets jdk.zipfs jdk.compiler jdk.crypto.ec jdk.crypto.cryptoki jdk.dynalink jdk.internal.ed jdk.editpad jdk.hotspot.agent jdk.httpserver jdk.incubator.concurrent jdk.incubator.vector jdk.internal.le jdk.internal.opt jdk.internal.vm.compiler.management jdk.internal.vm.compiler.truffle.jfr jdk.jartool jdk.javadoc jdk.jcmd jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jlink jdk.jpackage jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.rmi jdk.net jdk.nio.mapmode jdk.random jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported.desktop jdk.xml.dom org.graalvm.extraimage.builder org.graalvm.js.scriptengine org.graalvm.locator" OS_ARCH="x86_64" OS_NAME="Linux" SOURCE=".:git:3bc9a999e94a+ labsjdk-builder:12420ad1e23067e0d670c982075d354daedbe55e compiler:0d67c739da8f4ee40ed9796185205ed54935c06b graal-js:b8af554c627475fb02bf2d7820239d5e9b488bcb java-benchmarks:0d67c739da8f4ee40ed9796185205ed54935c06b regex:0d67c739da8f4ee40ed9796185205ed54935c06b sdk:0d67c739da8f4ee40ed9796185205ed54935c06b substratevm:0d67c739da8f4ee40ed9796185205ed54935c06b tools:0d67c739da8f4ee40ed9796185205ed54935c06b truffle:0d67c739da8f4ee40ed9796185205ed54935c06b vm:0d67c739da8f4ee40ed9796185205ed54935c06b" GRAALVM_VERSION="23.0.1" COMMIT_INFO={"compiler": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689926320, "commit.rev": "0d67c739da8f4ee40ed9796185205ed54935c06b"}, "graal-js": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689063743, "commit.rev": "b8af554c627475fb02bf2d7820239d5e9b488bcb"}, "java-benchmarks": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689926320, "commit.rev": "0d67c739da8f4ee40ed9796185205ed54935c06b"}, "regex": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689926320, "commit.rev": "0d67c739da8f4ee40ed9796185205ed54935c06b"}, "sdk": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689926320, "commit.rev": "0d67c739da8f4ee40ed9796185205ed54935c06b"}, "substratevm": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689926320, "commit.rev": "0d67c739da8f4ee40ed9796185205ed54935c06b"}, "tools": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689926320, "commit.rev": "0d67c739da8f4ee40ed9796185205ed54935c06b"}, "truffle": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689926320, "commit.rev": "0d67c739da8f4ee40ed9796185205ed54935c06b"}, "vm": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689926320, "commit.rev": "0d67c739da8f4ee40ed9796185205ed54935c06b"}} component_catalog="https://www.graalvm.org/component-catalog/v2/graal-updater-component-catalog-java20.properties|{ee=GraalVM Enterprise Edition}rest://gds.oracle.com/api/20220101/" GDS_PRODUCT_ID="D53FAE8052773FFAE0530F15000AA6C6" ```

Builder Setup

Class path ``` /app2/build/libs/sast.jar /root/.gradle/caches/modules-2/files-2.1/com.github.ajalt.clikt/clikt-jvm/4.2.0/657a9636285560a8e11e68298dee7b3ec6f3ad6f/clikt-jvm.jar /root/.gradle/caches/modules-2/files-2.1/com.github.ajalt.mordant/mordant-jvm/2.1.0/3e6043f582e172c6010539233813b4c22f22a7dc/mordant-jvm.jar /root/.gradle/caches/modules-2/files-2.1/com.github.ajalt.colormath/colormath-jvm/3.3.1/8475ca9382172e02871460463283721071306165/colormath-jvm.jar /root/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.9.0/e000bd084353d84c9e888f6fb341dc1f5b79d948/kotlin-stdlib-jdk8-1.9.0.jar /root/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.9.0/f320478990d05e0cfaadd74f9619fd6027adbf37/kotlin-stdlib-jdk7-1.9.0.jar /root/.gradle/caches/modules-2/files-2.1/org.jetbrains/markdown-jvm/0.4.1/7fe358b916f6162fe3ac13c8d8fc96a2c27f3a21/markdown-jvm-0.4.1.jar /root/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.0/8ee15ef0c67dc83d874f412d84378d7f0eb50b63/kotlin-stdlib-1.9.0.jar /root/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.9.0/cd65c21cfd1eec4d44ef09f9f52b6d9f8a720636/kotlin-stdlib-common-1.9.0.jar /root/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar /root/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/5.13.0/1200e7ebeedbe0d10062093f32925a912020e747/jna-5.13.0.jar ```
Module path ``` /usr/lib64/graalvm/graalvm-community-java20/lib/svm/library-support.jar /usr/lib64/graalvm/graalvm-community-java20/lib/truffle/truffle-api.jar /usr/lib64/graalvm/graalvm-community-java20/lib/svm/builder/javacpp-platform-specific-shadowed.jar /usr/lib64/graalvm/graalvm-community-java20/lib/svm/builder/javacpp-shadowed.jar /usr/lib64/graalvm/graalvm-community-java20/lib/svm/builder/llvm-platform-specific-shadowed.jar /usr/lib64/graalvm/graalvm-community-java20/lib/svm/builder/llvm-wrapper-shadowed.jar /usr/lib64/graalvm/graalvm-community-java20/lib/svm/builder/native-image-base.jar /usr/lib64/graalvm/graalvm-community-java20/lib/svm/builder/objectfile.jar /usr/lib64/graalvm/graalvm-community-java20/lib/svm/builder/pointsto.jar /usr/lib64/graalvm/graalvm-community-java20/lib/svm/builder/svm-llvm.jar /usr/lib64/graalvm/graalvm-community-java20/lib/svm/builder/svm.jar ```
Builder arguments ``` -H:CLibraryPath=/usr/lib64/graalvm/graalvm-community-java20/lib/svm/clibraries/linux-amd64 -H:Path=/app2/build/native/nativeCompile -H:JNIConfigurationResources@jar:file:///root/.gradle/caches/modules-2/files-2.1/com.github.ajalt.mordant/mordant-jvm/2.1.0/3e6043f582e172c6010539233813b4c22f22a7dc/mordant-jvm.jar!/META-INF/native-image/com/github/ajalt/mordant/jni-config.json=META-INF/native-image/com/github/ajalt/mordant/jni-config.json -H:ReflectionConfigurationResources@jar:file:///root/.gradle/caches/modules-2/files-2.1/com.github.ajalt.mordant/mordant-jvm/2.1.0/3e6043f582e172c6010539233813b4c22f22a7dc/mordant-jvm.jar!/META-INF/native-image/com/github/ajalt/mordant/reflect-config.json=META-INF/native-image/com/github/ajalt/mordant/reflect-config.json -H:ResourceConfigurationResources@jar:file:///root/.gradle/caches/modules-2/files-2.1/com.github.ajalt.mordant/mordant-jvm/2.1.0/3e6043f582e172c6010539233813b4c22f22a7dc/mordant-jvm.jar!/META-INF/native-image/com/github/ajalt/mordant/resource-config.json=META-INF/native-image/com/github/ajalt/mordant/resource-config.json -H:DynamicProxyConfigurationResources@jar:file:///root/.gradle/caches/modules-2/files-2.1/com.github.ajalt.mordant/mordant-jvm/2.1.0/3e6043f582e172c6010539233813b4c22f22a7dc/mordant-jvm.jar!/META-INF/native-image/com/github/ajalt/mordant/proxy-config.json=META-INF/native-image/com/github/ajalt/mordant/proxy-config.json -H:FallbackThreshold=0 -H:+BuildOutputColorful -H:Path=/app2/build/native/nativeCompile -H:Name=sast -H:ConfigurationFileDirectories=/app2/build/native/generated/generateResourcesConfigFile,/root/.gradle/native-build-tools/repositories/640f3b66661aa77efb22f039c3503790957ae506/exploded/org.jetbrains.kotlin/kotlin-stdlib/1.7.10,/root/.gradle/native-build-tools/repositories/640f3b66661aa77efb22f039c3503790957ae506/exploded/net.java.dev.jna/jna/5.8.0 -H:Class=io.github.xhstormr.sast.cli.MainKt -H:+StaticExecutable -H:+DumpTargetInfo -H:Features@jar:file:///usr/lib64/graalvm/graalvm-community-java20/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties=com.oracle.svm.thirdparty.gson.GsonFeature -H:Features@jar:file:///usr/lib64/graalvm/graalvm-community-java20/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties=com.oracle.svm.polyglot.groovy.GroovyIndyInterfaceFeature,com.oracle.svm.polyglot.scala.ScalaFeature ```
Builder properties ``` -Dcom.oracle.graalvm.isaot=true -Dgraalvm.ForcePolyglotInvalid=true -Dgraalvm.locatorDisabled=true -Djava.awt.headless=true -Djava.lang.invoke.InnerClassLambdaMetafactory.initializeLambdas=false -Djava.system.class.loader=com.oracle.svm.hosted.NativeImageSystemClassLoader -Djdk.internal.lambda.disableEagerInitialization=true -Djdk.internal.lambda.eagerlyInitialize=false -Djdk.module.main=org.graalvm.nativeimage.builder -Dorg.graalvm.vendor=GraalVM Community -Dorg.graalvm.vendorurl=https://www.graalvm.org/ -Dorg.graalvm.vendorversion=GraalVM CE 20.0.2+9.1 -Dorg.graalvm.version=23.0.1 -Dsubstratevm.HostLibC=glibc -Dsubstratevm.IgnoreGraalVersionCheck=true -Dtruffle.TruffleRuntime=com.oracle.truffle.api.impl.DefaultTruffleRuntime -Dtruffle.TrustAllTruffleRuntimeProviders=true ```
Features enabled ``` com.oracle.svm.core.ContainersFeature, [] com.oracle.svm.core.IsolateArgumentParserFeature, [] com.oracle.svm.core.IsolateListenerFeature, [com.oracle.svm.core.IsolateListenerSupportFeature] com.oracle.svm.core.IsolateListenerSupportFeature, [] com.oracle.svm.core.RuntimeAssertionsSupportFeature, [] com.oracle.svm.core.StaticFieldsFeature, [] com.oracle.svm.core.StaticFieldsSupportFeature, [] com.oracle.svm.core.SubstrateExitHandlerFeature, [] com.oracle.svm.core.SubstrateSegfaultHandlerFeature, [com.oracle.svm.core.IsolateListenerSupportFeature] com.oracle.svm.core.UniqueShortNameProviderDefaultImplFeature, [] com.oracle.svm.core.UnsafeMemoryUtilFeature, [] com.oracle.svm.core.allocationprofile.AllocationProfilingFeature, [com.oracle.svm.core.jdk.RuntimeSupportFeature] com.oracle.svm.core.amd64.AMD64FrameAccessFeature, [] com.oracle.svm.core.c.CTypeConversionSupportImplFeature, [] com.oracle.svm.core.c.ProjectHeaderFileHeaderResolversRegistryFeature, [] com.oracle.svm.core.c.function.IsolateSupportImplFeature, [] com.oracle.svm.core.code.CodeInfoFeature, [com.oracle.svm.core.util.CounterFeature] com.oracle.svm.core.code.CodeInfoMemoryWalkerFeature, [] com.oracle.svm.core.code.InstalledCodeObserverSupportFeature, [] com.oracle.svm.core.cpufeature.RuntimeCPUFeatureCheckFeature, [] com.oracle.svm.core.cpufeature.RuntimeCPUFeatureCheckImplFeature, [] com.oracle.svm.core.genscavenge.AlignedHeapChunkMemoryWalkerAccessImplFeature, [] com.oracle.svm.core.genscavenge.JfrGCEventFeature, [] com.oracle.svm.core.genscavenge.PinnedObjectImplPinnedObjectSupportImplFeature, [] com.oracle.svm.core.genscavenge.UnalignedHeapChunkMemoryWalkerAccessImplFeature, [] com.oracle.svm.core.genscavenge.graal.BarrierSnippetCountersFeature, [com.oracle.svm.core.util.CounterFeature] com.oracle.svm.core.genscavenge.graal.GenScavengeGCFeature, [com.oracle.svm.core.jdk.RuntimeSupportFeature com.oracle.svm.core.jdk.management.ManagementFeature com.oracle.svm.core.jvmstat.PerfDataFeature com.oracle.svm.core.heap.AllocationFeature] com.oracle.svm.core.graal.amd64.AMD64NativePatchConsumerFactoryFeature, [] com.oracle.svm.core.graal.amd64.SubstrateAMD64Feature, [] com.oracle.svm.core.graal.amd64.SubstrateAMD64GraphBuilderPlugins, [] com.oracle.svm.core.graal.jdk.JDKIntrinsicsFeature, [] com.oracle.svm.core.graal.snippets.CFunctionSnippetsFeature, [] com.oracle.svm.core.graal.snippets.DeoptSnippetsFeature, [] com.oracle.svm.core.graal.snippets.ExceptionFeature, [] com.oracle.svm.core.graal.snippets.SafepointFeature, [] com.oracle.svm.core.graal.snippets.StackOverflowCheckFeature, [] com.oracle.svm.core.graal.snippets.amd64.AMD64SnippetsFeature, [] com.oracle.svm.core.graal.stackvalue.StackValueFeature, [] com.oracle.svm.core.handles.ObjectHandlesSupportImplFeature, [] com.oracle.svm.core.heap.AllocationFeature, [] com.oracle.svm.core.heap.GCCauseFeature, [] com.oracle.svm.core.heap.HostedHeapSizeVerifierFeature, [] com.oracle.svm.core.heap.ReferenceAccessImplFeature, [] com.oracle.svm.core.heap.ReferenceHandlerThreadFeature, [] com.oracle.svm.core.heap.VMOperationInfosFeature, [] com.oracle.svm.core.heap.VMOperationNamesFeatures, [] com.oracle.svm.core.hub.ClassForNameSupportFeature, [] com.oracle.svm.core.hub.DynamicHubSupportFeature, [] com.oracle.svm.core.identityhashcode.SubstrateIdentityHashCodeFeature, [] com.oracle.svm.core.jdk.AtomicFieldUpdaterFeature, [] com.oracle.svm.core.jdk.ClassLoaderSupportFeature, [] com.oracle.svm.core.jdk.CompletableFutureFeature, [] com.oracle.svm.core.jdk.FileSystemProviderFeature, [] com.oracle.svm.core.jdk.ForkJoinPoolFeature, [] com.oracle.svm.core.jdk.InnocuousForkJoinWorkerThreadFeature, [] com.oracle.svm.core.jdk.JDKVersionSpecificResourceBuilderJDK11OrLaterFeature, [] com.oracle.svm.core.jdk.JRTDisableFeature, [] com.oracle.svm.core.jdk.JavaNetFeature, [] com.oracle.svm.core.jdk.JavaNetHttpFeature, [] com.oracle.svm.core.jdk.NativeLibrarySupportFeature, [] com.oracle.svm.core.jdk.PlatformNativeLibrarySupportFeature, [] com.oracle.svm.core.jdk.RecordSupportJDK11OrEarlierFeature, [] com.oracle.svm.core.jdk.ResourcesFeature, [] com.oracle.svm.core.jdk.RuntimeFeature, [com.oracle.svm.core.jdk.RuntimeSupportFeature] com.oracle.svm.core.jdk.RuntimeSupportFeature, [] com.oracle.svm.core.jdk.SealedClassSupportJDK11OrEarlierFeature, [] com.oracle.svm.core.jdk.ServiceCatalogSupportFeature, [] com.oracle.svm.core.jdk.SimpleWebServerFeature, [] com.oracle.svm.core.jdk.TimeZoneFeature, [] com.oracle.svm.core.jdk.TrustStoreManagerFeature, [] com.oracle.svm.core.jdk.URLProtocolsSupportFeature, [] com.oracle.svm.core.jdk.VarHandleFeature, [] com.oracle.svm.core.jdk.localization.LocalizationFeature, [] com.oracle.svm.core.jdk.management.ManagementFeature, [com.oracle.svm.core.jdk.RuntimeSupportFeature com.oracle.svm.core.thread.ThreadListenerSupportFeature] com.oracle.svm.core.jdk17.RecordSupportJDK17OrLaterFeature, [] com.oracle.svm.core.jdk17.SealedClassSupportJDK17OrLaterFeature, [] com.oracle.svm.core.jfr.sampler.JfrNoExecutionSamplerFeature, [com.oracle.svm.core.jfr.JfrFeature] com.oracle.svm.core.jfr.sampler.JfrRecurringCallbackExecutionSamplerFeature, [com.oracle.svm.core.jfr.JfrFeature] com.oracle.svm.core.jvmstat.PerfDataFeature, [com.oracle.svm.core.thread.VMOperationListenerSupportFeature com.oracle.svm.core.jdk.RuntimeSupportFeature] com.oracle.svm.core.meta.SubstrateObjectConstantEqualityFeature, [] com.oracle.svm.core.monitor.MonitorFeature, [] com.oracle.svm.core.option.RuntimeOptionsSupportImplFeature, [] com.oracle.svm.core.option.ValidateImageBuildOptionsFeature, [] com.oracle.svm.core.os.BufferedFileOperationFeature, [] com.oracle.svm.core.os.ImageHeapProviderFeature, [] com.oracle.svm.core.os.OSCommittedMemoryProviderFeature, [] com.oracle.svm.core.posix.IgnoreSIGPIPEFeature, [] com.oracle.svm.core.posix.PosixLoadAverageSupportFeature, [] com.oracle.svm.core.posix.PosixLogHandlerFeature, [] com.oracle.svm.core.posix.PosixNativeLibraryFeature, [] com.oracle.svm.core.posix.PosixRawFileOperationFeature, [] com.oracle.svm.core.posix.PosixSubstrateSegfaultHandlerFeature, [] com.oracle.svm.core.posix.PosixSubstrateSigProfHandlerFeature, [com.oracle.svm.core.IsolateListenerSupportFeature com.oracle.svm.core.jfr.JfrFeature] com.oracle.svm.core.posix.PosixVirtualMemoryProviderFeature, [] com.oracle.svm.core.posix.UnmanagedMemorySupportImplFeature, [] com.oracle.svm.core.posix.amd64.AMD64LinuxUContextRegisterDumperFeature, [] com.oracle.svm.core.posix.heapdump.AllocationFreeFileOutputStreamPosixFeature, [] com.oracle.svm.core.posix.linux.LinuxImageSingletonsFeature, [] com.oracle.svm.core.posix.linux.LinuxPhysicalMemorySupportImplFeature, [] com.oracle.svm.core.posix.linux.LinuxProcessPropertiesSupportFeature, [] com.oracle.svm.core.posix.linux.LinuxStackOverflowSupportFeature, [] com.oracle.svm.core.posix.linux.LinuxSystemPropertiesFeature, [] com.oracle.svm.core.posix.linux.LinuxThreadCpuTimeSupportFeature, [] com.oracle.svm.core.posix.linux.LinuxVMSemaphoreFeature, [] com.oracle.svm.core.posix.pthread.PthreadVMLockFeature, [] com.oracle.svm.core.posix.thread.PosixParkerFactoryFeature, [] com.oracle.svm.core.posix.thread.PosixPlatformThreadsFeature, [] com.oracle.svm.core.posix.thread.PosixVMThreadsFeature, [] com.oracle.svm.core.reflect.target.ReflectionMetadataDecoderImplFeature, [] com.oracle.svm.core.reflect.target.ReflectionMetadataDecoderImplMetadataAccessorImplFeature, [] com.oracle.svm.core.reflect.target.ReflectionMetadataEncodingFeature, [] com.oracle.svm.core.thread.ContinuationsFeature, [] com.oracle.svm.core.thread.JavaThreadsFeature, [] com.oracle.svm.core.thread.SafepointMasterFeature, [] com.oracle.svm.core.thread.ThreadListenerSupportFeature, [] com.oracle.svm.core.thread.ThreadingSupportImplFeature, [] com.oracle.svm.core.thread.VMOperationControlFeature, [] com.oracle.svm.core.thread.VMOperationListenerSupportFeature, [] com.oracle.svm.core.threadlocal.VMThreadLocalInfosFeature, [] com.oracle.svm.core.util.CounterFeature, [] com.oracle.svm.core.util.HostedStringDeduplicationFeature, [] com.oracle.svm.graal.RuntimeCPUFeatureRegionFeature, [] com.oracle.svm.graal.isolated.DisableSnippetCountersFeature, [] com.oracle.svm.graal.isolated.IsolateAwareObjectConstantEqualityFeature, [] com.oracle.svm.graal.meta.amd64.AMD64RuntimeCodeInstallerPlatformHelperFeature, [] com.oracle.svm.graal.stubs.AMD64StubForeignCallsFeature, [] com.oracle.svm.hosted.AMD64CPUFeatureAccessFeature, [] com.oracle.svm.hosted.ClassLoaderFeature, [] com.oracle.svm.hosted.ClassNewInstanceFeature, [] com.oracle.svm.hosted.ClassPredefinitionFeature, [] com.oracle.svm.hosted.ClassValueFeature, [] com.oracle.svm.hosted.ConcurrentReachabilityHandler, [] com.oracle.svm.hosted.FallbackFeature, [] com.oracle.svm.hosted.Log4ShellFeature, [] com.oracle.svm.hosted.LoggingFeature, [] com.oracle.svm.hosted.ModuleLayerFeature, [] com.oracle.svm.hosted.NativeSecureRandomFilesCloser, [] com.oracle.svm.hosted.ProgressReporterFeature, [] com.oracle.svm.hosted.ProtectionDomainFeature, [] com.oracle.svm.hosted.ResourcesFeature, [] com.oracle.svm.hosted.SecurityServicesFeature, [] com.oracle.svm.hosted.ServiceLoaderFeature, [] com.oracle.svm.hosted.SubstrateDiagnosticFeature, [] com.oracle.svm.hosted.SystemInOutErrFeature, [] com.oracle.svm.hosted.VMFeature, [] com.oracle.svm.hosted.ameta.HostedDynamicHubFeature, [] com.oracle.svm.hosted.annotation.AnnotationSupportFeature, [] com.oracle.svm.hosted.annotation.AnnotationTypeFeature, [] com.oracle.svm.hosted.c.CGlobalDataFeature, [] com.oracle.svm.hosted.c.function.CEntryPointSupport, [] com.oracle.svm.hosted.c.libc.HostedLibCFeature, [] com.oracle.svm.hosted.classinitialization.ClassInitializationFeature, [] com.oracle.svm.hosted.code.CEntryPointCallStubFeature, [] com.oracle.svm.hosted.code.CEntryPointLiteralFeature, [] com.oracle.svm.hosted.code.CFunctionLinkagesFeature, [] com.oracle.svm.hosted.code.CFunctionPointerCallStubSupportFeature, [] com.oracle.svm.hosted.code.FactoryMethodSupportFeature, [] com.oracle.svm.hosted.code.FrameInfoHostedMethodDataFeature, [] com.oracle.svm.hosted.code.RestrictHeapAccessCalleesFeature, [] com.oracle.svm.hosted.code.SubstrateCompilationDirectivesFeature, [] com.oracle.svm.hosted.code.SubstrateLIRBackendFeature, [] com.oracle.svm.hosted.code.UninterruptibleAnnotationCheckerFeature, [] com.oracle.svm.hosted.code.amd64.AMD64HostedPatcherFeature, [] com.oracle.svm.hosted.code.amd64.AMD64HostedTrampolineSupportFeature, [] com.oracle.svm.hosted.fieldfolding.StaticFinalFieldFoldingFeature, [] com.oracle.svm.hosted.heap.HeapDumpFeature, [] com.oracle.svm.hosted.heap.ImageHeapMapFeature, [] com.oracle.svm.hosted.heap.PodFeature, [] com.oracle.svm.hosted.image.DisallowedImageHeapObjectFeature, [com.oracle.svm.core.jdk.management.ManagementFeature] com.oracle.svm.hosted.image.ImageHeapFillerObjectsFeature, [] com.oracle.svm.hosted.image.MethodPointerInvalidHandlerFeature, [] com.oracle.svm.hosted.image.StringInternFeature, [] com.oracle.svm.hosted.image.sources.SourceCacheFeature, [] com.oracle.svm.hosted.jdk.AccessControlContextReplacerFeature, [] com.oracle.svm.hosted.jdk.JDKInitializationFeature, [] com.oracle.svm.hosted.jdk.JDKRegistrations, [] com.oracle.svm.hosted.jdk.JNIRegistrationAWTSupport, [] com.oracle.svm.hosted.jdk.JNIRegistrationJava, [] com.oracle.svm.hosted.jdk.JNIRegistrationJavaNet, [] com.oracle.svm.hosted.jdk.JNIRegistrationJavaNio, [] com.oracle.svm.hosted.jdk.JNIRegistrationManagementExt, [] com.oracle.svm.hosted.jdk.JNIRegistrationPrefs, [] com.oracle.svm.hosted.jdk.JNIRegistrationSupport, [] com.oracle.svm.hosted.jdk.JNIRegistrationsJavaZip, [] com.oracle.svm.hosted.jdk.JRTFeature, [] com.oracle.svm.hosted.jdk.localization.CharsetSubstitutionsFeature, [] com.oracle.svm.hosted.jdk.localization.LocalizationFeature, [] com.oracle.svm.hosted.jdk17.JNIRegistrationSupport_JDK17OrLater, [] com.oracle.svm.hosted.jni.JNIAccessFeature, [com.oracle.svm.hosted.meta.KnownOffsetsFeature] com.oracle.svm.hosted.jni.JNIAutomaticFeature, [com.oracle.svm.hosted.jni.JNIFeature] com.oracle.svm.hosted.jni.JNICallWrapperFeature, [com.oracle.svm.hosted.jni.JNIAccessFeature] com.oracle.svm.hosted.jni.JNIFeature, [com.oracle.svm.hosted.jni.JNIFunctionTablesFeature com.oracle.svm.hosted.jni.JNICallWrapperFeature com.oracle.svm.hosted.jni.JNILibraryLoadFeature] com.oracle.svm.hosted.jni.JNIFunctionTablesFeature, [com.oracle.svm.hosted.jni.JNIAccessFeature] com.oracle.svm.hosted.jni.JNILibraryLoadFeature, [] com.oracle.svm.hosted.lambda.StableLambdaProxyNameFeature, [] com.oracle.svm.hosted.meta.HostedMethodNameFactory, [] com.oracle.svm.hosted.meta.InvalidVTableEntryFeature, [] com.oracle.svm.hosted.meta.KnownOffsetsFeature, [com.oracle.svm.hosted.thread.VMThreadMTFeature] com.oracle.svm.hosted.meta.MaterializedConstantFieldsFeature, [] com.oracle.svm.hosted.methodhandles.MethodHandleFeature, [] com.oracle.svm.hosted.option.RuntimeOptionFeature, [] com.oracle.svm.hosted.phases.EnumSwitchFeature, [] com.oracle.svm.hosted.reflect.ReflectionFeature, [] com.oracle.svm.hosted.reflect.ReflectionMetadataEncoderImplFactoryFeature, [] com.oracle.svm.hosted.reflect.proxy.DynamicProxyFeature, [com.oracle.svm.hosted.reflect.ReflectionFeature] com.oracle.svm.hosted.reflect.serialize.SerializationFeature, [com.oracle.svm.hosted.reflect.ReflectionFeature com.oracle.svm.hosted.reflect.proxy.DynamicProxyFeature] com.oracle.svm.hosted.snippets.ExceptionUnwindFeature, [] com.oracle.svm.hosted.snippets.ImplicitExceptionsFeature, [] com.oracle.svm.hosted.substitute.AutomaticSubstitutionFeature, [] com.oracle.svm.hosted.thread.CEntryPointFeature, [com.oracle.svm.hosted.thread.VMThreadMTFeature] com.oracle.svm.hosted.thread.VMThreadMTFeature, [] com.oracle.svm.hosted.xml.JavaxXmlClassAndResourcesLoaderFeature, [] com.oracle.svm.truffle.TruffleJFRFeature, [] ```
oubidar-Abderrahim commented 1 year ago

Hi, Thank you for reaching out, I see that you're trying to build a static image, but the image used doesn't have muslib installed. You can either keep using the same image but build a dynamic NI, or switch to a muslib image docker pull ghcr.io/graalvm/native-image-community:20-muslib