-
Notifications
You must be signed in to change notification settings - Fork 157
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 for LoongArch64 #308
Conversation
After watching jnr/jnr-posix#135, I realized that I still need to port jnr-ffi and jnr-posix. I ported jnr-ffi support for loongarch, When I use . /mvnw test command to test the function, The following error occurred: [INFO] T E S T S By the way, I would like to put jffi's pr link here for your convenience: jnr/jffi#125 |
@Panxuefeng-loongson Did you run that test with the updated build of jffi that supports LoongArch? |
I haven't had time to fix the build failure, I'll fix the remaining issues soon |
Hi: [INFO] |
I apologize for losing track of this PR. What is the current status? |
I'm so sorry I was busy with other things a while ago. Recently, I plan to finish porting jnr-ffi and jruby to LoongArch. If there is any progress, I will sync it to pr. Thanks |
After I rebase the code to latest, but some tests failed. I'm going to take a moment to fix these issues |
898c0e6
to
cb1d2bc
Compare
I'm not quite sure how to do it, Could you please tell me how to run that test with the updated build of jffi? |
cb1d2bc
to
8684790
Compare
You can |
920db8f
to
470ab4f
Compare
470ab4f
to
a14e11b
Compare
Thanks for your reminder. Now two more tests fail, as follows:
I don't know the reason for the error, do you know the reason? Thanks |
These two tests don't seem to be very critical, can we add these two tests to the whitelist and skip the test? |
These two test failures are caused by my machine environment, and now the tests can all pass:
|
RFR @headius |
Great news! I will review. I need to figure out how to build the jffi native binary so I can have it done as part of our CI process. You can see a build I have been trying to make work with the available Debian/LoongArch image, but I have been unsucessful: Can't seem to figure out the right docker commands to get it to run like the other platforms. |
I pushed a snapshot to the snapshots repo so that these can pass. The macos/aarch64 builds are caching the failed lookup, but I'm not concerned about them. This will not really be a true CI test until we can run the tests on LoongArch but I can merge your changes before that happens. We still need a binary to include in jffi, though, and I need to be able to build it myself. |
Is there anything I need to do to move this thing forward? |
I need a way to access a LoongArch64 machine, either physical hardware or something in the cloud, so that I can create binary builds of the jffi stub. Currently I am trying to get a docker build working with qemu 7.1's preliminary LoongArch support, but it may not be successful. Real hardware would be better. |
We have Loongarch machines in the GCC compile farm, see: https://cfarm.tetaneutral.net/machines/list/. I think you can build the Loongarch port code with it. |
If compiled natively, jnr-ffi requires a loongarch machine executable jdk. I can provide it to you, either by e-mail or otherwise. Thanks |
I will try to get set up with the GCC compile farm this week or early next. If you can provide a link to a pre-built LoongArch JDK that would speed things up. |
I have sent you the jdk binary via email. |
I have received the JDK, activated my gcc compile farm account, updated my ssh key there and waited for it to propagate... but now it seems the two LoongArch machines are not available! They show as red in the compile farm list, and although I can connect it does not have my public key and I can't log in. |
I confirmed with my colleague that the machine is still online. |
The machine on the gcc farm is already showing fine, please try again. |
I made another attempt to connect, but it seems my key still did not propagate. Now that they are not red, I have resubmitted my key. Once it syncs, I will make another attempt. |
I am still unable to log into the machine. I am able to log into machines other than the two LoongArch machines. I can try to open a ticket, or you can just pass this information on to the maintainers. Hopefully I am not doing something wrong! |
I am on the machine and getting everything built and released now. |
Good news! |
@Panxuefeng-loongson I have built and deployed a snapshot of jffi with loongarch64 support! You should be able to run the tests in this PR on a loongarch64 machine. I see two failures and then the test suite hangs during NumberTest (or is so slow it did not seem to make progress):
Perhaps you can look into the test suite now and make sure everything passes? |
I I have also encountered this problem, I think it is an environmental problem. Please check if you have the following soft link information. On my machine, after creating the soft link, the test passed
|
The 401 machine I had been using appears to be down now. 😭 However, since you say it passes for you with that symlink in place, I'm willing to push forward and merge this in for release. |
Is there anything I can do to move the release forward?I am more than happy to help. |
I gave feedback to my colleague about the machine going offline. We apologize for the delay in the release due to external reasons. |
Release 1.3.10 of jffi and 2.2.13 of jnr-ffi have been released with LoongArch64 support! In order to release the rest of the libraries, we need to generate constants for |
My colleague seems to have submitted code to support the jnr-constants Loongson architecture, see: jnr/jnr-constants#98. |
@headius I don't know much about the jnr project, what other jnr repo might require architecture-related support? I can try it. |
How do I test those code(jnr-enxio, jnr-unixsocket, jnr-posix, and jnr-process)? I did not find a useful document. |
FYI @Panxuefeng-loongson, although the two GCC compile farm machines were done yesterday, I went ahead with releasing the rest of the JNR stack. All libraries are now up-to-date with all the LoongArch patches you and your colleagues have contributed. Thanks for your help! If you are able to test these other libraries, it should be a simple matter of running |
jnr-enxio tests all passed, jnr-unixsocket has some failed caused by time out, I think this is due to the network. But jnr-posix may need to add loongarch code.
|
I have submited a pr: jnr/jnr-posix#179, I would like you confirm the change. @headius |
No description provided.