-
Notifications
You must be signed in to change notification settings - Fork 22
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
write c extension for dlopen #23
Comments
just use the existing code of DL.dlopen (copy to your project :P) |
right, but i looked at that and it was more than 30 seconds to unwind the code in the ruby library, hence the todo note... |
Also by doing this right it may be possible to allow both ffi-yajl and the libyajl2 library and ruby-yajl and the libyajl1 library to co-exist, even though this makes my brain explode. http://stackoverflow.com/questions/3232822/linking-with-multiple-versions-of-a-library Seems like Linux, MacOSX and AIX at least support doing this, and its probably why some OSen seem to allow loading both libraries and generally the ffi extension seems to be able to coexist with ruby-yajl across all platforms. This warning may be a fixable bug: https://github.com/chef/ffi-yajl/blob/master/lib/ffi_yajl.rb#L23-L24 |
closed by #52 |
ruby does not remotely have its shit together with dlopen. DL.dlopen got yanked, Fiddle.dopen is only present if you compile it correctly with libffi-devel installed, etc, trying to use FFI and link dlopen is an endless troll because the definition of RTLD_GLOBAL | RTLD_NOW is different on different O/Sen and ffi can't search through include files.
the simple solution to this mess is to include a short c extension that exposes our own ruby function to call dlopen and basically restores DL.dlopen() functionality.
The text was updated successfully, but these errors were encountered: