Hi all,

I'm  running into what I suspect to be a linker related issue.
When I compile Ruby + Openssl extension on a machine running snv_75, the 
resulting binary is able to load the compiled extension without any 
problems . . .

root at dn17 nightly-nd >/export/prashant/ruby_builds/1.8/bin/ruby  -e 
"require 'openssl'"
root at dn17 nightly-nd > #extension loaded fine.

Now if I were to hook the same Makefile and configure options into the 
sfwnv consolidation, and create packages, the resulting Ruby cannot load 
the Openssl extension.

ie.,

root at dn17 nightly-nd >/usr/ruby/1.8/bin/ruby -e "require 'openssl'"
/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11/openssl.so: ld.so.1: ruby: 
fatal: relocation error: file 
/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11/openssl.so: symbol 
ENGINE_load_openssl: referenced symbol not found - 
/usr/ruby/1.8/lib/ruby/1.8/i386-solaris2.11/openssl.so (LoadError)
       from /usr/ruby/1.8/lib/ruby/1.8/openssl.rb:17
       from -e:1:in `require'
       from -e:1


Now, the symbol ENGINE_load_openssl shows up as undefined, irrespective 
of which build of openssl.so I look at.  So I assumed that  vanilla Ruby 
build "knew" where to look for this symbol, while the sfwnv Ruby build 
did not.

So I used LD_DEBUG=symbols to watch where ENGINE_load_openssl was being 
loaded from.  And it so happens that this symbol is not loaded at 
all(going by the contents of the LD_DEBUG_OUTPUT file), in the vanilla 
Ruby build . . . but in the Ruby built from sfwnv, the loader tries hard 
to resolve it, and finally gives up(and fails).

So is there a property in an so file to tell the linker not to load 
symbols that are not used? Or any other ideas about what could be 
different compiler/linkers wise, about the sfwnv openssl.so(or Ruby) 
that is causing this load to fail?


Thanks

Reply via email to