Issue Details (XML | Word | Printable)

Key: JRUBY-1784
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Charles Oliver Nutter
Reporter: Takanori Ishikawa
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
JRuby

The JNA library bundled with JRuby is built against glibc 2.4+

Created: 25/Dec/07 09:14 PM   Updated: 23/Apr/08 10:02 AM
Component/s: None
Affects Version/s: JRuby 1.1RC1
Fix Version/s: JRuby 1.1RC2

Time Tracking:
Not Specified

Environment: Linux 2.6.17-1.2142_FC4smp (glibc 2.3.6), Java 1.5.0_14-b03


 Description  « Hide
The version of JNA that the JRuby is using is built against glibc 2.4+ on Linux,
so compiling JRuby failed on Linux has an older glibc (2.3).

Environments:

% uname -a 
Linux jruby-test 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 i686 i386 GNU/Linux
% java -version
java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)
% /lib/libc.so.6 
GNU C Library development release version 2.3.6, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.

ant clean test, produces:

generate-method-classes:
    [touch] Creating /home/ishikawa/jruby/build/__empty.rb
     [java] Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/jna3904.tmp: /lib/libc.so.6: version `GLIBC_2.4' not found (required by /tmp/jna3904.tmp)
     [java]     at java.lang.ClassLoader$NativeLibrary.load(Native Method)
     [java]     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
     [java]     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
     [java]     at java.lang.Runtime.load0(Runtime.java:769)
     [java]     at java.lang.System.load(System.java:968)
     [java]     at com.sun.jna.Native.loadNativeLibrary(Native.java:387)
     [java]     at com.sun.jna.Native.<clinit>(Native.java:62)
     [java]     at org.jruby.ext.posix.POSIXFactory.loadLinuxLibC(POSIXFactory.java:40)
     [java]     at org.jruby.ext.posix.POSIXFactory.getPOSIX(POSIXFactory.java:22)
     [java]     at org.jruby.Ruby.init(Ruby.java:1218)
     [java]     at org.jruby.Ruby.newInstance(Ruby.java:367)
     [java]     at org.jruby.Main.runInterpreter(Main.java:153)
     [java]     at org.jruby.Main.run(Main.java:119)
     [java]     at org.jruby.Main.run(Main.java:93)
     [java]     at org.jruby.Main.main(Main.java:84)

JNA has updated their jna.jar to be built against glibc 2.3+. These new jar file can be found at

and build with glibc 2.3.5 is Revision 344 at

I tested with newest version of jna.jar (rev. 433) and glibc 2.3+ version (rev. 344). The compile and tests all passed successfully.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Charles Oliver Nutter added a comment - 26/Dec/07 11:58 AM
Thanks for the heads up, we'll be sure to update JNA before the next release.

Thomas E Enebo added a comment - 03/Jan/08 08:11 PM
Bumping to 1.1 final. We will ping JNA folks to get release out soon. Charlie commited a fix recently that will allow this to fall back to pure Java POSIX when JNA POSIX fails to load. So this is no longer a crasher. For now, you just get whatever a pure Java environment can provide.

Charles Oliver Nutter added a comment - 14/Feb/08 02:25 PM
This should be resolved with our move to JNA 3.0 final.