chuckremes / ffi-rzmq

FFI bindings for ZeroMQ so the library can be used under JRuby and other FFI-compliant ruby runtimes
242 stars 62 forks source link

Fix ordering issue of ZeroMQ path discovery #96

Closed pbrit closed 10 years ago

pbrit commented 10 years ago

There is issue in ZeroMQ library path discovery process.

The map method goes before + of between Arrays.

So we have no chance to load ZeroMQ shared library from a lot of places.

ZMQ_LIB_PATHS (after + and map)

["/opt/boxen/rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/ffi-rzmq-1.0.2/lib/ffi-rzmq/../../ext",
 "/opt/boxen/rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bin",
 "/opt/boxen/rbenv/versions/2.0.0-p247/bin",
 "/opt/boxen/rbenv/libexec",
 "/opt/boxen/rbenv/plugins/ruby-build/bin",
 "bin",
 "/opt/boxen/rbenv/shims",
 "/opt/boxen/rbenv/bin",
 "/opt/boxen/bin",
 "/opt/boxen/homebrew/bin",
 "/opt/boxen/homebrew/sbin",
 "/usr/bin",
 "/bin",
 "/usr/sbin",
 "/sbin",
 "/usr/local/bin",
 "/opt/X11/bin",
 "/usr/texbin",
 "/usr/local/lib/libzmq.dylib",
 "/opt/local/lib/libzmq.dylib",
 "/usr/local/homebrew/lib/libzmq.dylib",
 "/usr/lib64/libzmq.dylib"]
chuckremes commented 10 years ago

You are absolutely right. I missed this. Thank you very much for the patch.