ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:20502] [Bug #863] Openssl issues with fresh compile on Ubuntu
@ 2008-12-12 16:38 Brian Takita
  2008-12-12 17:30 ` [ruby-core:20503] " Brian Candler
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Brian Takita @ 2008-12-12 16:38 UTC (permalink / raw
  To: ruby-core

Bug #863: Openssl issues with fresh compile on Ubuntu
http://redmine.ruby-lang.org/issues/show/863

Author: Brian Takita
Status: Open, Priority: Normal

To reprodule I,
* uncommented openssl in ext/Setup
* ./configure
* make
* make install

Openssl compiled successfully. However when I run irb, I get the following error.

uninitialized constant OpenSSL::SSL::VERIFY_PEER in ssl.rb


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:20503] [Bug #863] Openssl issues with fresh compile on Ubuntu
  2008-12-12 16:38 [ruby-core:20502] [Bug #863] Openssl issues with fresh compile on Ubuntu Brian Takita
@ 2008-12-12 17:30 ` Brian Candler
  2008-12-12 19:35 ` [ruby-core:20507] " Brian Candler
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Brian Candler @ 2008-12-12 17:30 UTC (permalink / raw
  To: ruby-core

Issue #863 has been updated by Brian Candler.


Which Ruby? Which Ubuntu? Which OpenSSL?

I had no problems building ruby-1.9.1 preview1 and preview2 under Ubuntu Hardy with stock openssl (0.9.8g-4ubuntu3.3)

I also didn't have to hack ext/Setup. I just did ./configure --program-suffix=19

$ irb19
irb(main):001:0> require 'openssl'
=> true
irb(main):002:0> OpenSSL::SSL::VERIFY_PEER
=> 1
irb(main):003:0> 

Did you remember to install the libssl-dev package first?

What does ext/openssl/mkmf.log show?

----------------------------------------
http://redmine.ruby-lang.org/issues/show/863

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:20507] [Bug #863] Openssl issues with fresh compile on Ubuntu
  2008-12-12 16:38 [ruby-core:20502] [Bug #863] Openssl issues with fresh compile on Ubuntu Brian Takita
  2008-12-12 17:30 ` [ruby-core:20503] " Brian Candler
@ 2008-12-12 19:35 ` Brian Candler
  2009-04-02  9:11 ` [ruby-core:23108] " Chad Woolley
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Brian Candler @ 2008-12-12 19:35 UTC (permalink / raw
  To: ruby-core

Issue #863 has been updated by Brian Candler.


And I've also just got the same successful result with ruby-1.8.7-p72 on the same platform.

./configure --program-suffix=187
make
sudo mv /usr/local/lib/ruby /usr/local/lib/rubyxx
sudo make install

$ irb187
irb(main):001:0> RUBY_VERSION
=> "1.8.7"
irb(main):002:0> require 'openssl'
=> true
irb(main):003:0> OpenSSL::SSL::VERIFY_PEER
=> 1

(I'm not sure if there is a clean way to install 1.8.7 alongside 1.8.6. I see ./configure --help shows how to relocate the vendor_ruby and site_ruby directories, but I can't see the same for RUBY_LIB)

----------------------------------------
http://redmine.ruby-lang.org/issues/show/863

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:23108] [Bug #863] Openssl issues with fresh compile on Ubuntu
  2008-12-12 16:38 [ruby-core:20502] [Bug #863] Openssl issues with fresh compile on Ubuntu Brian Takita
  2008-12-12 17:30 ` [ruby-core:20503] " Brian Candler
  2008-12-12 19:35 ` [ruby-core:20507] " Brian Candler
@ 2009-04-02  9:11 ` Chad Woolley
  2009-05-07  4:46 ` [ruby-core:23376] " Chad Woolley
  2009-05-07  6:04 ` [ruby-core:23381] " Nobuyoshi Nakada
  4 siblings, 0 replies; 11+ messages in thread
From: Chad Woolley @ 2009-04-02  9:11 UTC (permalink / raw
  To: ruby-core

Issue #863 has been updated by Chad Woolley.


I got the same thing:

/usr/local/lib/ruby/1.8/openssl/ssl.rb:26: uninitialized constant OpenSSL::SSL::VERIFY_PEER (NameError)
	from /usr/local/lib/ruby/1.8/openssl.rb:23:in `require'
	from /usr/local/lib/ruby/1.8/openssl.rb:23


Here's my info:

user@user-desktop:~/install/ruby/ruby-1.8.7-p72/ext/openssl$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
user@user-desktop:~/install/ruby/ruby-1.8.7-p72/ext/openssl$ cat /etc/issue
Ubuntu jaunty (development branch) \n \l

user@user-desktop:~/install/ruby/ruby-1.8.7-p72/ext/openssl$ dpkg -l | grep openssl
ii  openssl                                   0.9.8g-15ubuntu3                      Secure Socket Layer (SSL) binary and related
ii  openssl-blacklist                         0.4.2                                 list of blacklisted OpenSSL RSA keys



I don't have ext/openssl/mkmf.log - I did, but then I did a clean recompile and it is not there anymore.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/863

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:23376] [Bug #863] Openssl issues with fresh compile on Ubuntu
  2008-12-12 16:38 [ruby-core:20502] [Bug #863] Openssl issues with fresh compile on Ubuntu Brian Takita
                   ` (2 preceding siblings ...)
  2009-04-02  9:11 ` [ruby-core:23108] " Chad Woolley
@ 2009-05-07  4:46 ` Chad Woolley
  2009-05-07  6:04 ` [ruby-core:23381] " Nobuyoshi Nakada
  4 siblings, 0 replies; 11+ messages in thread
From: Chad Woolley @ 2009-05-07  4:46 UTC (permalink / raw
  To: ruby-core

Issue #863 has been updated by Chad Woolley.

File mkmf.log added

I just got this again on a new Ubuntu 8.10 install.  I'm attaching the mkmf.log this time.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/863

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:23381] Re: [Bug #863] Openssl issues with fresh compile on Ubuntu
  2008-12-12 16:38 [ruby-core:20502] [Bug #863] Openssl issues with fresh compile on Ubuntu Brian Takita
                   ` (3 preceding siblings ...)
  2009-05-07  4:46 ` [ruby-core:23376] " Chad Woolley
@ 2009-05-07  6:04 ` Nobuyoshi Nakada
  2009-05-07  7:11   ` [ruby-core:23383] " Chad Woolley
  4 siblings, 1 reply; 11+ messages in thread
From: Nobuyoshi Nakada @ 2009-05-07  6:04 UTC (permalink / raw
  To: ruby-core

Hi,

At Sat, 13 Dec 2008 01:38:09 +0900,
Brian Takita wrote in [ruby-core:20502]:
> Openssl compiled successfully. However when I run irb, I get the following error.
> 
> uninitialized constant OpenSSL::SSL::VERIFY_PEER in ssl.rb

How do you reproduce it?

$ ruby18 -ropenssl -e 'p OpenSSL::SSL::VERIFY_PEER'
1

$ ruby18 -ropenssl.so -e 'p OpenSSL::SSL::VERIFY_PEER'
/opt/local/lib/ruby/1.8/openssl/ssl.rb:26: uninitialized constant OpenSSL::SSL::VERIFY_PEER (NameError)
	from /opt/local/lib/ruby/1.8/openssl.rb:23:in `require'
	from /opt/local/lib/ruby/1.8/openssl.rb:23

If this is the case, why do you require the extension only, but
not the script?

-- 
Nobu Nakada

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:23383] [Bug #863] Openssl issues with fresh compile on Ubuntu
  2009-05-07  6:04 ` [ruby-core:23381] " Nobuyoshi Nakada
@ 2009-05-07  7:11   ` Chad Woolley
  2009-05-07  7:41     ` [ruby-core:23384] " Yukihiro Matsumoto
  0 siblings, 1 reply; 11+ messages in thread
From: Chad Woolley @ 2009-05-07  7:11 UTC (permalink / raw
  To: ruby-core

Issue #863 has been updated by Chad Woolley.


Your first command fails for me:

$ /usr/local/lib/ruby1.8.7/bin/ruby1.8.7 -ropenssl -e 'p OpenSSL::SSL::VERIFY_PEER'
/usr/local/lib/ruby1.8.7/lib/ruby/1.8/openssl/ssl.rb:26: uninitialized constant OpenSSL::SSL::VERIFY_PEER (NameError)
	from /usr/local/lib/ruby1.8.7/lib/ruby/1.8/openssl.rb:23:in `require'
	from /usr/local/lib/ruby1.8.7/lib/ruby/1.8/openssl.rb:23
----------------------------------------
http://redmine.ruby-lang.org/issues/show/863

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:23384] Re: [Bug #863] Openssl issues with fresh compile on Ubuntu
  2009-05-07  7:11   ` [ruby-core:23383] " Chad Woolley
@ 2009-05-07  7:41     ` Yukihiro Matsumoto
  2009-05-09 21:38       ` [ruby-core:23411] " Chad Woolley
  0 siblings, 1 reply; 11+ messages in thread
From: Yukihiro Matsumoto @ 2009-05-07  7:41 UTC (permalink / raw
  To: ruby-core

Hi,

In message "Re: [ruby-core:23383] [Bug #863] Openssl issues with fresh compile on Ubuntu"
    on Thu, 7 May 2009 16:11:58 +0900, Chad Woolley <redmine@ruby-lang.org> writes:

|Your first command fails for me:
|
|$ /usr/local/lib/ruby1.8.7/bin/ruby1.8.7 -ropenssl -e 'p OpenSSL::SSL::VERIFY_PEER'
|/usr/local/lib/ruby1.8.7/lib/ruby/1.8/openssl/ssl.rb:26: uninitialized constant OpenSSL::SSL::VERIFY_PEER (NameError)
|	from /usr/local/lib/ruby1.8.7/lib/ruby/1.8/openssl.rb:23:in `require'
|	from /usr/local/lib/ruby1.8.7/lib/ruby/1.8/openssl.rb:23

It's caused by recursive require.  There must be TRUE reason behind
why recursive require happens, e.g. RUBYOPT environment variable, but
the following patch stops recursive calls.  Could you see if the patch
works?

							matz.

diff --git a/ext/openssl/ossl_digest.c b/ext/openssl/ossl_digest.c
index 5bb55af..eac6541 100644
--- a/ext/openssl/ossl_digest.c
+++ b/ext/openssl/ossl_digest.c
@@ -233,7 +233,6 @@ ossl_digest_block_length(VALUE self)
 void
 Init_ossl_digest()
 {
-    rb_require("openssl");
     rb_require("digest");
 
 #if 0 /* let rdoc know about mOSSL */

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [ruby-core:23411] [Bug #863] Openssl issues with fresh compile on Ubuntu
  2009-05-07  7:41     ` [ruby-core:23384] " Yukihiro Matsumoto
@ 2009-05-09 21:38       ` Chad Woolley
  2009-05-11  0:37         ` [ruby-core:23420] " Yukihiro Matsumoto
  0 siblings, 1 reply; 11+ messages in thread
From: Chad Woolley @ 2009-05-09 21:38 UTC (permalink / raw
  To: ruby-core

Issue #863 has been updated by Chad Woolley.


Yes!  This patch does seem to fix it.  Thanks, Matz...
----------------------------------------
http://redmine.ruby-lang.org/issues/show/863

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:23420] Re: [Bug #863] Openssl issues with fresh compile on Ubuntu
  2009-05-09 21:38       ` [ruby-core:23411] " Chad Woolley
@ 2009-05-11  0:37         ` Yukihiro Matsumoto
  2009-05-18 14:07           ` [ruby-core:23495] " Roger Pack
  0 siblings, 1 reply; 11+ messages in thread
From: Yukihiro Matsumoto @ 2009-05-11  0:37 UTC (permalink / raw
  To: ruby-core

Hi,

In message "Re: [ruby-core:23411] [Bug #863] Openssl issues with fresh compile on Ubuntu"
    on Sun, 10 May 2009 06:38:17 +0900, Chad Woolley <redmine@ruby-lang.org> writes:

|Yes!  This patch does seem to fix it.  Thanks, Matz...

Hmm, still something is wrong though.  I don't know why openssl.so is
required firsthand.  Anyway, I will check in the patch.

							matz.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ruby-core:23495] [Bug #863] Openssl issues with fresh compile on Ubuntu
  2009-05-11  0:37         ` [ruby-core:23420] " Yukihiro Matsumoto
@ 2009-05-18 14:07           ` Roger Pack
  0 siblings, 0 replies; 11+ messages in thread
From: Roger Pack @ 2009-05-18 14:07 UTC (permalink / raw
  To: ruby-core

Issue #863 has been updated by Roger Pack.


I would double check it but 1.8.7 from source gives me:

make[1]: Entering directory `/free_space/rdp/downloads/ruby_1_8_svn/ext/thread'
gcc -I. -I../.. -I../../. -I../.././ext/thread -D_FILE_OFFSET_BITS=64  -DUSE_MEM_POOLS -fPIC -O2 -g -Wall -Wno-parentheses  -fPIC  -c thread.c
thread.c: In function ‘unlock_mutex_inner’:
thread.c:485: error: ‘list’ undeclared (first use in this function)
thread.c:485: error: (Each undeclared identifier is reported only once
thread.c:485: error: for each function it appears in.)
make[1]: *** [thread.o] Error 1
make[1]: Leaving directory `/free_space/rdp/downloads/ruby_1_8_svn/ext/thread'
make: *** [mkmain.sh] Error 1

:)
-=r

----------------------------------------
http://redmine.ruby-lang.org/issues/show/863

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-05-18 14:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-12 16:38 [ruby-core:20502] [Bug #863] Openssl issues with fresh compile on Ubuntu Brian Takita
2008-12-12 17:30 ` [ruby-core:20503] " Brian Candler
2008-12-12 19:35 ` [ruby-core:20507] " Brian Candler
2009-04-02  9:11 ` [ruby-core:23108] " Chad Woolley
2009-05-07  4:46 ` [ruby-core:23376] " Chad Woolley
2009-05-07  6:04 ` [ruby-core:23381] " Nobuyoshi Nakada
2009-05-07  7:11   ` [ruby-core:23383] " Chad Woolley
2009-05-07  7:41     ` [ruby-core:23384] " Yukihiro Matsumoto
2009-05-09 21:38       ` [ruby-core:23411] " Chad Woolley
2009-05-11  0:37         ` [ruby-core:23420] " Yukihiro Matsumoto
2009-05-18 14:07           ` [ruby-core:23495] " Roger Pack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).