Bug #9908
closed[mingw] openssl.so LoadError when built with 1.0.0m or 1.0.1h
Description
While testing an MRI rebuild to use bug fixed openssl libs, I get the following runtime fail during load of openssl ext.
MRI built on Win8.1 64bit using mingw-w64 32bit 4.9.0 toolchain and rubyinstaller recipes. Custom OpenSSL libs built using recipe listed below using 32bit mingw-w64 4.9.0 toolchain.
I've not confirmed whether the openssl ext is guilty or my custom built openssl libs are guilty.
# using 32bit openssl 1.0.0m or 1.0.1h devlibs build using this ps recipe
#
# https://github.com/jonforums/buildlets/blob/master/build_openssl.ps1
sh-4.3$ ruby -ropenssl -ve "puts OpenSSL::OPENSSL_VERSION"
ruby 2.1.2p123 (2014-06-03 revision 46319) [i386-mingw32]
C:/Users/Jon/Documents/RubyDev/ri-git/sandbox/ruby21_mingw/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': 126: The specified module could not be found. - C:/Users/Jon/Documents/RubyDev/ri-git/sandbox/ruby21_mingw/lib/ruby/2.1.0/i386-mingw32/openssl.so (LoadError)
from C:/Users/Jon/Documents/RubyDev/ri-git/sandbox/ruby21_mingw/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Users/Jon/Documents/RubyDev/ri-git/sandbox/ruby21_mingw/lib/ruby/2.1.0/openssl.rb:17:in `<top (required)>'
from C:/Users/Jon/Documents/RubyDev/ri-git/sandbox/ruby21_mingw/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Users/Jon/Documents/RubyDev/ri-git/sandbox/ruby21_mingw/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
# here's what it should look like...
arch64:~ % uname -a
Linux arch64 3.14.5-1-ARCH #1 SMP PREEMPT Sun Jun 1 07:36:23 CEST 2014 x86_64 GNU/Linux
arch64:~ % ruby -ropenssl -ve "puts OpenSSL::OPENSSL_VERSION"
ruby 2.1.2p123 (2014-06-03 revision 46319) [x86_64-linux]
OpenSSL 1.0.1h 5 Jun 2014
Updated by jonforums (Jon Forums) almost 10 years ago
My custom built openssl libs are guilty, not the openssl ext.
The upgraded 32bit 4.9.0 toolchain I used to build the openssl libs uses dw2 rather than sjlj used by the previous version. The libeay32.dll implicitly linked against libgcc_2_dw2-1.dll conflicts with the openssl ext built using a 32bit 4.9.0 sjlj toolchain.
Using new 1.0.0m openssl libs built without the dw2 dependency, things appear to be OK:
C:\Users\Jon\Documents>ruby -ropenssl -ve "puts OpenSSL::OPENSSL_VERSION"
ruby 2.1.2p124 (2014-06-07 revision 46367) [i386-mingw32]
OpenSSL 1.0.0m 5 Jun 2014
Verifying that non-dw2 1.0.1h libs also work...
Updated by nagachika (Tomoyuki Chikanaga) almost 10 years ago
- Status changed from Open to Closed
Updated by usa (Usaku NAKAMURA) almost 10 years ago
- Status changed from Closed to Rejected