Unfortunately, I have not found *-devel source for openssl.
I have made some progress, but have run into further problems, down
the road.
The problem I solved involves the GNU Linker. Unfortunately, the
problem that I created involves the GNU Linker, as well.
I've modified the Makefile files in:
ext/digest/md5
ext/digest/rmd160
ext/digest/sha1
/ext/openssl
The change is to remove references to .a files, found in the LIBS
variable:
-lcrypt
-lcrypto
-lssl
and hand-add the literal references to .so files (one example - the
openssl makefile):
$(RUBYARCHDIR)/$(DLLIB): $(OBJS)
@-$(RM) $@
@-$(MAKEDIRS) $(@D)
$(LDSHARED) $(DLDFLAGS) $(LIBPATH) -o /lib64/libcrypto.so.4 -
o /lib64/libcrypt.so.1 -o /lib64/libssl.so.4 -o $@ $(OBJS) $
(LOCAL_LIBS) $(LIBS)
This allows the following commands, run from ~/ruby-1.8.6 to execute
without returning an error:
make
make install
However, the openssl library is still not found:
ruby -ropenssl -e "puts :success"
/usr/local/lib/ruby/1.8/x86_64-linux/openssl.so: /usr/local/lib/ruby/
1.8/x86_64-linux/openssl.so: undefined symbol: d2i_PKCS7_SIGNER_INFO
- /usr/local/lib/ruby/1.8/x86_64-linux/openssl.so (LoadError)
from /usr/local/lib/ruby/1.8/openssl.rb:17
...and the launch of the web server still fails:
ruby -d script/server
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:
772 - no such file to load -- rubygems/defaults/operating_system
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:241:
warning: `&' interpreted as argument prefix
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/
gem_dependency.rb:32: warning: `*' interpreted as argument prefix
Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems.rb:578 - Could not find RubyGem builder (~> 2.1.2)
Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems.rb:578 - Could not find RubyGem xml-simple (~> 1.0.11)
Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems.rb:578 - Could not find RubyGem memcache-client (~> 1.5.0)
Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems.rb:578 - Could not find RubyGem tzinfo (~> 0.3.8)
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27 - no such file to load -- Win32API
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:34 - no such file to load -- Win32API
Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:27 - no such file to load -- fast_xs
Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:34 - no such file to load -- fast_xs
Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:27 - no such file to load --
utf8proc_native
Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:34 - no such file to load --
utf8proc_native
Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:512 - no such
file to load -- utf8proc_native
Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:27 - no such file to load -- fcgi
Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:34 - no such file to load -- fcgi
Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:512 - no such
file to load -- fcgi
Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:27 - no such file to load -- fcgi
Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:34 - no such file to load -- fcgi
Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:512 - no such
file to load -- fcgi
Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/core_ext/kernel/requires.rb:19
- no such file to load -- fcgi
Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:27 - no such file to load -- mongrel
Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/
mongrel-1.1.5/lib/mongrel/gems.rb:7 - no such file to load --
mongrel_experimental
Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/
rubygems.rb:578 - Could not find RubyGem mongrel_experimental (>=
1.1.5)
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /home/m31451/project/test/tmp/cache
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /home/m31451/project/test/tmp/pids
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /home/m31451/project/test/tmp/sessions
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243
- File exists - /home/m31451/project/test/tmp/sockets
=> Rails 2.1.0 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:188:
warning: instance variable @host not initialized
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:188:
warning: instance variable @includes not initialized
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:135: warning: instance variable @rails_handler not
initialized
/home/m31451/project/test/config/boot.rb:8: warning: method redefined;
discarding old boot!
/home/m31451/project/test/config/boot.rb:15: warning: method
redefined; discarding old booted?
/home/m31451/project/test/config/boot.rb:19: warning: method
redefined; discarding old pick_boot
/home/m31451/project/test/config/boot.rb:23: warning: method
redefined; discarding old vendor_rails?
/home/m31451/project/test/config/boot.rb:27: warning: method
redefined; discarding old preinitialize
/home/m31451/project/test/config/boot.rb:31: warning: method
redefined; discarding old preinitializer_path
/home/m31451/project/test/config/boot.rb:37: warning: method
redefined; discarding old run
/home/m31451/project/test/config/boot.rb:44: warning: method
redefined; discarding old load_initializer
/home/m31451/project/test/config/boot.rb:51: warning: method
redefined; discarding old load_initializer
/home/m31451/project/test/config/boot.rb:57: warning: method
redefined; discarding old load_rails_gem
/home/m31451/project/test/config/boot.rb:69: warning: method
redefined; discarding old rubygems_version
/home/m31451/project/test/config/boot.rb:73: warning: method
redefined; discarding old gem_version
/home/m31451/project/test/config/boot.rb:83: warning: method
redefined; discarding old load_rubygems
/home/m31451/project/test/config/boot.rb:96: warning: method
redefined; discarding old parse_gem_version
/home/m31451/project/test/config/boot.rb:101: warning: method
redefined; discarding old read_environment_rb
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
validations.rb:284: warning: `*' interpreted as argument prefix
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
callbacks.rb:187: warning: `*' interpreted as argument prefix
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
connection_adapters/abstract/connection_specification.rb:41: warning:
method redefined; discarding old allow_concurrency=
Exception `LoadError' at /usr/local/lib/ruby/1.8/x86_64-linux/digest/
md5.so:0 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so:
undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/
digest/md5.so
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/
md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-
linux/digest/md5.so
Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/
local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol:
MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/
md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-
linux/digest/md5.so
Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/
local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol:
MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/
md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-
linux/digest/md5.so
Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/
local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol:
MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/
md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-
linux/digest/md5.so
Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/
local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol:
MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so
Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/
rails-2.1.0/lib/initializer.rb:225 - /usr/local/lib/ruby/1.8/x86_64-
linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/
1.8/x86_64-linux/digest/md5.so
Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/
local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol:
MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so
Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:505 - /usr/
local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol:
MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so
Exiting
Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/
activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/
local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol:
MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:
225:in `require_frameworks': /usr/local/lib/ruby/1.8/x86_64-linux/
digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/
x86_64-linux/digest/md5.so (RuntimeError)
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/
initializer.rb:113:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/
initializer.rb:93:in `send'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/
initializer.rb:93:in `run'
from /home/m31451/project/test/config/environment.rb:13
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:509:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:354:in `new_constants_in'
... 22 levels...
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/
commands/server.rb:39
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:in `require'
from script/server:3
I believe that I have essentially "pushed the linking problem up the
chain," rather than fixing it.
I believe that the proper fix is to modify the arguments to:
ruby-1.8.6 % ./configure <arguments here>
so that the Makefiles for each directory "do the right thing" and work
solely with 64-bit shared object files.
I've looked at the configure script, and found it to be autogenerated
by GNU Autoconf.
There are a few spots in the file that appear to be related to library
settings, but the format does not
lend itself to easy analysis.
Just an update.