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

helper.bundle in wrong place after installing gem #4

Closed
notEthan opened this issue Feb 19, 2013 · 7 comments
Closed

helper.bundle in wrong place after installing gem #4

notEthan opened this issue Feb 19, 2013 · 7 comments

Comments

@notEthan
Copy link

requiring 'process_shared' after installing gives this error:

$ gem install process_shared
Fetching: ffi-1.4.0.gem (100%)
Building native extensions.  This could take a while...
Fetching: process_shared-0.1.6.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.4.0
Successfully installed process_shared-0.1.6
2 gems installed
$ irb
>> require 'process_shared'
LoadError: Could not open library '/Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared/posix/helper.bundle': dlopen(/Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared/posix/helper.bundle, 5): image not found
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/ffi-1.4.0/lib/ffi/library.rb:123:in `block in ffi_lib'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/ffi-1.4.0/lib/ffi/library.rb:90:in `map'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/ffi-1.4.0/lib/ffi/library.rb:90:in `ffi_lib'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared/posix/libc.rb:20:in `<module:Helper>'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared/posix/libc.rb:9:in `<module:LibC>'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared/posix/libc.rb:8:in `<module:Posix>'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared/posix/libc.rb:7:in `<module:ProcessShared>'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared/posix/libc.rb:6:in `<top (required)>'
    from /Users/ethan/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/ethan/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared/posix/shared_memory.rb:4:in `<top (required)>'
    from /Users/ethan/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/ethan/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared.rb:20:in `<module:ProcessShared>'
    from /Users/ethan/.rvm/gems/ruby-1.9.3-p362/gems/process_shared-0.1.6/lib/process_shared.rb:11:in `<top (required)>'
    from /Users/ethan/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /Users/ethan/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /Users/ethan/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from (irb):1
    from /Users/ethan/.rvm/rubies/ruby-1.9.3-p362/bin/irb:16:in `<main>'>> 

I have these .bundle files installed in the gem directory when the gem builds:

ext/helper/helper.bundle
ext/pthread_sync_helper/pthread_sync_helper.bundle
lib/helper.bundle
lib/pthread_sync_helper.bundle

I symlinked lib/helper.bundle to lib/process_shared/posix/helper.bundle and that seems to have fixed it.

@pmahoney
Copy link
Owner

Well that was dumb of me! I think I have fixed extconf.rb to that file gets installed in the correct location.

Thanks for the report.

@notEthan
Copy link
Author

cool, thanks. seems to work

@Choms
Copy link

Choms commented May 29, 2015

Hi pmahoney!

This (or something really similar) is still an issue at least on Fedora 21 and 22. On Both I'm getting something like:

/home/choms/.gem/ruby/gems/ffi-1.9.8/lib/ffi/library.rb:133:in `block in ffi_lib': Could not open library '/home/choms/.gem/ruby/gems/process_shared-0.2.0/lib/process_shared/posix/helper.so': /home/choms/.gem/ruby/gems/process_shared-0.2.0/lib/process_shared/posix/helper.so: cannot open shared object file: No such file or directory (LoadError)

On F21 ruby2.1.6 helper.so is located at .gem/ruby/gems/process_shared-0.2.0/ext/helper/helper.so
On F22 ruby2.1.6 is located at .gem/ruby/extensions/x86_64-linux/process_shared-0.2.0/process_shared/posix/helper.so

Can you please take a look on this issue?

@pmahoney
Copy link
Owner

@Choms I believe I have patched this, at least for F22. Not sure exactly for F21. Are you able to test this out for me? I published a pre-release gem, version 0.2.1a. You can install it with gem install --prerelease process_shared-0.2.1a, or use the latest from git.

@pmahoney pmahoney reopened this Jun 10, 2015
@pmahoney
Copy link
Owner

@Choms Make that gem install --prerelease process_shared-0.2.1b

@Choms
Copy link

Choms commented Jun 10, 2015

@pmahoney that fixed it (testing on F21), thanks! :)

@pmahoney
Copy link
Owner

@Choms thanks for testing. I've released version 0.2.1 with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants