Error under Windows/JRuby #2

arvicco opened this Issue May 12, 2011 · 5 comments


None yet
2 participants

arvicco commented May 12, 2011

Trying to use ffi-msgpack on Windows (XP Pro SP3).

Ruby: jruby 1.6.1 (ruby-1.8.7-p330) (2011-04-12 85838f6) (Java HotSpot(TM) Client VM 1.6.0_20) [Windows XP-x86-java]
Gem: ffi-msgpack (0.2.0)
Msgpack lib: 0.5.4, built following instructions here:

On require 'ffi/msgpack', everything explodes with the following backtrace:

C:\Dev\p2\gate\clients>jruby --1.9 bin/swing_gui
LoadError: Could not open library 'msgpack' : The operation completed successfully.
. Could not open library 'msgpack.dll' : The operation completed successfully.

  ffi_lib at C:/Documents and Settings/bez/.pik/rubies/JRuby-161/lib/ruby/site_ruby/shared/ffi/library.rb:28
  collect at org/jruby/
  ffi_lib at C:/Documents and Settings/bez/.pik/rubies/JRuby-161/lib/ruby/site_ruby/shared/ffi/library.rb:10
  MsgPack at C:/Documents and Settings/bez/.pik/rubies/JRuby-161/lib/ruby/gems/1.8/gems/ffi-msgpack-0.2.0/lib/ffi/msgpack/msgpack.rb:11
      FFI at C:/Documents and Settings/bez/.pik/rubies/JRuby-161/lib/ruby/gems/1.8/gems/ffi-msgpack-0.2.0/lib/ffi/msgpack/msgpack.rb:8
   (root) at C:/Documents and Settings/bez/.pik/rubies/JRuby-161/lib/ruby/gems/1.8/gems/ffi-msgpack-0.2.0/lib/ffi/msgpack/msgpack.rb:7
  require at org/jruby/
   (root) at C:/Documents and Settings/bezrodnykh/.pik/rubies/JRuby-161/lib/ruby/gems/1.8/gems/ffi-msgpack-0.2.0/lib/ffi/msgpack/msgpack.rb:1
  require at org/jruby/
   (root) at C:/Documents and Settings/bezrodnykh/.pik/rubies/JRuby-161/lib/ruby/gems/1.8/gems/ffi-msgpack-0.2.0/lib/ffi/msgpack.rb:2
  require at org/jruby/
   (root) at Y:/Dev/p2/gate/clients/lib//clients/zmq_adapter/protocol.rb:2   (THIS is 'require "ffi/msgpack"')

initialize at Y:/Dev/p2/gate/clients/lib//clients/configurable_client.rb:41

(root) at bin/swing_gui:16

The thing is (if I get it right), it is looking for .dll, but msgpack project only builds .lib - which is on the path, of course, but it doesn't help :(

arvicco commented May 12, 2011

Ah yes, ffi gem is: ffi (1.0.7 java)


postmodern commented May 12, 2011

I would also report this to upstream msgpack. They need to build a proper DLL for Windows.

arvicco commented May 13, 2011

So, that .lib file that is built by msgpack is not usable via ffi?

arvicco commented May 13, 2011

Reported this upstream: msgpack/msgpack#53


postmodern commented May 13, 2011

It turns out that .lib files on Windows are analogous to .a static libraries on UNIX. So definitely not dynamically loadable by Windows.

@arvicco arvicco referenced this issue in msgpack/msgpack Mar 4, 2013


Proper DLL is not built on Windows #53

@postmodern postmodern added the jruby label Mar 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment