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

OSX: With homebrew GeCode 4.x installed, gem doesn't work #22

Open
danielsdeleo opened this issue Apr 16, 2014 · 18 comments
Open

OSX: With homebrew GeCode 4.x installed, gem doesn't work #22

danielsdeleo opened this issue Apr 16, 2014 · 18 comments

Comments

@danielsdeleo
Copy link
Contributor

NOTE this is copied from chef/dep-selector-libgecode#10

What happened

  1. Install GeCode 4.x: brew install gecode
  2. Install dep-selector-libgecode 1.0.0: gem install dep-selector-libgecode -v 1.0.0
  3. Run ruby code that uses it (e.g. berks 3.0.0.rc1): berks
/usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/ffi-1.9.3/lib/ffi/library.rb:133:in `block in ffi_lib': Could not open library '/usr/local/var/rbenv/versions/2.
0.0-p451/lib/ruby/gems/2.0.0/gems/dep_selector-1.0.0/lib/dep_gecode.bundle': dlopen(/usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/dep_selector-1.0.0/lib/dep_g
ecode.bundle, 5): Symbol not found: __ZN6Gecode16ValBranchOptions3defE (LoadError)
  Referenced from: /usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/dep_selector-1.0.0/lib/dep_gecode.bundle
  Expected in: flat namespace

Workaround

  1. uninstall 'dep-selector-libgecode': gem uninstall dep-selector-libgecode dep_selector
  2. uninstall 'gecode': brew uninstall gecode
  3. reinstall dep-selector-libgecode: gem install dep-selector-libgecode -v 1.0.0

Notes

I wonder if an RPATH isn't being set right or something.

@danielsdeleo
Copy link
Contributor Author

@docwhat This is caused by an issue in ruby. On this line: https://github.com/opscode/dep-selector/blob/master/ext/dep_gecode/extconf.rb#L31 we ask ruby to check if it can find the gecode library in dep-selector-libgecode. Ruby uses the value of RbConfig::MAKEFILE_CONFIG['RPATHFLAG'] to add path stuff for each path you add via find_library On my mac, RbConfig::MAKEFILE_CONFIG['RPATHFLAG'] == "" whereas on my linux box it's: " -Wl,-R%1$-s".

I'm at chefconf this week so I don't have a ton of free time, but I'd like to research whether there is a fix in ruby for this problem before trying to implement a workaround in dep-selector.

@danielsdeleo
Copy link
Contributor Author

Also, this is pretty weird (results of otool -l $(gem which dep_gecode)):

/Users/ddeleo/.rbenv/versions/2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-darwin12.4.0/dep_gecode.bundle:
Load command 0
      cmd LC_SEGMENT_64
  cmdsize 712
  segname __TEXT
   vmaddr 0x0000000000000000
   vmsize 0x000000000001c000
  fileoff 0
 filesize 114688
  maxprot 0x00000007
 initprot 0x00000005
   nsects 8
    flags 0x0
Section
  sectname __text
   segname __TEXT
      addr 0x0000000000001290
      size 0x00000000000187bb
    offset 4752
     align 2^4 (16)
    reloff 0
    nreloc 0
     flags 0x80000400
 reserved1 0
 reserved2 0
Section
  sectname __stubs
   segname __TEXT
      addr 0x0000000000019a4c
      size 0x0000000000000378
    offset 105036
     align 2^1 (2)
    reloff 0
    nreloc 0
     flags 0x80000408
 reserved1 0 (index into indirect symbol table)
 reserved2 6 (size of stubs)
Section
  sectname __stub_helper
   segname __TEXT
      addr 0x0000000000019dc4
      size 0x00000000000002ea
    offset 105924
     align 2^2 (4)
    reloff 0
    nreloc 0
     flags 0x80000400
 reserved1 0
 reserved2 0
Section
  sectname __gcc_except_tab
   segname __TEXT
      addr 0x000000000001a0b0
      size 0x0000000000000fac
    offset 106672
     align 2^2 (4)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
  sectname __cstring
   segname __TEXT
      addr 0x000000000001b05c
      size 0x0000000000000a8c
    offset 110684
     align 2^0 (1)
    reloff 0
    nreloc 0
     flags 0x00000002
 reserved1 0
 reserved2 0
Section
  sectname __const
   segname __TEXT
      addr 0x000000000001baf0
      size 0x00000000000001db
    offset 113392
     align 2^4 (16)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
  sectname __unwind_info
   segname __TEXT
      addr 0x000000000001bccb
      size 0x00000000000002bc
    offset 113867
     align 2^0 (1)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
  sectname __eh_frame
   segname __TEXT
      addr 0x000000000001bf88
      size 0x0000000000000070
    offset 114568
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Load command 1
      cmd LC_SEGMENT_64
  cmdsize 552
  segname __DATA
   vmaddr 0x000000000001c000
   vmsize 0x0000000000001000
  fileoff 114688
 filesize 4096
  maxprot 0x00000007
 initprot 0x00000003
   nsects 6
    flags 0x0
Section
  sectname __got
   segname __DATA
      addr 0x000000000001c000
      size 0x00000000000000e0
    offset 114688
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000006
 reserved1 148 (index into indirect symbol table)
 reserved2 0
Section
  sectname __nl_symbol_ptr
   segname __DATA
      addr 0x000000000001c0e0
      size 0x0000000000000010
    offset 114912
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000006
 reserved1 176 (index into indirect symbol table)
 reserved2 0
Section
  sectname __la_symbol_ptr
   segname __DATA
      addr 0x000000000001c0f0
      size 0x00000000000004a0
    offset 114928
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000007
 reserved1 178 (index into indirect symbol table)
 reserved2 0
Section
  sectname __const
   segname __DATA
      addr 0x000000000001c590
      size 0x0000000000000058
    offset 116112
     align 2^4 (16)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
  sectname __data
   segname __DATA
      addr 0x000000000001c5f0
      size 0x00000000000003c8
    offset 116208
     align 2^4 (16)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
  sectname __common
   segname __DATA
      addr 0x000000000001c9b8
      size 0x0000000000000004
    offset 0
     align 2^2 (4)
    reloff 0
    nreloc 0
     flags 0x00000001
 reserved1 0
 reserved2 0
Load command 2
      cmd LC_SEGMENT_64
  cmdsize 72
  segname __LINKEDIT
   vmaddr 0x000000000001d000
   vmsize 0x0000000000008000
  fileoff 118784
 filesize 31592
  maxprot 0x00000007
 initprot 0x00000001
   nsects 0
    flags 0x0
Load command 3
            cmd LC_DYLD_INFO_ONLY
        cmdsize 48
     rebase_off 118784
    rebase_size 80
       bind_off 118864
      bind_size 1792
  weak_bind_off 120656
 weak_bind_size 1056
  lazy_bind_off 121712
 lazy_bind_size 3656
     export_off 125368
    export_size 2568
Load command 4
     cmd LC_SYMTAB
 cmdsize 24
  symoff 128456
   nsyms 342
  stroff 135232
 strsize 15144
Load command 5
            cmd LC_DYSYMTAB
        cmdsize 80
      ilocalsym 0
      nlocalsym 151
     iextdefsym 151
     nextdefsym 83
      iundefsym 234
      nundefsym 108
         tocoff 0
           ntoc 0
      modtaboff 0
        nmodtab 0
   extrefsymoff 0
    nextrefsyms 0
 indirectsymoff 133928
  nindirectsyms 326
      extreloff 0
        nextrel 0
      locreloff 0
        nlocrel 0
Load command 6
     cmd LC_UUID
 cmdsize 24
    uuid 3C50CFB1-8212-3977-B39B-4E6609162C9A
Load command 7
      cmd LC_VERSION_MIN_MACOSX
  cmdsize 16
  version 10.9
      sdk 10.9
Load command 8
      cmd LC_SOURCE_VERSION
  cmdsize 16
  version 0.0
Load command 9
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name /usr/local/lib/libgecodesearch.32.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 32.0.0
compatibility version 32.0.0
Load command 10
          cmd LC_LOAD_DYLIB
      cmdsize 72
         name /usr/local/lib/libgecodeminimodel.32.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 32.0.0
compatibility version 32.0.0
Load command 11
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name /usr/local/lib/libgecodeint.32.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 32.0.0
compatibility version 32.0.0
Load command 12
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name /usr/local/lib/libgecodekernel.32.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 32.0.0
compatibility version 32.0.0
Load command 13
          cmd LC_LOAD_DYLIB
      cmdsize 72
         name /usr/local/lib/libgecodesupport.32.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 32.0.0
compatibility version 32.0.0
Load command 14
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name /usr/lib/libSystem.B.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 1197.1.1
compatibility version 1.0.0
Load command 15
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name /usr/lib/libobjc.A.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 228.0.0
compatibility version 1.0.0
Load command 16
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name /usr/lib/libc++.1.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 120.0.0
compatibility version 1.0.0
Load command 17
      cmd LC_FUNCTION_STARTS
  cmdsize 16
  dataoff 127936
 datasize 232
Load command 18
      cmd LC_DATA_IN_CODE
  cmdsize 16
  dataoff 128168
 datasize 0
Load command 19
      cmd LC_DYLIB_CODE_SIGN_DRS
  cmdsize 16
  dataoff 128168
 datasize 288

Note this part:

Load command 13
          cmd LC_LOAD_DYLIB
      cmdsize 72
         name /usr/local/lib/libgecodesupport.32.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 32.0.0

That doesn't exist on my system.

@danielsdeleo
Copy link
Contributor Author

@lamont-granquist any thoughts?

@docwhat
Copy link

docwhat commented Apr 17, 2014

I was thinking about it on the way home. It can't just be an RPATH problem or brew uninstall would fix it. And brew installing gecode afterwards would break it.

If your custom downloading/compiling gecode anyway, why not static link it?

@docwhat
Copy link

docwhat commented Apr 17, 2014

On my home laptop, I get:

$ otool -L /usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/dep_selector-1.0.2/lib/dep_gecode.bundle
/usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/dep_selector-1.0.2/lib/dep_gecode.bundle:
        /usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/dep-selector-libgecode-1.0.0/lib/dep-selector-libgecode/vendored-gecode/lib/libgecodesearch.32.dylib (compatibility version 32.0.0, current version 32.0.0)
        /usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/dep-selector-libgecode-1.0.0/lib/dep-selector-libgecode/vendored-gecode/lib/libgecodeminimodel.32.dylib (compatibility version 32.0.0, current version 32.0.0)
        /usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/dep-selector-libgecode-1.0.0/lib/dep-selector-libgecode/vendored-gecode/lib/libgecodeint.32.dylib (compatibility version 32.0.0, current version 32.0.0)
        /usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/dep-selector-libgecode-1.0.0/lib/dep-selector-libgecode/vendored-gecode/lib/libgecodekernel.32.dylib (compatibility version 32.0.0, current version 32.0.0)
        /usr/local/var/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/dep-selector-libgecode-1.0.0/lib/dep-selector-libgecode/vendored-gecode/lib/libgecodesupport.32.dylib (compatibility version 32.0.0, current version 32.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
        /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)

@danielsdeleo
Copy link
Contributor Author

Might be fixed by #26

@nhuff
Copy link

nhuff commented Apr 21, 2014

Just as another data point, on a Fedora 20 box with gecode 4 system package installed I couldn't get dep-solver gem to correctly link until I removed the gecode package and ruby -rrbconfig -e 'p RbConfig::MAKEFILE_CONFIG["RPATHFLAG"]' is " -Wl,-R%1$-s"

It looks lie the the gecode 4 package provides .so.36 libraries which dep-solver was preferentially linking to instead of the .so.32 included in the vendored version so setting LD_LIBRARY_PATH wasn't even an option. I had to remove the packages and then reinstall dep-solver.

@hntd187
Copy link

hntd187 commented Apr 23, 2014

I am also experiencing what appears to be this issue, but to no avail. When I try and run berks I get

/home/scarman/.rvm/gems/ruby-2.1.0/gems/ffi-1.9.3/lib/ffi/library.rb:133:in `block in ffi_lib': Could not open library '/home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_gecode.so': libgecodesearch.so.32: cannot open shared object file: No such file or directory (LoadError)
    from /home/scarman/.rvm/gems/ruby-2.1.0/gems/ffi-1.9.3/lib/ffi/library.rb:100:in `map'
    from /home/scarman/.rvm/gems/ruby-2.1.0/gems/ffi-1.9.3/lib/ffi/library.rb:100:in `ffi_lib'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector/dep_gecode.rb:39:in `<module:Dep_gecode>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector/dep_gecode.rb:21:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector/gecode_wrapper.rb:21:in `require'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector/gecode_wrapper.rb:21:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector/dependency_graph.rb:21:in `require'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector/dependency_graph.rb:21:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector/selector.rb:21:in `require'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector/selector.rb:21:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector.rb:22:in `require'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_selector.rb:22:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/gems/solve-1.2.0/lib/solve/solver.rb:1:in `require'
    from /home/scarman/.rvm/gems/ruby-2.1.0/gems/solve-1.2.0/lib/solve/solver.rb:1:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/gems/solve-1.2.0/lib/solve.rb:10:in `require_relative'
    from /home/scarman/.rvm/gems/ruby-2.1.0/gems/solve-1.2.0/lib/solve.rb:10:in `<module:Solve>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/gems/solve-1.2.0/lib/solve.rb:3:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/berkshelf-c1063cb4fa84/lib/berkshelf.rb:8:in `require'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/berkshelf-c1063cb4fa84/lib/berkshelf.rb:8:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/berkshelf-c1063cb4fa84/lib/berkshelf/cli.rb:1:in `require'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/berkshelf-c1063cb4fa84/lib/berkshelf/cli.rb:1:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/berkshelf-c1063cb4fa84/bin/berks:3:in `require'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/berkshelf-c1063cb4fa84/bin/berks:3:in `<top (required)>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bin/berks:23:in `load'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bin/berks:23:in `<main>'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
    from /home/scarman/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'

Uninstall of the gecode doesn't do anything. When I reinstall the gem I get this

gem install dep-selector-libgecode -v 1.0.0
Fetching: dep-selector-libgecode-1.0.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed dep-selector-libgecode-1.0.0
Parsing documentation for dep-selector-libgecode-1.0.0
unable to convert "\xE9" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/Makefile, skipping
unable to convert "\xEB" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/changelog.in, skipping
unable to convert "\x8E" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.cc, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/examples/bin-packing.cpp, skipping
unable to convert "\xEA" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/examples/black-hole.cpp, skipping
unable to convert "\xD6" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/examples/dominating-queens.cpp, skipping
unable to convert "\xEF" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/gecode.m4, skipping
unable to convert "\xED" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/gecode/int.hh, skipping
unable to convert "\xED" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.hh, skipping
unable to convert "\xE9" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.hh, skipping
unable to convert "\xF3" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.hh, skipping
unable to convert "\xE4" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.hh, skipping
unable to convert "\xED" from ASCII-8BIT to UTF-8 for ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.hh, skipping
unable to convert "\xED" from ASCII-8BIT to UTF-8 for lib/dep-selector-libgecode/vendored-gecode/include/gecode/int.hh, skipping
unable to convert "\xED" from ASCII-8BIT to UTF-8 for lib/dep-selector-libgecode/vendored-gecode/include/gecode/int/cumulative.hh, skipping
unable to convert "\xE9" from ASCII-8BIT to UTF-8 for lib/dep-selector-libgecode/vendored-gecode/include/gecode/int/distinct.hh, skipping
unable to convert "\xF3" from ASCII-8BIT to UTF-8 for lib/dep-selector-libgecode/vendored-gecode/include/gecode/int/gcc.hh, skipping
unable to convert "\xE4" from ASCII-8BIT to UTF-8 for lib/dep-selector-libgecode/vendored-gecode/include/gecode/int/sorted.hh, skipping
unable to convert "\xED" from ASCII-8BIT to UTF-8 for lib/dep-selector-libgecode/vendored-gecode/include/gecode/int/unary.hh, skipping
Installing ri documentation for dep-selector-libgecode-1.0.0
Done installing documentation for dep-selector-libgecode after 10 seconds
1 gem installed

Hopefully this is relevant.

@danielsdeleo
Copy link
Contributor Author

All the stuff after Parsing documentation for dep-selector-libgecode-1.0.0 is just noise, rdoc is trying to parse binary files and gecode source as if it were ruby to generate documentation. I've been looking for the right rdoc options to suppress that, but haven't gotten it working yet.

@danielsdeleo
Copy link
Contributor Author

@hntd187 I think your issue is different than this one. If you had this issue you'd be seeing Symbol not found: __ZN6Gecode16ValBranchOptions3defE or something like that. Can you create a new ticket, and include the output of bundle show dep-selector-libgecode and readelf -d home/scarman/.rvm/gems/ruby-2.1.0/bundler/gems/dep-selector-7a75df69ae48/lib/dep_gecode.so

@hntd187
Copy link

hntd187 commented Apr 24, 2014

@danielsdeleo Well you are correct, but also when I run something like kitchen list for chef test kitchen I get the symbol error that you are describing here. I'm just trying to add extra information to what you are talking about.

@cscetbon
Copy link

cscetbon commented May 5, 2014

Hi,

any news about it ?

@petere
Copy link

petere commented May 5, 2014

The workaround listed at the top worked for me.

@cscetbon
Copy link

cscetbon commented May 5, 2014

Right ! sorry, I didn't see the workaround part but only the issue and the following posts ..

Thanks

Cyril SCETBON

On 05 May 2014, at 17:07, Peter Eisentraut [email protected] wrote:

The workaround listed at the top worked for me.


Reply to this email directly or view it on GitHub.

@lamont-granquist
Copy link
Contributor

you can lazy load the library with DL.dlopen instead of linking it at link-time:

https://github.com/lamont-granquist/ffi-yajl/blob/master/lib/ffi_yajl/ext.rb#L16

if you go down that route it has the advantage that when the dep-selector-libgecode gem is updated then it'll update the 'link' from dep-selector as well, rather than having dep-selector fixed to a version of libgecode at its install time.

there's issues with windows begin stupid and needing a shim to be able to do lazy linking.

latest ruby yanks DL.dlopen out of the standard library, however, and we have to use fiddle instead, and i haven't ported to that yet.

@Ellison001
Copy link

I got the similar error here. and the workaround listed at the top doesn't work for me.
!!!!! The berkshelf' gem is missing and must be installed or cannot be properly activated. Rungem install berkshelfor add the following to your Gemfile if you are using Bundler:gem 'berkshelf'`.

------Exception-------
Class: Kitchen::UserError
Message: Could not load or activate Berkshelf (Could not open library '/Users/ezhang/.chefdk/gem/ruby/2.1.0/gems/dep_selector-1.0.3/lib/dep_gecode.bundle': dlopen(/Users/ezhang/.chefdk/gem/ruby/2.1.0/gems/dep_selector-1.0.3/lib/dep_gecode.bundle, 5): Library not loaded: /usr/local/lib/libgecodesearch.36.dylib
Referenced from: /Users/ezhang/.chefdk/gem/ruby/2.1.0/gems/dep_selector-1.0.3/lib/dep_gecode.bundle
Reason: image not found)

@erinnovations
Copy link

same problem here :(

@dbafast
Copy link

dbafast commented Nov 20, 2015

OSX
Same issue .
Is this fixed?

------Exception-------
Class: Kitchen::UserError
Message: Could not load or activate Berkshelf (Could not open library '/Library/Ruby/Gems/2.0.0/gems/dep_selector-1.0.3/lib/dep_gecode.bundle': dlopen(/Library/Ruby/Gems/2.0.0/gems/dep_selector-1.0.3/lib/dep_gecode.bundle, 5): Library not loaded: /private/var/folders/q6/_4hvkps50mvdwgq1kq35x_000000gr/T/bundler20151023-6196-1t2v8ysdep-selector-libgecode-1.0.2/gems/dep-selector-libgecode-1.0.2/lib/dep-selector-libgecode/vendored-gecode/lib/libgecodesearch.32.dylib

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

10 participants