-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add RISC-V 64 Support #2341
Comments
Thanks for your interest in running OpenSearch on RISC-V. Although RISC-V is not explicitly a supported platform, OpenSearch should build and run correctly on any JVM platform, except for a small amount of functionality that depends on native x86 code, notably KNN. I suggest you go ahead, build it, and try it out. I will close this issue report, but if you run into difficulties, please provide a detailed problem report including version numbers of your JVM and OS. |
Closing this for now. @Avimitin, please feel free to reopen if you faced any issues during the build |
Context: building on Linux 5.16.11-arch1-1 (riscv64) QEMU environment, for opensearch version 1.2.4, using java-11-openjdk, gradle 6.6.1. I actually got problem when building the opensearch. During the build, it reports that I tried to add this line to return the proper system architecture: --- buildSrc/src/main/java/org/opensearch/gradle/Architecture.java
+++ buildSrc/src/main/java/org/opensearch/gradle/Architecture.java
@@ -40,6 +40,7 @@
public static Architecture current() {
final String architecture = System.getProperty("os.arch", "");
switch (architecture) {
+ case "riscv64":
case "amd64":
case "x86_64":
return X64; And I found this error in the new build:
Is the opensearch trying to download a java executable for current architecture? Is there a build argument to close this behavior and let it choose a executable from target machine? |
Let's reopen this now that we have a clear bug. I don't have an answer to your question @Avimitin, but add comments to the issue as you make progress! |
Hi @Avimitin. Not sure if you've made any more progress on this. I spent the last few days looking into this. I was of course able to reproduce the initial failure in the This report looks identical to the symptoms in #1303 (for a different architecture) which includes some stack traces. The stack traces do not have any OpenSearch code in them; they are entirely Gradle internal code, and share the same Gradle version as you have here, 6.6.1. The stack trace seems to imply the problem is in Gradle's determining of the appropriate runtime Java version. One of the lines in the stack trace is:
This particular line of code was changed in Gradle 6.7.0, in gradle/gradle#14031 which may or may not have any effect on fixing it. I do think there's a strong possibility that this bug in OpenJ9 may be the root cause of both your issue and #1303, since they share the commonality of non-Hotspot JVMs: eclipse-openj9/openj9#11013 Bottom line:
|
Sorry for the late response. I don't know much about Java Eco-system, so I don't take much time to discover that problem. I am glad that this issue has been fixed. And I will retry building it after the new version is released. |
You can probably rebuild it from source right now by changing the Architecture class as you did in this comment. Just use a newer version of Gradle which should use a newer, non-bugged JVM. It would be very helpful to know if you run into any other issues. |
I can build OpenSearch without trouble on riscv64. But the build for plugins failed because an incorrect x86_64 toolchain is downloaded to
I didn't find a way to modify it to make sure riscv64 toolchain get used. Update: BTW Adoptium doesn't have prebuilt JDK for riscv64. So now I need a way to use the system JDK. |
Is your feature request related to a problem? Please describe.
I am trying to build this program on RISC-V 64 Arch Linux platform. And I found that it currently only support x86_64 and i386. I wonder if there are any x86_64 specific code? Or it can just be built without code modification?
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: