rbczmq
rbczmq copied to clipboard
Ensure linking bundled libraries
If dependency libraries (czmq, libsodium and zeromq) are already
installed in system and they exist in Ruby's library path, rbczmq uses
headers of bundled libraries and shared objects of system
libraries. Because link command generated by mkmf.rb uses $DEFLIBPATH | $LIBPATH
as library search path. $DEFLIBPATH
includes Ruby's library
path. If dependency libraries already exist in Ruby's library path, they
are used instead of bundled libraries.
It causes segmentation fault.
See also:
- https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2184
- https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2256
- https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2266
- https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2514
It seems that https://github.com/SciRuby/iruby/issues/70 is occurred by this problem.