cotag / libcouchbase

libcouchbase ruby FFI with libuv integration
Other
11 stars 8 forks source link

Gem doesn't build libcouchbase.so #2

Closed gottlike closed 7 years ago

gottlike commented 7 years ago

I just tried using the gem, but it fails on require:

irb(main):001:0> require 'libcouchbase'
LoadError: Could not open library '/usr/local/lib/ruby/gems/2.3.0/gems/libcouchbase-0.1.0/ext/libcouchbase/build/lib/libcouchbase.so': /usr/local/lib/ruby/gems/2.3.0/gems/libcouchbase-0.1.0/ext/libcouchbase/build/lib/libcouchbase.so: cannot open shared object file: No such file or directory
    from /usr/local/lib/ruby/gems/2.3.0/gems/ffi-1.9.18/lib/ffi/library.rb:147:in `block in ffi_lib'
    from /usr/local/lib/ruby/gems/2.3.0/gems/ffi-1.9.18/lib/ffi/library.rb:100:in `map'
    from /usr/local/lib/ruby/gems/2.3.0/gems/ffi-1.9.18/lib/ffi/library.rb:100:in `ffi_lib'
    from /usr/local/lib/ruby/gems/2.3.0/gems/libcouchbase-0.1.0/lib/libcouchbase/ext/libcouchbase.rb:10:in `<module:Ext>'
    from /usr/local/lib/ruby/gems/2.3.0/gems/libcouchbase-0.1.0/lib/libcouchbase/ext/libcouchbase.rb:4:in `<top (required)>'
    from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/gems/2.3.0/gems/libcouchbase-0.1.0/lib/libcouchbase.rb:6:in `<module:Libcouchbase>'
    from /usr/local/lib/ruby/gems/2.3.0/gems/libcouchbase-0.1.0/lib/libcouchbase.rb:5:in `<top (required)>'
    from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
    from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
    from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
    from (irb):1
    from /usr/local/bin/irb:11:in `<main>'

System: Debian VM

I installed the gem according to the readme (gem install libcouchbase).

gottlike commented 7 years ago

Ah, nevermind.. I didn't have cmake installed. But it might be a good idea to not let the gem installation process fail silently, so I'll leave the ticket open for now.

stakach commented 7 years ago

Agreed! It is annoying. The build always returns success, will think about it, otherwise happy to accept pull requests

slash4 commented 7 years ago

Hey, but it's very like https://github.com/acaprojects/couchbase-orm/issues/2 ! I installed cmake though. And still the same. Do we have to add cmake in PATH or something (I'm on macbook pro) ? I personnaly used the .dmg

I used cmake UI to explicitely build the lib, everything went all right, I have some files in the build folder now, but still nothing in the final /lib folder.

stakach commented 7 years ago

Try installing using gem install libcouchbase --verbose You should see the error. I'll resolve this soon!

slash4 commented 7 years ago

Great ! Indeed : cmake ../ \ "-DCMAKE_BUILD_TYPE=RelWithDebInfo" \ "-DCMAKE_INSTALL_PREFIX=/usr/local" \ "-DLIBUV_ROOT=/Users/alexcentar/.rvm/gems/ruby-2.2.6/gems/libuv-3.1.7/ext/libuv" \ "-GUnix Makefiles" \ Can't exec "cmake": No such file or directory at ./cmake/configure line 337. Couldn't invoke cmake at ./cmake/configure line 339. make: *** No targets specified and no makefile found. Stop . I'll investigate further tomorrow