-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
How to build jruby for a new platform --mips64el #4246
Comments
@vans88 unintuitively we build those as part of the https://github.com/jnr/jffi project. Once build on each platform we commit them since we are not cross-compiling all of these platforms. |
Yes, @enebo is correct. We'd love to get MIPS support into jffi! Please open an issue there and try to build binaries for your platform. We'll incorporate them (and any necessary patches) into the next release. |
Keep this open until we can update our jffi to one that has MIPS support. |
Many thanks to your reply, and your spirit of open source deeply encouraged me. I will clone the project ---https://github.com/jnr/jffi --- and build locally. if my get success, I will paste the modification at the later comment.Thank you again. |
@headius. I got and built the jffi source via the front link this morning, but my platform-related libjffi-1.2.so doesn't be generated. Referencing the “aarch64” architecture from this link: [https://github.com/jnr/jffi/commit/d08b6d9b9ce818cd3d86a786d6ab9eef5aef77aa], I modified your source and generated a new patch. After the modifications, I built again and the situation was all the same. But I get some information may be related the case. File list in jffi-native-1.2.7-5.fc21.loongson.mips64el rpm package
And in "archive" directory in jffi project, I found some jars:
Make jffi-mips64el-Linux.jar
Then I put file jffi-mips64el-Linux.jar into "archive" directory of jffi project. and build again. In "target" directory exists the following file list.
How do you think my behavior? I do not know whether this is correct. |
Currently, I find a dir named "mips" which contains the following files:
How do I use these file to get my platform supported? |
I am confused...did it build your .so or not? It sounds like you did get it to build a jar, and that jar when put into archive/ unpacked properly into the jni dir. As for the libffi mips code...I would have expected libffi's Makefile to have done the right thing here. If it's not, that's where you would want to investigate. Do you know of any way to get access to a MIPS environment somewhere in the cloud? |
Er..., I have jffi-native rpm package installed in Fedora21 (mips64el), via the command "rpm -ql jffi-native", a file named "libjffi-1.2.so" shown as follows:
Here I unpacked one of jars in "archive" directory, the same file named "libjffi-1.2.so" will be found in a platform-related DIR.
Er..., There is a difference between CPU_TYPE and System.getProperty("os.arch"). The common names of cpu architecture is mips64, but os.arch obtained by function System.getProperty is mips64el. I just want to say the difference will impact some platform-related configuration here. For examples, I am not very clear the following configurations in file "build.xml".
|
Could I use the jffi-native rpm package instead of building jffi source from github? if so, What should I use the rpm jffi-native to build jruby next? My final purpose is to build logstash, but when I run the command bin/logstash -e "", an error shown as follows:
through searching the keyword "LoadError: Unsupported platform: unknown-linux", I know the above error is caused by jruby' jffi doesn't support my platform mips64el. but I found the following information in README.md file that located in top DIR of logstash.
so, I need to build jruby and let logstash use a local JRuby instead of the embedded binary JRuby. But, I don't know how to use a local rpm package jffi-native to build jruby source code, or how to use libjffi-1.2.so file to build jffi source firstly? I think the key point is the relationship between jruby and jffi. |
I very sorry to tell the fact that there doesn't a way to get access to a MIPS environment in the cloud so far. I am also working for the mips cloud platform currently. @headius Many thanks again. Every time you can give me some very useful suggestions. |
When using the jruby built from jruby project and set environment variable "USE_RUBY=1", I am getting the following errror: Jruby version info:
logstash help command errror:
|
@vans88 ,I encountered the same problem. I want to know if your logstash transplant has been successful, How to solve it? thanks! |
@kszsa +1,have you solved this problem?I am also trying to run logstash on a server with loongson cpu. |
@trumanliu Would it be possible for you to try running JRuby (without logstash) on whatever MIPS system you're using? I'm not sure about the status of MIPS support in our native bits, but it would help if we could confirm that latest JRuby doesn't work on its own (logstash ships with older versions of JRuby usually). |
FWIW one of the things that blocks some JRuby MIPS functionality is support for our native FFI library, jffi. Unfortunately the only PR we've gotten for MIPS has been abandoned: jnr/jffi#63 |
@headius I have the same problem on the loongson mips64 when run logstash 6.4.0. I installed latest JRuby 9.2.7.0, and output is below: [root@localhost bin]# ./jruby -v
jruby 9.2.7.0 (2.5.3) 2019-04-09 8a269e3 OpenJDK 64-Bit Server VM 25.192-b12 on 1.8.0_192-b12 +jit [linux-mips64el]
[root@localhost bin]#
[root@localhost bin]# uname -a
Linux localhost.localdomain 3.10.0 #1 SMP PREEMPT Tue Mar 21 11:43:21 CST 2017 00012-g243a566 mips64 mips64 mips64 GNU/Linux Wish it can help you. |
I also encountered the same problem, on the mips64el platform jruby ffi can not run, I can provide a test platform for debugging, hoping to help improve these compatibility issues. If you need a remote connection, please contact me: |
@jackwang713 That would be an enormous help! I will contact you by email. |
@headius I don't know if you have received my mail. I've been waiting for two days. |
@jackwang713 Apologies, your email got routed weirdly in my email, perhaps because of the attachment. I have received it and connected successfully! |
@headius Has there been any progress on this issue? What else can I help do? |
Sorry about the delay here. JRuby master is now running with the jffi that has the FFI binary in place for mips64el-Linux, so that's part of the way. I think we need to patch Platform.java to have MIPS as a platform entry (it already has Linux). And then under lib/ruby/ffi/platform we need to get the appropriate files generated (or manually tweaked, since the generator seems broken currently) so that they have appropriate typedefs/sizes for all the listed types. I'll see what I can do to get those typedefs generating. |
@jackwang713 Ok, are you able to at least start up JRuby master (maybe from a nightly build at https://jruby.org/nightly)? If so, I need to know the output of this code:
That should let us get Platform.java updated. |
I don't know how to run the code you gave me. I made the following attempt.
Using java to obtain System.getProperty("os.name") and System.getProperty("os.arch"), I got the result. |
@jackwang713 The command you ran shold have worked; I suspect it was run with CRuby instead of JRuby.
Would it be possible to get access to your system again? You can send me an email with details. |
Relates to jruby#4246.
@jackwang713 I have updated our set of |
Hello!I want to know whether jruby can be built on the platform --mips64el now. |
@jujiangtao Greetings! Much work has happened since this issue was last updated, and I believe JRuby itself supports mips64el fairly well at this point. I do not know whether that means JRuby will successfully build, since our build still uses a slightly older version of JRuby (for stability). Could you work with me to finish this issue? We can start by having you run |
FWIW I would also like to understand the importance of building on mips64el. The binaries we distribute should work on mips64el without further building (we ship native bits for all supported platforms at once). |
Environment
Expected Behavior
Recording the BUILDING.md file, run the command "./mvnw" and build successfully. but I can't find libjffi-1.2.so for my platform --mips64el-Linux/libjffi-1.2.so . Any suggestions?
The text was updated successfully, but these errors were encountered: