Closed gengraphael closed 1 year ago
@dmlloyd Are GraalVM native images even expected to work on Windows?
I believe they can work if you have JNI enabled but I haven't tried it personally.
I have the same problem. ( I believe our error messages match line by line. ) Where you following the QUARKUS - BUILDING A NATIVE EXECUTABLE as well ?
HI... yes i do!
Linux under Centos 8 ist working! Only windows not!
Could it be related to the fact that the command was changed in 0.27.0?
It's now: ./mvnw package -Dnative -Dquarkus.native.container-build=true
Sorry, I added it to the announcement blog a bit after the release.
On Thu, Oct 31, 2019 at 10:57 AM gengraphael notifications@github.com wrote:
HI... yes i do!
Linux under Centos 8 ist working! Only windows not!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/quarkusio/quarkus/issues/4841?email_source=notifications&email_token=AAJYOBK27FCE2Z4HGLC7EITQRKTZ7A5CNFSM4JEU3RP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECXEXZQ#issuecomment-548293606, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJYOBJBMNO5FNYFF4G62CDQRKTZ7ANCNFSM4JEU3RPQ .
I now started again from scratch....
Dockerfile with:
FROM mcr.microsoft.com/windows/servercore:1903
FROM mcr.microsoft.com/powershell:preview
LABEL version="1.0"
LABEL discription="Creates an image with vs_buildtools2017"
LABEL release-date="2018-11-11"
LABEL modified-date="2018-11-11" `
Powershell to setup environment with chcoc choco install dotnet4.7 -y choco install windows-sdk-7.1 kb2519277 -y choco install maven --version=3.6.2 -y choco install graalvm --version=19.2.1 -y mkdir c:\java8 choco install ojdkbuild8 --version=8.0.222 -params 'installdir=c:\java8' -y
Build script call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
set JAVA_HOME=C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.222-2 SET Path=%JAVA_HOME%\bin;%PATH%
XCOPY "c:\Program Files\GraalVM*" c:\GraalVM /s /i /Y set GRAALVM_HOME=c:\GraalVM\graalvm-ce-19.2.1 echo GRAALVM_HOME: %GRAALVM_HOME% echo Graal Done!
set M2_HOME="C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.2\" SET Path=%M2_HOME%\bin;%PATH%
cd C:\reactor\module\ call mvn package -Dnative -Dmaven.test.skip=true
This failes with
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 27.678 s [INFO] Finished at: 2019-11-11T05:02:20-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.28.0:native-image (default) on project dbcredential: Failed to generate a native image: Failed to augment application classes: Build failure: Build failed due to errors [ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image [ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:294) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.lang.reflect.Method.invoke(Method.java:498) [ERROR] at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:941) [ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:415) [ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426) [ERROR] at java.lang.Thread.run(Thread.java:748) [ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479) [ERROR] Caused by: java.lang.RuntimeException: Image generation failed [ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:283) [ERROR] ... 12 more [ERROR] -> [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
Another try withou quarkus and direct with graal cd c:\reactor\module\target\module-native-image-source-jar c:\GraalVM\graalvm-ce-19.2.1\bin\native-image.cmd -jar dbcredential-runner.jar -H:+ReportExceptionStackTraces --verbose
This failes with: ``[module-runner:2164] classlist: 21,609.95 ms [module-runner:2164] setup: 841.36 ms Error: could not find target method: private org.postgresql.sspi.ISSPIClient io.quarkus.jdbc.postgresql.runtime.graal.DisableSSPIClient.createSSPI(org.postgresql.core.PGStream,java.lang.String,boolean) com.oracle.svm.core.util.UserError$UserException: could not find target method: private org.postgresql.sspi.ISSPIClient io.quarkus.jdbc.postgresql.runtime.graal.DisableSSPIClient.createSSPI(org.postgresql.core.PGStream,java.lang.String,b oolean) at com.oracle.svm.core.util.UserError.abort(UserError.java:65) at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findOriginalMethod(AnnotationSubstitutionProcessor.java:633) at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleMethodInAliasClass(AnnotationSubstitutionProcessor.java:326) at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleAliasClass(AnnotationSubstitutionProcessor.java:298) at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:274) at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:230) at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:875) at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:824) at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:524) at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:444) at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) Error: Image build request failed with exit status 1 com.oracle.svm.driver.NativeImage$NativeImageError: Image build request failed with exit status 1 at com.oracle.svm.driver.NativeImage.showError(NativeImage.java:1447) at com.oracle.svm.driver.NativeImage.build(NativeImage.java:1225) at com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1187) at com.oracle.svm.driver.NativeImage.main(NativeImage.java:1146)
Can you help me with this!
I think this is the moste clean and simple environment for a graal native build i can imagine!
Thanks to you!
Can you please try with version 1.0.0.CR1
?
Can you please try with version
1.0.0.CR1
?
Which component do you mean? Thanks for your help!
@gengraphael the Quarkus version. I see that 0.28.0
is being used.
Thanks!
I made the change but the result is the same!
Can i generate more output? The org.postgresql.postgresql-42.2.6.jar with the org.postgresql.sspi.ISSPIClient inside is definitly inside of module-native-image-source-jar\lib
You can try adding -X
to the mvn ...
command.
quarkus-maven-plugin:1.1.1.Final
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] docker run -v //c/project/CUT
Docker Desktop configured to use 'C' local drive [1] and expected argument should be
-v c:/project/...
UPDATE: using Docker Desktop 2.2.0.0 works fine (drive mapping required)
This is very out of date so I am going to close it
Describe the bug Quarkus application with 0.26.1 can be build native inside of linux docker but not for windows on windows 10
Can you see where the problem is?
Actual behavior Build failed with error...
pom
Environment (please complete the following information):
java -version
:openjdk version "1.8.0_232" OpenJDK Runtime Environment (build 1.8.0_232-20191009144847.buildslave.jdk8u-src-tar--b07) OpenJDK 64-Bit GraalVM CE 19.2.1 (build 25.232-b07-jvmci-19.2-b03, mixed mode)