Skip to content
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 fails with error message on openJDK and ppc64le #2728

Open
ralphbellofatto opened this issue Mar 19, 2015 · 0 comments
Open

jruby fails with error message on openJDK and ppc64le #2728

ralphbellofatto opened this issue Mar 19, 2015 · 0 comments

Comments

@ralphbellofatto
Copy link

the following simple test script.

cat testfs.rb

require 'fileutils'

puts "File.stat called"
stat = File.stat("/bin/ls")
puts "File.stat returned"

and then obtain the http://ci.jruby.org/snapshots/jruby-1_7/jruby-dist-1.7.20-SNAPSHOT-bin.tar.gz file and untar it.

and then run this program:

unset JAVA_HOME
java -version
./jruby-1.7.20-SNAPSHOT/bin/jruby ./testfs.rb

and this is the result:

openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b09)
OpenJDK 64-Bit Server VM (build 25.40-b13, mixed mode)

File.stat called
OpenJDK 64-Bit Server VM warning: You have loaded library /home/ralphbel/jruby/jruby-1.7.20-SNAPSHOT/lib/jni/ppc64-Linux/libjffi-1.2.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
File.stat returned

on the ibm jdk it works different.

java version "1.7.0"
Java(TM) SE Runtime Environment (build pxl6470_27sr1fp1-20140708_01(SR1 FP1))
IBM J9 VM (build 2.7, JRE 1.7.0 Linux ppc64le-64 Compressed References 20140707_205525 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR1_20140707_1408_B205525
JIT  - tr.r13.java_20140410_61421.07
GC   - R27_Java727_SR1_20140707_1408_B205525_CMPRSS
J9CL - 20140707_205525)
JCL - 20140707_01 based on Oracle 7u65-b16
[tulgpu002 jruby] $ ./jruby-1.7.20-SNAPSHOT/bin/jruby ./testfs.rb
File.stat called
Mar 19, 2015 10:50:37 AM jnr.ffi.provider.jffi.NativeRuntime buildNativeTypeAliases
SEVERE: failed to load type aliases: java.lang.ClassNotFoundException: jnr.ffi.provider.jffi.platform.unknown.linux.TypeAliases
File.stat returned

We believe the first problem is caused by openJDK reporting os.arch incorrectly as referenced in this openJDK bug report: https://bugs.openjdk.java.net/browse/JDK-8073139

The second problem is missing TypeAliases for ppc64 and ppc64le architectures in the jnr.ffi library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant