-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
When I try out native-image.cmd, I get this output:
C:\Users\gasto\source>c:\Users\gasto\source\graalvm\bin\native-image.cmd -jar sample.jar
[sample:4708] classlist: 1,092.27 ms
[sample:4708] (cap): 556.12 ms
[sample:4708] setup: 758.53 ms
Error: Error compiling query code (in C:\Users\gasto\AppData\Local\Temp\SVM-13462688330564265984\BuiltinDirectives.cpp). Compiler command CL C:\Users\gasto\AppData\Local\Temp\SVM-13462688330564265984\BuiltinDirectives.cpp /FeC:\Users\gasto\AppData\Local\Temp\SVM-13462688330564265984\BuiltinDirectives.exe output included error: [Microsoft (R) C/C++ Optimizing Compiler Version 19.30.30705 for x86, Copyright (C) Microsoft Corporation. All rights reserved., ]
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1
This error message appears to me to be saying that the version string "Microsoft (R) C/C++ Optimizing Compiler" is considered to be an error.
After some research I discovered I could ask CL to not output that message. Then when I ran native-image.cmd again, I got this output:
C:\Users\gasto\source>c:\Users\gasto\source\graalvm\bin\native-image.cmd -jar sample.jar
[sample:17748] classlist: 1,106.08 ms
[sample:17748] (cap): 797.48 ms
[sample:17748] setup: 997.00 ms
Error: Error compiling query code (in C:\Users\gasto\AppData\Local\Temp\SVM-15925301482144563839\LibFFIHeaderDirectives.cpp). Compiler command CL -IC:\Users\gasto\source\graalvm\lib\svm\clibraries\windows-amd64\include C:\Users\gasto\AppData\Local\Temp\SVM-15925301482144563839\LibFFIHeaderDirectives.cpp /FeC:\Users\gasto\AppData\Local\Temp\SVM-15925301482144563839\LibFFIHeaderDirectives.exe output included error: []
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1
Is it possible to:
-
Reword the error message to not indicate that presence of the version string is the problem? Maybe something like ", error output:" instead of "included error" and add "CL failed with exit status 1"?
-
By default, ask CL to not print this header (something like CL=/nologo)?
-
Add more details about what the error is? When I ask CL to not print its header information above, the error appears to be empty.
Describe GraalVM and your environment:
/cygdrive/c/Users/gasto/source/graalvm
$ grep VERSION release
GRAALVM_VERSION=19.3.6
C:\Users\gasto\source>java -version
java version "16.0.2" 2021-07-20
Java(TM) SE Runtime Environment (build 16.0.2+7-67)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)
- OS: Windows 10 Home
- Architecture: 64-bit operating system, x64-based processor
More details
C:\Users\gasto\source>c:\Users\gasto\source\graalvm\bin\native-image.cmd --native-image-info --verbose -jar sample.jar
Error: Unrecognized option: --native-image-info
com.oracle.svm.driver.NativeImage$NativeImageError: Unrecognized option: --native-image-info
at com.oracle.svm.driver.NativeImage.showError(NativeImage.java:1482)
at com.oracle.svm.driver.NativeImage.completeImageBuild(NativeImage.java:1101)
at com.oracle.svm.driver.NativeImage.build(NativeImage.java:1252)
at com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1222)
at com.oracle.svm.driver.NativeImage.main(NativeImage.java:1181)
at com.oracle.svm.driver.NativeImage$JDK9Plus.main(NativeImage.java:1665)
Thanks