Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error under Windows/JRuby #2

Open
arvicco opened this issue May 12, 2011 · 5 comments
Open

Error under Windows/JRuby #2

arvicco opened this issue May 12, 2011 · 5 comments
Labels

Comments

@arvicco
Copy link

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: http://wiki.msgpack.org/display/MSGPACK/QuickStart+for+C+Language

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/RubyArray.java:2344
  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/RubyKernel.java:1047
   (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/RubyKernel.java:1047
   (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/RubyKernel.java:1047
   (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
Copy link
Author

arvicco commented May 12, 2011

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

@postmodern
Copy link
Owner

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

@arvicco
Copy link
Author

arvicco commented May 13, 2011

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

@arvicco
Copy link
Author

arvicco commented May 13, 2011

Reported this upstream: msgpack/msgpack#53

@postmodern
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants