-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support both GraalVM 19.3.1 and 20.0.0 #7269
Comments
I'll start running locally the complete Quarkus build in native mode with GraalVM |
I use GraalVM 20.0.0 + io.quarkus:quarkus-bom:1.3.0.Alpha2, Output error: Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: type is not available in this platform: io.quarkus.runtime.graal.DiagnosticPrinter$Target_PosixJavaThreads
|
@gwenneg and all. The idea would be to be able to support both 20 and 19.3.x in Quarkus in parallel (like we briefly did 19.2 and 19.3) if at all possible. The reason is 19.3 is LTS. |
@iwangxiaodong Thanks for reporting this! I'll run some Windows native tests tonight and see if I can reproduce it locally. @emmanuelbernard Ok, I'll make the required changes and tests to try to support both versions. |
I will centralize the double compatibility status and tests results here:
|
The JDK 8 and 11 native tests were successful for all GraalVM SDK and Docker image combinations. I'll take a closer look at the logs tonight just to make sure we don't miss an issue that would happen without making the build fail. I didn't have time to run the Windows test yesterday so I'll also do this tonight. |
I didn't see anything suspicious in the logs. I tried to run a local GraalVM |
GraalVM 20.0.0 in Windows 10 x64: Install Visual Studio Community 2017 (C++ components) SET GRAALVM_HOME="G:...\graalvm-ce-java11-20.0.0" cd C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2017\Visual Studio Tools\VC |
I tried building Quarkus with GraalVM Do you have an idea about what could be the problem on my Windows environment? This is my first time using GraalVM on Windows so I might be missing something. |
Write text file can fix missing unistd.h : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\unistd.h #ifndef _UNISTD_H |
Thanks @iwangxiaodong! I was finally able to build Quarkus with GraalVM 20.0 on Windows. I can see the error you had with
I'm now trying trying to fix these. Adding |
Click "x64 Native Tools Command Prompt for VS 2017" Good luck. |
The issue comes from the following Quarkus code which is only compatible with Linux/macOS for now: quarkus/core/runtime/src/main/java/io/quarkus/runtime/graal/DiagnosticPrinter.java Lines 46 to 50 in 3fbdbc3
I tried a few things without success yesterday, I'll try again tonight. |
I may have a solution for the |
I have an idea of a possible fix for the |
Congratulations! |
@gwenneg |
quarkus 1.3.0.CR1 and GraalVM 20.0.0 on Windows c = (HttpURLConnection) new URL(url).openConnection(); Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes()[B |
Thanks for reporting this new issue @iwangxiaodong. I'll take a look at it in a few hours. |
the |
@iwangxiaodong I can't reproduce locally the |
Only used quarkus-resteasy. buildNative - Build time is Successful, runtime is Internal Server Error: Source code - example.zip Visit url http://localhost:8080/demo |
@iwangxiaodong However, during build I got an error which marked the build as failed, even though it produced a correctly working executable: Execution failed for task ':buildNative'.
It seems to expect the build process to produce a Linux-style binary (no file ending) when it actually ends with .exe. I haven't looked into what the code actually does, though. |
This looks like same issue maven plugin had. |
Build time is Successful, runtime is Internal Server Error Visit url http://localhost:8080/demo Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes()[B |
For same code that that works under jvm? |
@ctomc yes! jvm is Successful |
Help me build above example.zip on Windows with GraalVM Java 11(quarkus 1.3.0.CR2), Please. reproduce: |
Sorry for not posting an update here @iwangxiaodong. I tried to reproduce your issue without success 3 days ago. I'll try again in a few hours. |
Hasn't this one been implemented already? |
@geoand: The double GraalVM support is done. We should probably close this issue and deal with @iwangxiaodong's problem in a new one. |
@gwenneg any progress on this? I'm getting the exact same vertx error when trying to compile to native on windows Graalvm 20.0 JDK8 with Quarkus 1.3.1 Final. |
@newk5 if you have an error with 1.3.1.Final, please create a reproducer with the stacktrace and a reproducer. We have no knowledge of remaining issues so if there is one, better have a separate issue for it. Thanks! |
I created a sample here that reproduces the issue: https://github.com/newk5/quarkus-jsf GraalVM Build used: graalvm-ce-java8-windows-amd64-20.0.0 I'm on Windows 10 64bit The stacktrace is exactly as posted above:
I also had to add:
to the application.properties, otherwise, in addition to the error above, I also got this one:
|
This error happens when your application or one of its artifacts was built using Java 9 or later using
|
Yea I read about that java.nio.ByteBuffer.flip() error being related to being compiled on java9 or above and I have tried to use the --release flag before but I got this error: My app was compiled with java8. I'm not sure if any of the artifacts specified on my pom.xml were built on java9 or above though. I guess I'll try GraalVM with java11 and see how that goes. (I believe the vertx error is not related to this though, that is a separate issue) |
@dmlloyd @gsmet I found 2 issues after that though: 1 - When accessing the page on the browser I got this error: 2 - When I run the .exe there is a vertx cache folder created at:
but when I close the .exe (by clicking the cmd window 'X' button), this folder is not deleted, which makes it so that the next time I try to run the .exe, it fails with this error: If I manually delete the folder created on the vertx-cache directory, I can once again run the .exe. One thing I noticed was that if instead of closing the .exe by closing the cmd window 'X' button I do Ctrl+C instead inside the cmd window, the vertx cache folder is correctly deleted. |
@newk5 could you create two separate issues for this? Better than discussing in a closed issue :). |
As mentioned by @gastaldi on Zulip, GraalVM
20.0
is now available: https://www.graalvm.org/docs/release-notes/20_0/@cescoffier We'll need two new
ubi-quarkus-native-image
(JDK 8 and 11) for that version, but I suppose this has a lower priority than the Mutiny integration since1.3.0.CR1
is getting close.The text was updated successfully, but these errors were encountered: