Ruby-1.8.7_p160 openssl編 その2

前回すったもんだしたopensslだが、気を取り直して本家から最新のソースコードをダウンロードしてビルドするとあっさりと何もなかったように終わった。

openssl-0.9.8k.tar.gz/ openssl Source, Tarballs

なのでこれを使って拡張ライブラリィを作る。

E:\ruby-1.8.7-p160\ext\openssl>ruby extconf.rb --with-winsock2 --with-openssl-lib=win32\lib --with-openssl-include=win32\include

=== OpenSSL for Ruby configurator ===
=== Checking for system dependent stuff... ===
checking for t_open() in nsl.lib... no
checking for socket() in socket.lib... no
checking for assert.h... yes
:
:
creating extconf.h
creating Makefile
Done.

E:\ruby-1.8.7-p160\ext\openssl>nmake

        cl -nologo -LD -Feopenssl.so openssl_missing.obj ossl.obj ossl_asn1.obj ossl_bio.obj ossl_bn.obj ossl_cipher.obj ossl_config.obj ossl_digest.obj ossl_engine.obj ossl_hmac.obj 
:
:
ws2_32.lib   -link -incremental:no -debug -opt:ref -opt:icf -dll -libpath:"." -libpath:"e:/ruby/lib" -libpath:"win32\lib"
 -implib:openssl-i386-mswin32_80.lib -pdb:openssl-i386-mswin32_80.pdb -def:openssl-i386-mswin32_80.def
   ライブラリ openssl-i386-mswin32_80.lib とオブジェクト openssl-i386-mswin32_80.exp を作成中
        mt -nologo -manifest openssl.so.manifest -outputresource:openssl.so;2
        
        
E:\ruby-1.8.7-p160\ext\openssl>nmake install

Microsoft(R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

install -c -p -m 0755 openssl.so e:\ruby\lib\ruby\site_ruby\1.8\i386-msvcr80
install -c -p -m 0644 .\lib\net\ftptls.rb e:\ruby\lib\ruby\site_ruby\1.8\net
:
:
install -c -p -m 0644 .\lib\openssl\ssl.rb e:\ruby\lib\ruby\site_ruby\1.8\openssl
install -c -p -m 0644 .\lib\openssl\x509.rb e:\ruby\lib\ruby\site_ruby\1.8\openssl
install -c -p -m 0644 .\lib\openssl.rb e:\ruby\lib\ruby\site_ruby\1.8

E:\ruby-1.8.7-p160\ext\openss

快調、快調。前回が嘘のようだ。

残念ながらtest_ssl.rbは同じように失敗したが、必要であればデバッグ情報を出力してコードを追うことにしよう。

それにしても、MakeFileの事を殆ど気にせずに済むRubyのextconfを使う仕組みは素晴らしいよな。