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

Broken behavior when using the system copy of libyajl #35

Closed
darix opened this issue Nov 25, 2014 · 2 comments
Closed

Broken behavior when using the system copy of libyajl #35

darix opened this issue Nov 25, 2014 · 2 comments

Comments

@darix
Copy link

darix commented Nov 25, 2014

  1. libyajl2 gem allows to use the system copy instead of compiling the intree copy
  2. many linux distributions split the library packages in 2 parts
    • one that holds the actual shared library (libyajl.so.*)
    • one that holds the devel files (libyajl.so and the headers)
  3. the code in lib/ffi_yajl/ext.rb seems to be weird
    • it seems FFI.map_library_name("yajl") always returns the unversioned file name. even if that isnt present. to fix the actual loading i had to install the devel package.
    • you concat that with the lib path to the libyajl2 intree copy (which doesnt exist on my system)
    • i double checked this with @headius and @whitequark and they both think there is a lot of unneeded code there.
    • the code wouldnt work on jruby
  4. what was wrong with the existing libyajl bindings? it cant be jruby support...

At the very least ffi-yajl should try to load the versioned library name instead of the unversioned one.

@darix
Copy link
Author

darix commented Nov 25, 2014

for the record: this was on MRI 2.1.4 + FFI 1.9.6

@lamont-granquist
Copy link
Contributor

The way that -dev and -devel packages are built they should only have *.h header files in them. They shouldn't be touching the lib directory and the base non-dev[el] packages should contain both the versioned library and its symlinks. So I can't understand what the root cause of this bug is. I also can't replicate it on Ubuntu or Mac or CentOS. Using the environment variable to build against the system yajl got an overhaul in #52 so this may have fixed some issue. The solution of including searching the versioned filenames, though, is not necessary.

@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants