Compiling ruby with openssl 1.0.1c fails

HI Guys,

I need help in compiling Ruby 1.9.3 with openssl1.0.1c. I had compiled
ruby with 1.0.0 initially but we wanted to support AES-CTR algorithm
which is available only in 1.0.c.

I performed below steps

  1. Compiled and installed openssl 1.0.1c at /usr/local/ssl
  2. cd <ruby source/ext/openssl
  3. ruby extconf.rb --with-openssl-dir=/usr/local/ssl
  4. make & make install
  5. ruby -e “require ‘openssl’”
  6. o/p:
    /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
    require': ld.so.1: ruby: fatal: relocation error: file /usr/local/lib/ruby/site_ruby/1.9.1/i386-solaris2.11/openssl.so: symbol i2d_ECPKParameters: referenced symbol not found - /usr/local/lib/ruby/site_ruby/1.9.1/i386-solaris2.11/openssl.so (LoadError) from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
    from /usr/local/lib/ruby/site_ruby/1.9.1/openssl.rb:17:in <top (required)>' from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
    from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
    require' from -e:1:in

I am not sure what is wrong on soalris but these steps works on linux.

–Haribhau

Subject: compiling ruby with openssl 1.0.1c fails
Date: Wed 16 Jan 13 01:30:00PM +0900

Quoting Haribhau Ingale ([email protected]):

I need help in compiling Ruby 1.9.3 with openssl1.0.1c. I had compiled
ruby with 1.0.0 initially but we wanted to support AES-CTR algorithm
which is available only in 1.0.c.

I have never had any exposure to Solaris, but… Are you sure that
/usr/local/lib/ruby/site_ruby/1.9.1/i386-solaris2.11/openssl.so is the
new file, just compiled? Did you check the date?

If the file is the right one, what I would try is to find out which
shared libraries are required by it. In linux you do it with

ldd <path-to-.so-file>

Might be that the ruby .so file calls in a mix of new and old openssl
shared libraries.

Carlo