Perhaps it manipulates the compiler flags? I’m guessing there’s a lot somewhere showing what compiler line it used. My knowledge with Ruby is rather limited (I only know about the C library here..)
> On Jul 9, 2015, at 5:11 PM, Jesus Orosco <[email protected]> wrote: > > Care to speculate why this worked? > > [email protected]:/opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.60/bin# > ./fluent-gem install ~/couchbase-1.3.13.gem > Building native extensions. This could take a while... > Successfully installed couchbase-1.3.13 > Parsing documentation for couchbase-1.3.13 > Done installing documentation for couchbase after 2 seconds > 1 gem installed > > > > On Wednesday, July 8, 2015 at 2:13:39 PM UTC-7, M. Nunberg wrote: > So it seems libruby.so uses its own statically linked openssl, and exports > those symbols so they are available to other applications. Maybe modifying > the linker commandline to provide -lcouchbase before -lruby > would help? I’m not entirely sure. Your best bet is to build the library > without openssl (requires CMake, use ./cmake/configure —disable-ssl). Follow > the instructions for building from source on the README > (https://github.com/couchbase/libcouchbase > <https://github.com/couchbase/libcouchbase>). Remember to git checkout 2.5.1 > before building in order to get a stable release version. > >> On Jul 8, 2015, at 1:49 PM, Jesus Orosco <chu...@ <>gmail.com >> <http://gmail.com/>> wrote: >> >> cbc version: >> >> [email protected]:/opt/td-agent/embedded/lib# cbc version >> cbc: >> Runtime: Version=2.5.1, Changeset=54ea1fa2e7bd5fef34450d09f2677bb53b6e62ea >> Headers: Version=2.5.1, Changeset=54ea1fa2e7bd5fef34450d09f2677bb53b6e62ea >> IO: Default=libevent, Current=libevent >> SSL: .. SUPPORTED >> >> ldd: >> >> [email protected]:/opt/td-agent/embedded/lib# ldd >> /opt/td-agent/embedded/bin/ruby >> linux-vdso.so.1 => (0x00007fff02f72000) >> libruby.so.2.1 => /opt/td-agent/embedded/lib/libruby.so.2.1 >> (0x00007f0e98795000) >> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0e983c9000) >> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 >> (0x00007f0e981aa000) >> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0e97fa6000) >> libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 >> (0x00007f0e97d6d000) >> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0e97a66000) >> /lib64/ld-linux-x86-64.so.2 (0x00007f0e98c74000) >> >> On Wednesday, July 8, 2015 at 1:43:23 PM UTC-7, M. Nunberg wrote: >> So you’re using the correct system openssl, but for some reason I still >> suspect that the Ruby you are using isn’t using the correct one. >> >> Just to verify, download the libcouchbase command line tools >> (libcouchbase2-bin) and see if a simple command such as ‘cbc version’ works >> for you. If that does, your options are: >> >> 1) Rebuild libcouchbase without SSL support (you’d need to build it from >> source) >> 2) Ensure your Ruby uses the system-available openssl >> >> Curious what an ‘ldd’ would yield on the Ruby binary being used. >> >>> On Jul 8, 2015, at 1:24 PM, Jesus Orosco <[email protected] <>> wrote: >>> >>> Openssl version as follows: >>> >>> [email protected]:~# dpkg -l | grep openssl >>> ii libgnutls-openssl27:amd64 2.12.23-12ubuntu2.2 >>> amd64 GNU TLS library - OpenSSL wrapper >>> ii openssl 1.0.1f-1ubuntu2.11 >>> amd64 Secure Sockets Layer toolkit - cryptographic utility >>> >>> I failed to mention this, my bad. Yes I am using the Ruby that is embedded >>> with Treasure Data Fluent D package, the ultimate goal being to use the >>> Couchbase plugin for fluentd: >>> >>> https://github.com/obieq/fluent-plugin-couchbase >>> <https://github.com/obieq/fluent-plugin-couchbase> >>> >>> I have this working on Ubuntu 12 using a similar embedded version of Ruby. >>> >>> On Wednesday, July 8, 2015 at 1:16:25 PM UTC-7, M. Nunberg wrote: >>> What version of openssl do you have installed? What does dpkg say? At first >>> glance it would seem that either libcouchase is linked against the wrong >>> openssl, or you have a different openssl installation. >>> >>> I’ve just downloaded the libssl deb for trusty and extracted it. Among one >>> of the symbols missing is SSL_get_ssl_method@OPENSSL_1.0.0 (from the error >>> log). >>> >>> It’s found inside the ssl package I just downloaded: >>> mnunberg@csure:~/repos/ubuntu/pool/trusty/main/libc/libcouchbase/tmp/lib/x86_64-linux-gnu$ >>> readelf -a libssl.so.1.0.0 | grep SSL_get_ssl_method >>> 622: 0000000000038830 5 FUNC GLOBAL DEFAULT 12 >>> SSL_get_ssl_method@@OPENSSL_1.0.0 >>> >>> I am seeing you are using a non-system Ruby installation. Perhaps this Ruby >>> version has its own openssl which is different than the system’s, and in >>> turn, is accidentally being picked up by libcouchbase? >>> >>>> On Jul 8, 2015, at 1:05 PM, Jesus Orosco <[email protected] <>> wrote: >>>> >>>> I've installed the most recent C libraries via Couchbase repo: >>>> >>>> [email protected]:~# dpkg -l | grep couchbase >>>> ii libcouchbase-dev:amd64 2.5.1-1 >>>> amd64 library for the Couchbase protocol, development files >>>> ii libcouchbase2-bin 2.5.1-1 >>>> amd64 library for the Couchbase protocol >>>> ii libcouchbase2-core:amd64 2.5.1-1 >>>> amd64 library for the Couchbase protocol, core files >>>> ii libcouchbase2-libev:amd64 2.5.1-1 >>>> amd64 library for the Couchbase protocol (libev backend) >>>> ii libcouchbase2-libevent:amd64 2.5.1-1 >>>> amd64 library for the Couchbase protocol (libevent backend) >>>> >>>> Only find 1 library: >>>> >>>> [email protected]:~# find / -name couchbase.h 2>/dev/null >>>> /usr/include/libcouchbase/couchbase.h >>>> >>>> gem install seems to fail to find the libcouchbase libraries: >>>> >>>> [email protected]:~# /opt/td-agent/embedded/bin/gem install couchbase >>>> -v 1.3.13 >>>> Building native extensions. This could take a while... >>>> ERROR: Error installing couchbase: >>>> ERROR: Failed to build gem native extension. >>>> >>>> /opt/td-agent/embedded/bin/ruby extconf.rb >>>> checking for lcb_iops_wire_bsd_impl2(NULL, 0) in -lcouchbase... no >>>> >>>> ********************************************************************** >>>> * You must install libcouchbase >= 2.4.0 >>>> * See http://www.couchbase.com/communities/c/ >>>> <http://www.couchbase.com/communities/c/> for more details >>>> ********************************************************************** >>>> >>>> *** extconf.rb failed *** >>>> Could not create Makefile due to some reason, probably lack of necessary >>>> libraries and/or headers. Check the mkmf.log file for more details. You >>>> may >>>> need configuration options. >>>> >>>> Provided configuration options: >>>> --with-opt-dir >>>> --with-opt-include >>>> --without-opt-include=${opt-dir}/include >>>> --with-opt-lib >>>> --without-opt-lib=${opt-dir}/lib >>>> --with-make-prog >>>> --without-make-prog >>>> --srcdir=. >>>> --curdir >>>> --ruby=/opt/td-agent/embedded/bin/ruby >>>> --with-libcouchbase-dir >>>> --without-libcouchbase-dir >>>> --with-libcouchbase-include >>>> --without-libcouchbase-include=${libcouchbase-dir}/include >>>> --with-libcouchbase-lib >>>> --without-libcouchbase-lib=${libcouchbase-dir}/lib >>>> --with-couchbaselib >>>> --without-couchbaselib >>>> >>>> extconf failed, exit code 1 >>>> >>>> Gem files will remain installed in >>>> /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/couchbase-1.3.13 for >>>> inspection. >>>> Results logged to >>>> /opt/td-agent/embedded/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0/couchbase-1.3.13/gem_make.out >>>> >>>> mkmf.log: >>>> >>>> http://pastebin.com/PuNJVpdY <http://pastebin.com/PuNJVpdY> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Couchbase" group. >>>> To unsubscribe from this group and stop receiving emails from it, send an >>>> email to couchbase+...@ <>googlegroups.com <http://googlegroups.com/>. >>>> For more options, visit https://groups.google.com/d/optout >>>> <https://groups.google.com/d/optout>. >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Couchbase" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected] <>. >>> For more options, visit https://groups.google.com/d/optout >>> <https://groups.google.com/d/optout>. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Couchbase" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "Couchbase" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Couchbase" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
