Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.5.1
    • Fix Version/s: JRuby 1.6RC1
    • Component/s: None
    • Labels:
      None
    • Environment:
      OS: OSX 10.5.8
      Jruby Version: 1.5.1
      FFI gem version: 0.6.3
    • Number of attachments :
      1

      Description

      Attempting to require 'pty' fails, with a "LoadError: no library specified" when using jruby 1.5.1 ('ffi' gem 0.6.3).

      irb(main):001:0> require "rubygems"
      => true
      irb(main):002:0> require "ffi"
      => true
      irb(main):003:0> require "pty"
      LoadError: no library specified
      	from /jruby/jruby-1.5.1/lib/ruby/site_ruby/shared/ffi/library.rb:46:in `ffi_libraries'
      	from /jruby/jruby-1.5.1/lib/ruby/site_ruby/shared/ffi/library.rb:96:in `attach_function'
      	from /jruby/jruby-1.5.1/lib/ruby/site_ruby/shared/pty.rb:11
      	from /jruby/jruby-1.5.1/lib/ruby/site_ruby/shared/pty.rb:31:in `require'
      	from /jruby/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
      	from (irb):3
      

        Activity

        Hide
        Michael Kohl added a comment -

        Finally a nicely formatted patch.

        Show
        Michael Kohl added a comment - Finally a nicely formatted patch.
        Hide
        Hiro Asari added a comment -

        Michael,

        I pushed your patch to master in 2d64da7. Thanks!

        Show
        Hiro Asari added a comment - Michael, I pushed your patch to master in 2d64da7 . Thanks!
        Hide
        zipizap added a comment - - edited

        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 'pty' is really important for my work.

        The 'pty' library still 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.

        UPDATE: As indicated by Charles Oliver Nutter in the next comments, this error does not exist in the normal Jruby .tar.gz or .zip versions, it seems to only affect the .jar version

        If anyone can be so kind, please tell me what could I do to help debug and solve this issue

        Bellow the errors 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)'
        

        Should this same bug be re-opened or should it be better to open a new one about "Function 'PTY::LibUtil' not found in [forkpty] (FFI::NotFoundError)" ?

        Greetings

        Show
        zipizap added a comment - - edited 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 'pty' is really important for my work. The 'pty' library still 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. UPDATE: As indicated by Charles Oliver Nutter in the next comments, this error does not exist in the normal Jruby .tar.gz or .zip versions, it seems to only affect the .jar version If anyone can be so kind, please tell me what could I do to help debug and solve this issue Bellow the errors 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)' Should this same bug be re-opened or should it be better to open a new one about "Function 'PTY::LibUtil' not found in [forkpty] (FFI::NotFoundError)" ? Greetings
        Hide
        Charles Oliver Nutter added a comment -

        zipzap: Can you open your issue as a new bug? The original issue here was fixed, but we'd happily look into your issues.

        I'd also recommend trying it without the "complete" jar. In otherwords, from a normal JRuby install. The "pty" library we have is loaded using native libraries, which may not be working properly from the complete jar as-is.

        Looking forward to your bug report.

        Show
        Charles Oliver Nutter added a comment - zipzap: Can you open your issue as a new bug? The original issue here was fixed, but we'd happily look into your issues. I'd also recommend trying it without the "complete" jar. In otherwords, from a normal JRuby install. The "pty" library we have is loaded using native libraries, which may not be working properly from the complete jar as-is. Looking forward to your bug report.
        Hide
        zipizap added a comment - - edited

        Charles, I've verified with the full Jruby install (.tar.gz or .zip binaries) and in those versions the 'pty' library works fine

        So it seems the problem is limited only to the jruby-complete-X.X.jar version

        I have opened a new bug report - see bug JRUBY-5584

        Hope anyone crossing the same problem sees this

        Thanks for your reply Charles

        Show
        zipizap added a comment - - edited Charles, I've verified with the full Jruby install (.tar.gz or .zip binaries) and in those versions the 'pty' library works fine So it seems the problem is limited only to the jruby-complete-X.X.jar version I have opened a new bug report - see bug JRUBY-5584 Hope anyone crossing the same problem sees this Thanks for your reply Charles

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Jeff
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: