Curt Hibbs wrote:
James Britt wrote:
Jamis Buck wrote:
James Britt wrote:
Has anyone gotten Net:SSH working with the 1-click version?
Well, I have, but only because I compiled the Ruby/OpenSSL module
myself. It relies on version 8 of the msvcrt dll, which you may or may
not have installed, but if you'd like I can send along (or post) the
binary version I created.
Thank you; I may take you up on the offer of the binary. I have
numerous copies of msvcrt.dll, though the latest seems to be version
6.something. Where does one get version 8?
I'd be most interested in understanding how to reproduce this myself, in
part because I know of people who are interested in using Ruby for
corporate admin tools, but problems with SSL on Windows hold them back.
I think the ideal situation would be to have the required DLL included
in the 1-click installer; maybe the next best thing is a set of clear
instructions on creating the DLL. And the a pre-compiled binary as a
fall back.
I'm planning to incloude OpenSSL in the next time I post a release of the
One-Click Installer. I haven't yet tried to build/integrate OpenSLL, so I
don't know if I'll run into any problems. But when I asked about this on
ruby-talk, the responses seem to indicate I should not have any problems.
Well, here's the process I went through to get this to work. (Disclaimers: I am NOT a windows developer, nor a windows user, so I may have made things much harder for me than they needed to be. Also, I do not have access to MSVC++, so I used the free commandline tools and the Windows XP SP2 SDK, freely available from MS.)
1) Install the OpenSSL binary for Windows (http://www.slproweb.com/products/Win32OpenSSL.html\) Per the instructions given at that site, I then copied the contents of the 'install' and 'lib/vc' subdirectories to the corresponding system directories (so that the headers and libs are accessible without having to set any INCLUDE or LIB environment variables).
2) Copy the 'ext/openssl' subdirectory from Ruby CVS.
3) I had to tweak mkmf.rb (apparently the version I had was older). I added "header=nil" as the third parameter to the "have_library" method, and passed 'header' as the third argument to #try_func in the same method.
4) I tweaked the ext/openssl/extconf.rb so that the calls to have_library passed "openssl/ssl.h" as the 'header' parameter. (Otherwise, the extconf.rb pass kept failing saying that the OpenSSL_add_all_digests function was not defined. Maybe there is a better way to do this--but I couldn't see any options to cl that said to allow calls to functions without explicit prototypes...)
5) Running extconf.rb worked, at this point, and I got a makefile.
6) Running nmake then built the library.
Quite possibly the problems I encountered had more to do with my ignorance of windows development than anything else, so it may be a much simpler process to build Ruby/OpenSSL under Windows for someone who knows what they are doing.
- Jamis
···
--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis