[#44925] [Backport93 - Backport #5702][Open] backport r33935 — Yusuke Endoh <mame@...>

19 messages 2011/12/03

[#44940] Re: [ruby-cvs:41134] naruse:r33956 (trunk): Comment out tests which fails with GDBM-DBM compat mode. — Tanaka Akira <akr@...>

2011/12/6 <naruse@ruby-lang.org>:

9 messages 2011/12/05
[#44941] Re: [ruby-cvs:41134] naruse:r33956 (trunk): Comment out tests which fails with GDBM-DBM compat mode. — KOSAKI Motohiro <kosaki.motohiro@...> 2011/12/05

2011年12月5日16:56 Tanaka Akira <akr@fsij.org>:

[#44942] Re: [ruby-cvs:41134] naruse:r33956 (trunk): Comment out tests which fails with GDBM-DBM compat mode. — KOSAKI Motohiro <kosaki.motohiro@...> 2011/12/05

> おかしいな。gdbmは勝手にcreateフラグを立ててしまうので当該2つの

[#44985] [ruby-trunk - Bug #5757][Open] main threadがreadやselectで待っていると、^C でなかなか死なない — Yui NARUSE <naruse@...>

12 messages 2011/12/13

[#45021] [ruby-trunk - Bug #5786][Open] LoadError: cannot load such file -- openssl — Kazuhiro NISHIYAMA <redmine@...>

11 messages 2011/12/21

[#45057] [ruby-trunk - Feature #5820][Assigned] Merge Onigmo to Ruby 2.0 — Yui NARUSE <naruse@...>

21 messages 2011/12/28

[ruby-dev:45022] [ruby-trunk - Bug #5786] LoadError: cannot load such file -- openssl

From: Kazuhiro NISHIYAMA <redmine@...>
Date: 2011-12-21 15:32:19 UTC
List: ruby-dev #45022
Issue #5786 has been updated by Kazuhiro NISHIYAMA.


% git grep -n 'autoload.*openssl'        
lib/net/http.rb:24:autoload :OpenSSL, 'openssl'
%
で autoload が設定されていて、
lib/securerandom.rb:59:    if defined? OpenSSL::Random
の defined? で LoadError になってしまうのが原因のようです。
autoload と defined? の組み合わせは以下のようにバージョン毎に微妙に挙動が違うようです。

% cat /tmp/test.rb    
autoload :OpenSSL, 'openssl'
p defined?(OpenSSL)
p defined?(OpenSSL::Random)
% ./ruby -v /tmp/test.rb
ruby 1.8.7 (2011-12-10 patchlevel 356) [x86_64-linux]
"constant"
"constant"
% cd $(\ls -1d /home/chkbuild/tmp/build/ruby-1.9.2/*|tail -n1)/bin
% ./ruby -v /tmp/test.rb                                          
ruby 1.9.2p312 (2011-12-18 revision 34062) [x86_64-linux]
nil
nil
% cd $(\ls -1d /home/chkbuild/tmp/build/ruby-1.9.3/*|tail -n1)/bin
% ./ruby -v /tmp/test.rb                                          
ruby 1.9.3p6 (2011-12-20 revision 34080) [x86_64-linux]
"constant"
"constant"
% cd $(\ls -1d /home/chkbuild/tmp/build/ruby-trunk/*|tail -n1)/bin
% ./ruby -v /tmp/test.rb
ruby 2.0.0dev (2011-12-21 trunk 34088) [x86_64-linux]
"constant"
"constant"
%
----------------------------------------
Bug #5786: LoadError: cannot load such file -- openssl
https://bugs.ruby-lang.org/issues/5786

Author: Kazuhiro NISHIYAMA
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.0.0dev (2011-12-21 trunk 34091) [x86_64-linux]


openssl がビルドされていないと test-all で LoadError: cannot load such file -- openssl になっていくつかエラーになります。
途中で Ctrl+C で止めてしまっているのでもっと出るのかもしれません。

test_cgi_session_filestore(CGISessionTest):
LoadError: cannot load such file -- openssl
    .../ruby/lib/securerandom.rb:59:in `random_bytes'
    .../ruby/lib/securerandom.rb:140:in `hex'
    .../ruby/lib/cgi/session.rb:173:in `create_new_id'
    .../ruby/lib/cgi/session.rb:267:in `initialize'
    .../ruby/test/cgi/test_cgi_session.rb:33:in `new'
    .../ruby/test/cgi/test_cgi_session.rb:33:in `test_cgi_session_filestore'

  2) Error:
test_cgi_session_pstore(CGISessionTest):
LoadError: cannot load such file -- openssl
    .../ruby/lib/securerandom.rb:59:in `random_bytes'
    .../ruby/lib/securerandom.rb:140:in `hex'
    .../ruby/lib/cgi/session.rb:173:in `create_new_id'
    .../ruby/lib/cgi/session.rb:267:in `initialize'
    .../ruby/test/cgi/test_cgi_session.rb:71:in `new'
    .../ruby/test/cgi/test_cgi_session.rb:71:in `test_cgi_session_pstore'

  3) Error:
test_cgi_session_specify_session_key(CGISessionTest):
LoadError: cannot load such file -- openssl
    .../ruby/lib/securerandom.rb:59:in `random_bytes'
    .../ruby/lib/securerandom.rb:140:in `hex'
    .../ruby/lib/cgi/session.rb:173:in `create_new_id'
    .../ruby/lib/cgi/session.rb:267:in `initialize'
    .../ruby/test/cgi/test_cgi_session.rb:148:in `new'
    .../ruby/test/cgi/test_cgi_session.rb:148:in `test_cgi_session_specify_session_key'

  4) Error:
test_https_proxy_authentication(HTTPSProxyTest):
LoadError: cannot load such file -- openssl
    .../ruby/test/net/http/test_https_proxy.rb:16:in `block (2 levels) in test_https_proxy_authentication'

  5) Error:
test_ssl_socket_close_on_post_connection_check_fail(Net::TestSSLSocket):
LoadError: cannot load such file -- openssl
    .../ruby/lib/net/smtp.rb:197:in `default_ssl_context'
    .../ruby/lib/net/smtp.rb:345:in `enable_starttls_auto'
    .../ruby/test/net/smtp/test_ssl_socket.rb:51:in `test_ssl_socket_close_on_post_connection_check_fail'

  6) Error:
test_ssl_socket_open_on_post_connection_check_success(Net::TestSSLSocket):
LoadError: cannot load such file -- openssl
    .../ruby/lib/net/smtp.rb:197:in `default_ssl_context'
    .../ruby/lib/net/smtp.rb:345:in `enable_starttls_auto'
    .../ruby/test/net/smtp/test_ssl_socket.rb:67:in `test_ssl_socket_open_on_post_connection_check_success'


-- 
http://redmine.ruby-lang.org

In This Thread