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.
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.