Open ctoabidmaqbool opened 2 months ago
after converting build.sh to linux compatable and then running ./build.sh
:
maqboolstudiopc@MSC-30:/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo$ dos2unix build.sh
dos2unix: converting file build.sh to Unix format...
maqboolstudiopc@MSC-30:/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo$ ./build.sh
Creating native image ...
Apply jar:file:///mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties
Apply jar:file:///mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties
Executing [
HOME=/home/maqboolstudiopc \
LANG=C.UTF-8 \
'PATH=/mnt/d/Programs/gradle-7.3.3-bin/bin:/mnt/d/Programs/apache-maven-3.8.8-bin/bin:/mnt/d/AndroidSDKLinux/platform-tools:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/bin:/mnt/d/Programs/gradle-7.3.3-bin/bin:/mnt/d/Programs/apache-maven-3.8.8-bin/bin:/mnt/d/AndroidSDKLinux/platform-tools:/mnt/d/Programs/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_2.2.4.0_x64__8wekyb3d8bbwe:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Program Files/TortoiseSVN/bin:/mnt/c/Program Files/TortoiseGit/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/:/mnt/c/Program Files/dotnet/:/mnt/d/Programs/ideaIC-2023.3.3.win/bin:/mnt/d/xampp1/php:/mnt/c/ProgramData/ComposerSetup/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Users/MSC-30/AppData/Local/Microsoft/WindowsApps:/mnt/d/Programs/zulu17.48.15-ca-jdk17.0.10-win_x64/bin:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/d/Programs/gradle-7.3.3-bin/bin:/mnt/d/AndroidSDK/platform-tools:/mnt/c/Users/MSC-30/AppData/Roaming/npm:/mnt/c/Users/MSC-30/.dotnet/tools:/mnt/c/Program Files (x86)/WiX Toolset v3.14/bin:/mnt/c/Program Files (x86)/Nmap:/mnt/d/Programs/ideaIC-2023.3.3.win/bin:/mnt/c/Users/MSC-30/AppData/Roaming/Composer/vendor/bin:/snap/bin' \
PWD=/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo \
USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM=true \
/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/bin/java \
-XX:+UseParallelGC \
-XX:+UnlockExperimentalVMOptions \
-XX:+EnableJVMCI \
-Dtruffle.TrustAllTruffleRuntimeProviders=true \
-Dtruffle.TruffleRuntime=com.oracle.truffle.api.impl.DefaultTruffleRuntime \
-Dgraalvm.ForcePolyglotInvalid=true \
-Dgraalvm.locatorDisabled=true \
-Dsubstratevm.HostLibC=glibc \
--add-exports=java.base/com.sun.crypto.provider=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.access=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.event=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.loader=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.logger=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.misc=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto \
--add-exports=java.base/jdk.internal.module=org.graalvm.nativeimage.base,org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.org.objectweb.asm=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.perf=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.platform=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.ref=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=java.base/jdk.internal.reflect=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.util=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.vm.annotation=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal.vm=org.graalvm.nativeimage.builder \
--add-exports=java.base/jdk.internal=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.invoke.util=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.net.www=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.net=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.nio.ch=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=java.base/sun.reflect.annotation=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.factory=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.reflectiveObjects=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.repository=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.scope=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.reflect.generics.tree=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.jca=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.provider=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.ssl=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.util=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.security.x509=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.text.spi=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.calendar=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.cldr=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.locale.provider=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.locale=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util.resources=org.graalvm.nativeimage.builder \
--add-exports=java.base/sun.util=org.graalvm.nativeimage.builder \
--add-exports=java.management/com.sun.jmx.mbeanserver=org.graalvm.nativeimage.builder \
--add-exports=java.management/sun.management=org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto,org.graalvm.truffle.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.common=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.graal.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.graal.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.riscv64=jdk.graal.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.graal.compiler,org.graalvm.nativeimage.base,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.objectfile,org.graalvm.nativeimage.pointsto,org.graalvm.truffle.compiler \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.riscv64=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.graal.compiler,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.pointsto \
--add-exports=jdk.internal.vm.ci/jdk.vm.ci.services=jdk.graal.compiler,org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.events=org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.internal.event=org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.internal.jfc=org.graalvm.nativeimage.builder \
--add-exports=jdk.jfr/jdk.jfr.internal=org.graalvm.nativeimage.builder \
--add-exports=jdk.management/com.sun.management.internal=org.graalvm.nativeimage.builder \
-XX:+UseJVMCINativeLibrary \
-Xss10m \
-XX:MaxRAMPercentage=85.0 \
-XX:GCTimeRatio=9 \
-XX:+ExitOnOutOfMemoryError \
-Djava.awt.headless=true \
'-Dorg.graalvm.vendor=GraalVM Community' \
-Dorg.graalvm.vendorurl=https://www.graalvm.org/ \
'-Dorg.graalvm.vendorversion=GraalVM CE 22.0.2+9.1' \
-Dorg.graalvm.version=24.0.2 \
-Dcom.oracle.graalvm.isaot=true \
-Djava.system.class.loader=com.oracle.svm.hosted.NativeImageSystemClassLoader \
-Xshare:off \
-Djdk.reflect.useOldSerializableConstructor=true \
-Djdk.internal.lambda.disableEagerInitialization=true \
-Djdk.internal.lambda.eagerlyInitialize=false \
-Djava.lang.invoke.InnerClassLambdaMetafactory.initializeLambdas=false \
-Djava.lang.invoke.MethodHandle.DONT_INLINE_THRESHOLD=-1 \
-Djava.lang.invoke.MethodHandle.PROFILE_GWT=false \
-Djava.awt.headless=false \
-Xmx7G \
--add-modules=ALL-DEFAULT \
--module-path \
/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/native-image-base.jar:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/objectfile.jar:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/pointsto.jar:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/svm-foreign.jar:/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/builder/svm.jar \
--module \
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner \
-keepalive \
/proc/3890/comm \
-imagecp \
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/flatlaf-demo.jar \
-imagemp \
/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar \
-H:CLibraryPath=/mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/clibraries/linux-amd64 \
-H:Path@driver=/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo \
-H:FallbackThreshold@user+api=0 \
-H:ConfigurationFileDirectories@user=/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/config \
'-H:Name@manifest from file:///mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/flatlaf-demo.jar=flatlaf-demo' \
'-H:Class@manifest from file:///mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/flatlaf-demo.jar=com.formdev.flatlaf.demo.FlatLafDemo' \
'-H:Name@explicit image name=demo' \
-H:ImageBuildID@driver=2c151a08-9a93-2267-ed2b-40c783d91f35 \
'-H:Features@jar:file:///mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties+api=com.oracle.svm.thirdparty.gson.GsonFeature' \
'-H:Features@jar:file:///mnt/d/Programs/graalvm-community-jdk-22.0.2_linux-x64_bin/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties+api=com.oracle.svm.polyglot.groovy.GroovyIndyInterfaceFeature,com.oracle.svm.polyglot.scala.ScalaFeature' \
-H:Color@driver=always \
-H:+BuildOutputProgress@driver \
-H:+BuildOutputLinks@driver
]
========================================================================================================================
GraalVM Native Image: Generating 'demo' (executable)...
========================================================================================================================
[1/8] Initializing... (24.1s @ 0.07GB)
Java version: 22.0.2+9, vendor version: GraalVM CE 22.0.2+9.1
Graal compiler: optimization level: 2, target machine: x86-64-v3
C compiler: gcc (linux, x86_64, 9.4.0)
Garbage collector: Serial GC (max heap size: 80% of RAM)
1 user-specific feature(s):
- com.oracle.svm.thirdparty.gson.GsonFeature
------------------------------------------------------------------------------------------------------------------------
Build resources:
- 6.22GB of memory (80.7% of 7.71GB system memory, set via '-Xmx7G')
- 4 thread(s) (100.0% of 4 available processor(s), determined at start)
[2/8] Performing analysis... [****] (213.0s @ 3.05GB)
10,588 reachable types (84.5% of 12,523 total)
22,881 reachable fields (62.2% of 36,814 total)
62,639 reachable methods (63.1% of 99,196 total)
3,406 types, 138 fields, and 1,692 methods registered for reflection
154 types, 249 fields, and 124 methods registered for JNI access
4 native libraries: dl, pthread, rt, z
[3/8] Building universe... (27.7s @ 1.20GB)
[4/8] Parsing methods... [****] (16.6s @ 1.36GB)
[5/8] Inlining methods... [****] (16.2s @ 1.51GB)
[6/8] Compiling methods... [[6/8] Compiling methods... [***************] (228.3s @ 1.23GB)
[7/8] Laying out methods... [***] (10.3s @ 1.64GB)
[8/8] Creating image... [[8/8] Creating image... [******] (35.3s @ 1.86GB)
32.75MB (51.69%) for code area: 40,484 compilation units
27.51MB (43.42%) for image heap: 283,538 objects and 199 resources
3.10MB ( 4.89%) for other data
63.35MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 origins of code area: Top 10 object types in image heap:
18.16MB java.desktop 9.83MB byte[] for code metadata
6.90MB java.base 3.87MB byte[] for java.lang.String
3.70MB java.xml 3.00MB java.lang.Class
1.97MB flatlaf-demo.jar 2.99MB java.lang.String
1.15MB svm.jar (Native Image) 909.91kB com.oracle.svm.core.hub.DynamicHubCompanion
122.93kB java.datatransfer 645.27kB java.lang.String[]
118.58kB java.logging 612.39kB byte[] for reflection metadata
97.37kB java.prefs 513.21kB int[][]
70.52kB jdk.proxy1 502.06kB byte[] for embedded resources
64.68kB org.graalvm.nativeimage.base 499.08kB java.util.HashMap$Node
118.71kB for 7 more packages 4.22MB for 1700 more object types
------------------------------------------------------------------------------------------------------------------------
Recommendations:
HEAP: Set max heap for improved and more predictable memory usage.
CPU: Enable more CPU features with '-march=native' for improved performance.
------------------------------------------------------------------------------------------------------------------------
47.7s (8.1% of total time) in 1993 GCs | Peak RSS: 3.70GB | CPU load: 3.48
------------------------------------------------------------------------------------------------------------------------
Build artifacts:
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/demo (executable)
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libawt.so (jdk_library)
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libawt_headless.so (jdk_library)
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libawt_xawt.so (jdk_library)
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libfontmanager.so (jdk_library)
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libjava.so (jdk_library_shim)
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libjavajpeg.so (jdk_library)
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libjsound.so (jdk_library)
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/libjvm.so (jdk_library_shim)
/mnt/d/NetBeansProjects/BuildApps/swing-graalvm-demo/liblcms.so (jdk_library)
========================================================================================================================
Finished generating 'demo' in 9m 40s.
Compressing executable ...
./build.sh: 13: upx: not found
In linux running demo after building, the errors are generated: