-
-
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
jruby core build fails on IBM ppc64 #2647
Comments
the missing error message comes from "fork=true" when we compile the code which is needed to add the unsafe.jar to bootloader. with fork=false things compile but 2-3 classes using this unsafe classes. seeing a IBM jdk it looks like the unsafe classes are probably the problem - just guessing here. |
how do i turn fork=false to try to see if that fixes the problem?
|
after changing core/pom fork from true to false, we now see some errors: [ERROR] /home/ralphbel/jruby/jruby-jruby-1_7/core/src/main/java/org/jruby/util/unsafe/UnsafeHolder.java:[96,10] So the question here is how do we fixee when building this on ppc64 |
So I suspect the problem is that the IBM JDK is not honoring boot classloader jars. For these Java 8+ Unsafe "fence" methods, we use a library called unsafe-mock (https://github.com/headius/unsafe-mock) to compile against. The build needs to be able to put those jars in the boot classpath of compile so it sees our Unsafe instead of whatever the current JDK provides. If you pass -X, somewhere in the reams of output you should see a javac command line (or everything on the command line except "javac"). Can you get that output and try running it directly (i.e. not through maven)? |
I'm running into this trying to install jruby via rvm on a vagrant box running Ubuntu 14.04. Error runnin mvn: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project jruby-core: Compilation failure -> [Help 1] If i want to continue to use this tech stack, what do I need to do to make the install complete? |
@Saganesque just today I could reproduce the same error when I used ibm jdk to compile jruby on my amd64 linux. are you using a ibm jdk ? |
my failure telemetry indicates IBM java on this specific failure. |
@mkristian sure am. |
@mkristian On a related note, when I compiled jruby 1.6.8 just now, I get the following: /home/vagrant/.rvm/src/jruby-1.6.8/build.xml:236: Unable to find a javac compiler; It's difficult to overstate my noobery. I'm unsure what I should be looking for there. There is a jdk install in that locale. Is there a remedy perhaps by switching thigs up with a different/older jdk install? |
@mkristian boned it. I have open jdk |
And after jdk uninstall then new oracle 8 jdk install, same problem for jruby-head :( |
@Saganesque just checked it from my side without rvm and fairly recent ubuntu installation: $ java -version and I took the current head from github. everything works with openjdk and oracle-jdk - the ibm-jdk has some problems with those "unsafe". I suspect this a RVM problem (not on machine where I have it installed right now) - you could see if you can compile the current master of jruby github I know rbenv uses bin archives for installing jruby, i.e. it does not compile anything when installing jruby - maybe that is an option (just thinking). |
Are you building on ppc64 (big endian) or a ppc64le machine (little endian)? I'm building on a Redhat 7 ppc64 (bigendian) machine. |
Sorry for delay, been out with surgery on arm. |
@headius I captured the output command line options and run it directly using javac javac -d /home/ayappan/jruby/core/target/classes -classpath /home/ayappan/jruby/core/target/classes:/home/ayappan/.m2/repository/org/ow2m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar:/home/ayappan/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar:/home/ayappan/.m2/repoalysis-5.0.3.jar:/home/ayappan/.m2/repository/org/.................. ...................... I got the same errors [checking org.jruby.util.unsafe.UnsafeHolder] We are using Java 7 version |
I wonder if there is a requirement to build with jdk 8 for jruby... the fullFenc, loadFence and storeFence are not part of the jdk 7 standard. Here is the discussion for including them in Jdk 8: http://openjdk.java.net/jeps/171 |
The IBM javac does not appear to honor boot classpath during build, which is necessary for us to build using our fake Unsafe. This is the source of those "fence" API compilation errors on IBM JDK 7. If you can't build with a Java 8 version of IBM's JDK, we'll need to figure out how to get JDK 7 to honor our mock-unsafe library during the build. |
Be careful with the fork argument of the maven-compiler-plugin. The error you are seeing by setting it to false might not be the same as with it set to true. With
With
So even with
My bet is that the PATH is not properly set and the wrong javac is being called (gcj maybe?), thus causing the Compilation failure error seen on the original report. The comments referring to (or relying) on |
The problem was that IBM Java does not like to have the
Removing the
|
So we can just remove it from the compiler plugin config? |
OpenJDK 7 also works without |
I built and run the tests on ppc64le and x86_64 without the -J and it worked. |
Easy one! |
Fixed on jruby-1_7 and master by 8b22c0b. |
nice catch :)
|
We are attempting to build the tip of the git branch of jruby 1.7 to test out a recent fix.
When we execute: mvn -Pcomplete
The system reports
there is no more error messages in the output:
we are attempting this on a power 7 (ppc64) architecture computer.
here is the output of the mvn --version command
here is the complete maven output.
The text was updated successfully, but these errors were encountered: