Bug #9908

[mingw] LoadError when built with 1.0.0m or 1.0.1h

Added by Jon Forums over 2 years ago. Updated over 2 years ago.

Target version:
ruby -v:
ruby 2.1.2p123 (2014-06-03 revision 46319) [i386-mingw32]


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

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/ (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


#1 [ruby-core:62970] Updated by Jon Forums over 2 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...

#2 [ruby-core:63580] Updated by Tomoyuki Chikanaga over 2 years ago

  • Status changed from Open to Closed

#3 [ruby-core:63581] Updated by Usaku NAKAMURA over 2 years ago

  • Status changed from Closed to Rejected

Also available in: Atom PDF