Bug 691659
Summary: | libguestfs fails to run under JRuby 1.6.0 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Marek Goldmann <mgoldman> | ||||||||
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||||
Status: | CLOSED UPSTREAM | QA Contact: | |||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | unspecified | CC: | mbooth, virt-maint | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | x86_64 | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2012-05-03 13:53:39 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | 561484, 723191 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Marek Goldmann
2011-03-29 07:55:58 UTC
Created attachment 488365 [details]
Strace output for create_disk.rb
From reading about this, it seems that JRuby has some support for C extensions, but that it is known to be problematic. There seem to be two possible ways forward: (1) Use the actual Java libguestfs bindings instead. This seems to be the standard reply, eg: http://stackoverflow.com/questions/526205/jruby-windows-and-native-extensions-how-do-i-distinguish-them/526456#526456 (2) Ask upstream JRuby developers if there is anything we can do to make the Ruby extensions friendlier towards JRuby or the JVM. Now we have jruby in Rawhide, we could actually test this and debug it ... (In reply to comment #3) > Now we have jruby in Rawhide, we could actually test this and > debug it ... Yes, I'll try to reproduce it on Rawhide and get back to you with my results. With latest jruby-1.6.2-2.fc16.noarch which is in Rawhide I got: $ jruby -J-Xmx1024m -I/usr/share/jruby/lib/native/ -S irb /usr/bin/build-classpath: error: Could not find jffi Java extension for this JVM /usr/bin/build-classpath: error: Could not find jruby-yecht Java extension for this JVM /usr/bin/build-classpath: error: Some specified jars were not found irb(main):001:0> require 'guestfs' LoadError: load error: _guestfs -- java.lang.NoClassDefFoundError: com/kenai/jffi/Library from org/jruby/RubyKernel.java:1038:in `require' from /usr/share/jruby/lib/ruby/site_ruby/1.8/guestfs.rb:18:in `(root)' from org/jruby/RubyKernel.java:1038:in `require' from /usr/share/jruby/lib/ruby/site_ruby/1.8/guestfs.rb:1:in `evaluate' from org/jruby/RubyKernel.java:1088:in `eval' from /usr/share/jruby/lib/ruby/1.8/irb.rb:158:in `eval_input' from /usr/share/jruby/lib/ruby/1.8/irb.rb:271:in `signal_status' from /usr/share/jruby/lib/ruby/1.8/irb.rb:155:in `eval_input' from org/jruby/RubyKernel.java:1419:in `loop' from org/jruby/RubyKernel.java:1191:in `catch' from /usr/share/jruby/lib/ruby/1.8/irb.rb:154:in `eval_input' from /usr/share/jruby/lib/ruby/1.8/irb.rb:71:in `start' from org/jruby/RubyKernel.java:1191:in `catch' from /usr/share/jruby/lib/ruby/1.8/irb.rb:70:in `start' from /usr/share/jruby/bin/jirb:13:in `(root)' irb(main):002:0> It seems that ffi lib couldn't be found and seems to be a JRuby packaging issue to me. It works for me OK if you use the Java bindings via JRuby. I will attach a test program to demonstrate. Created attachment 513884 [details]
JRuby program
The attached program has been tested with JRuby in
Fedora Rawhide. Note that it also requires the very
latest libguestfs (>= 1.11.20).
I think the recommended approach (for jruby) is to use the Java classes. I have checked that this works. If this is sufficient for you I would like to close this bug. Rich, That's fine. When I'll have more info on this in the future, I'll add to this ticket. Feel free to close it. Closing as per comment 9. |