Closed 15669072513 closed 11 months ago
Hi can you please share a small reproducer, also the whole stack trace (not as an image)
Sure no problem
Hello ,i have edited the issue which include all the information.
and this ,it has already generate the git-pre-push-hook.lib in target dir ,why it still try to find it in the Temp dir ?
Describe the issue i was use graalvm maven plugin generate native image file,but causing linking failure on windows
my environment is ok ,i can execute the HelloWorld.java correct.but when i use maven ,it fail.
Steps to reproduce the issue Please include both build steps as well as run steps
I import a maven dependency:
TThere is a algo dir static resources should be included
Here i include the dir in the pom.xml:
open vs2022 x64 Native Tool CMD execute : mvn -Pnative -DskipTest package
here is the error output
[7/7] Creating image... (0.0s @ 2.50GB) Fatal error: com.oracle.svm.core.util.VMError$HostedError: should not reach here at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:64) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.jdk.JNIRegistrationSupport.makeShimDLL(JNIRegistrationSupport.java:273) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.jdk.JNIRegistrationSupport.makeShimDLLs(JNIRegistrationSupport.java:247) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.jdk.JNIRegistrationSupport.afterImageWrite(JNIRegistrationSupport.java:192) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$doRun$8(NativeImageGenerator.java:724) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:85) 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:535) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:403) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:580) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
Produced artifacts: c:\Users\gujin\git-pre-push-hook\target\awt.dll (jdk_lib) c:\Users\gujin\git-pre-push-hook\target\git-pre-push-hook.build_artifacts.txt (txt) c:\Users\gujin\git-pre-push-hook\target\git-pre-push-hook.exe (executable)
Failed generating 'c:\Users\gujin\git-pre-push-hook\target\git-pre-push-hook' after 3m 46s. Error: Image build request failed with exit status 1 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 04:15 min [INFO] Finished at: 2023-12-04T10:21:13+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.9.28:compile-no-fork (build-native) on project git-pre-push-hook: Execution of C:\Users\gujin\Downloads\graalvm-ce-java17-22.3.1\bin\native-image.cmd @target\tmp\native-image-1027028260236657520.args com.antgroup.oss.gitprepushhook.PrePushHook returned non-zero result -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException