Bug #11940
Ruby fails to compile with --with-static-linked-ext
Description
Hello,
When I select to include all ext static linked and between them there is openssl, ruby fails to build.
$ ./configure --disable-install-doc --disable-install-rdoc --disable-install-capi --with-static-linked-ext $ make $ make install (...) ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" /tmp/ruby-2.3.0/lib/rubygems/security.rb:344:in `<module:Security>': uninitialized constant OpenSSL::Digest::SHA1 (NameError) from /tmp/ruby-2.3.0/lib/rubygems/security.rb:332:in `<top (required)>' from /tmp/ruby-2.3.0/lib/rubygems/core_ext/kernel_require.rb:55:in `require' from /tmp/ruby-2.3.0/lib/rubygems/core_ext/kernel_require.rb:55:in `require' from /tmp/ruby-2.3.0/lib/rubygems/package.rb:44:in `<top (required)>' from /tmp/ruby-2.3.0/lib/rubygems/core_ext/kernel_require.rb:55:in `require' from /tmp/ruby-2.3.0/lib/rubygems/core_ext/kernel_require.rb:55:in `require' from /tmp/ruby-2.3.0/lib/rubygems/installer.rb:10:in `<top (required)>' from /tmp/ruby-2.3.0/lib/rubygems/core_ext/kernel_require.rb:55:in `require' from /tmp/ruby-2.3.0/lib/rubygems/core_ext/kernel_require.rb:55:in `require' from ./tool/rbinstall.rb:657:in `<module:RbInstall>' from ./tool/rbinstall.rb:585:in `<main>' uncommon.mk:267: recipe for target 'do-install-nodoc' failed make: *** [do-install-nodoc] Error 1
It seems that OpenSSL::Digest
is defined by the builtin ext (in miniruby?!), which breaks the logic at:
DIGEST_ALGORITHM =
if defined?(OpenSSL::Digest) then
OpenSSL::Digest::SHA1
end
OpenSSL::Digest
is defined (because it has methods like digest
and hexdigest
) but not OpenSSL::Digest::SHA1
.
Associated revisions
Fix defined? expressions
- lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM): should check same name as the used constants. [ruby-core:72674] [Bug #11940]
Fix defined? expressions
- lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM): should check same name as the used constants. [ruby-core:72674] [Bug #11940]
Fix defined? expressions
- lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM): should check same name as the used constants. [ruby-core:72674] [Bug #11940]
Fix defined? expressions
- lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM): should check same name as the used constants. [ruby-core:72674] [Bug #11940]
merge revision(s) 53419: [Backport #11940]
* lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM): should check same name as the used constants. [ruby-core:72674] [Bug #11940]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 53419: [Backport #11940]
* lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM): should check same name as the used constants. [ruby-core:72674] [Bug #11940]
History
Updated by nobu (Nobuyoshi Nakada) almost 4 years ago
- Description updated (diff)
- Status changed from Open to Third Party's Issue
Luiz Angelo Daros de Luca wrote:
It seems that
OpenSSL::Digest
is defined by the builtin ext (in miniruby?!),
It might be defined in rubygems/digest.rb
.
Updated by hsbt (Hiroshi SHIBATA) almost 4 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: REQUIRED
Updated by nagachika (Tomoyuki Chikanaga) over 3 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: REQUIRED to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: DONE
ruby_2_3 r54491 merged revision(s) 53419.
Fix defined? expressions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e