Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.6RC3
-
Fix Version/s: None
-
Component/s: Standard Library
-
Labels:None
-
Environment:This problem exists in all jruby-complete-X.jar versions, so it is not dependent on OS (affects all OSs)
-
Number of attachments :
Description
This is my first bug, and I'm not very experienced with Java (I'm more on the ruby side) - this said, I'm using jruby to perform console-process automation and so the 'pty' library (of stdlib) is really important for my work.
The 'pty' library does not work in jruby-complete-1.6.0.RC1.jar nor in jruby-complete-1.6.0.RC2.jar.
This error was verified in Windows Vista and Sun Solaris (same in both OSs), using the jruby-complete-X.jar versions of Jruby.
The error only affects the jruby-complete-X.jar version; in the binary Jruby .tar.gz or .zip versions the 'pty' library works normally
Bellow are left the errors messages of require 'pty' in jruby-1.6.0.RC1 and jruby-1.6.0.RC2
error in jruby-complete-1.6.0.RC1.jar
C:\Ruby191\myProgs\r2d2>java -jar jruby-complete-1.6.0.RC1.jar -vrpty -e 'p 0'
jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-10 769f847) (Java HotSpot(TM) Client VM 1.6.0_22) [Windows Vista-x86-java]
org.jruby.exceptions.RaiseException: (NotFoundError) Function 'PTY::LibUtil' not found in [forkpty]
at #<Class:0x1006798eb>.attach_function(file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/ffi/library.rb:100)
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1671)
at FFI::Library(#<Class:0x1006798eb>).attach_function(file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/ffi/library.rb:96)
at Module.(class LibUtil)(file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/pty.rb:12)
at Module.(class PTY)(file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/pty.rb:5)
at #<Class:0x10076db09>.(root)(file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/pty.rb:3)
error in jruby-complete-1.6.0.RC2.jar
C:\Ruby191\myProgs\r2d2>java -jar jruby-complete-1.6.0.RC2.jar -vrpty -e 'p 0'
jruby 1.6.0.RC2 (ruby 1.8.7 patchlevel 330) (2011-02-09 5434c72) (Java HotSpot(TM) Client VM 1.6.0_22) [Windows Vista-x86-java]
file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/ffi/library.rb:100:in `attach_function': Function 'PTY::LibUtil' not found in [forkpty] (FFI::NotFoundError)
from org/jruby/RubyArray.java:1676:in `each'
from file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/ffi/library.rb:96:in `attach_function'
from file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/pty.rb:12:in `(class LibUtil)'
from file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/pty.rb:5:in `(class PTY)'
from file:/C:/Ruby191/myProgs/r2d2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/pty.rb:3:in `(root)'
If anyone can be so kind, please tell me what could I do to help debug and solve this issue
Greetings
I have a similar error on ubuntu with jruby-1.7.0
Without the package libc6-dev:
With the package libc6-dev the require succeeds without a hitch
libc6-dev installs the following symlink, which is likely why it works:
/usr/lib/x86_64-linux-gnu/libutil.so: symbolic link to `/lib/x86_64-linux-gnu/libutil.so.1'