Cannot load (Nokogiri) DLLs with 1.6 RC1on Windows XP
-----------------------------------------------------

                 Key: JRUBY-5402
                 URL: http://jira.codehaus.org/browse/JRUBY-5402
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6RC1
         Environment: Windows XP
            Reporter: Steve Hayes
            Assignee: Thomas E Enebo


I am trying to run Nokogiri 1.4.4.2-java on Windows XP (running under 
a virtual machine, which is the way all our work environments are 
configured). The problem appears under JRuby 1.6 RC1 32bit and 64bit, 
but also under JRuby 1.5. Although the problem manifests under 
Nokogiri I suspect it's an FFI problem. I don't know how to 
construct a simple FFI-only test case, but I have tried various combinations of 
path to load a dll that I can see and I get the same load error in all cases.

Here's what happens with nokogiri in jirb: 

Z:\>jirb 
irb(main):001:0> require 'rubygems' 
=> true 
irb(main):002:0> require 'nokogiri' 
Found exception Could not open library 'z:\tools\jruby-1.6.0.RC1\lib 
\ruby\gems\1.8\gems\nokogiri-1.4.4.2-java\ext\nokogiri\libxml2.dll' : 
The operatio 
n completed successfully. 
LoadError 
LoadError: Could not open library 'z:\tools\jruby-1.6.0.RC1\lib\ruby 
\gems\1.8\gems\nokogiri-1.4.4.2-java\ext\nokogiri\libxml2.dll' : The 
operation com 
pleted successfully. 


        from z:/tools/jruby-1.6.0.RC1/lib/ruby/site_ruby/shared/ffi/ 
library.rb:29:in `ffi_lib' 
        from org/jruby/RubyArray.java:2460:in `collect' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/site_ruby/shared/ffi/ 
library.rb:10:in `ffi_lib' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/ 
nokogiri-1.4.4.2-java/lib/nokogiri/ffi/libxml.rb:11:in `(class 
LibXML)' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/ 
nokogiri-1.4.4.2-java/lib/nokogiri/ffi/libxml.rb:3:in `(class 
Nokogiri)' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/ 
nokogiri-1.4.4.2-java/lib/nokogiri/ffi/libxml.rb:2:in `(root)' 
        from org/jruby/RubyKernel.java:1041:in `require' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/ 
nokogiri-1.4.4.2-java/lib/nokogiri/ffi/libxml.rb:29:in `require' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/ 
nokogiri-1.4.4.2-java/lib/nokogiri.rb:11:in `(root)' 
        from org/jruby/RubyKernel.java:1041:in `require' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/ 
nokogiri-1.4.4.2-java/lib/nokogiri.rb:34:in `require' 
        from (irb):2:in `evaluate' 
        from org/jruby/RubyKernel.java:1091:in `eval' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/1.8/irb.rb:158:in 
`eval_input' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/1.8/irb.rb:271:in 
`signal_status' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/1.8/irb.rb:155:in 
`eval_input' 
        from org/jruby/RubyKernel.java:1421:in `loop' 
        from org/jruby/RubyKernel.java:1194:in `rbCatch' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/1.8/irb.rb:154:in 
`eval_input' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/1.8/irb.rb:71:in 
`start' 
        from org/jruby/RubyKernel.java:1194:in `rbCatch' 
        from z:/tools/jruby-1.6.0.RC1/lib/ruby/1.8/irb.rb:70:in 
`start'irb(main):003:0> 


FFI is trying to load the DLL from the correct directory and I've 
verified that the DLL is there. It looks like a similar problem was 
fixed by nokogiri-1.4.4.2 - any hints on how to diagnose this problem 
will be gratefully accepted :-) 

I've posted this to nokogiri-talk as well but so far have no responses.

Steve Hayes 




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to