Compiling openssl with ruby on windows
I am trying to compile openssl with my ruby config on a windows computer with MingW.
I am running ruby 1.9.2rc2 with these commands:
$ ruby extconf.rb --with-openssl-dir=/c/openssl
...
...
...
=== Checking done. ===
creating extconf.h
creating Makefile
Done.
That works without any errors.
When I try to make
:
$ make
gcc -I. -Ic:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/c/Ruby192/include/ruby-1
.9.1/ruby/backward -I/c/Ruby192/include/ruby-1.9.1 -I. -DRUBY_EXTCONF_H=\"extcon
f.h\" -Ic:/openssl/include -O3 -g -Wall -Wno-unused-parameter -Wno-parenthese
s -Wpointer-arith -Wwrite-strings -Wno-long-long -o openssl_missing.o -c openss
l_missing.c
In file included from openssl_missing.c:22:
openssl_missing.h:71: error: conflicting types for 'HMAC_CTX_copy'
c:/openssl/include/openssl/hmac.h:102: error: previous declaration of 'HMAC_CTX_
copy' was here
openssl_missing.h:71: error: conflicting types for 'HMAC_CTX_copy'
c:/openssl/include/openssl/hmac.h:102: error: previous declaration of 'HMAC_CTX_
copy' was here
openssl_missing.h:95: error: conflicting types for 'EVP_CIPHER_CTX_copy'
c:/openssl/include/openssl/evp.h:459: error: previous de开发者_Go百科claration of 'EVP_CIPHER
_CTX_copy' was here
openssl_missing.h:95: error: conflicting types for 'EVP_CIPHER_CTX_copy'
c:/openssl/include/openssl/evp.h:459: error: previous declaration of 'EVP_CIPHER
_CTX_copy' was here
make: *** [openssl_missing.o] Error 1
Here I get some errors. I do see what the error is saying but I can't understand it or solve it.
Can I ask you why are you trying to compile the openssl extension?
It is part of Ruby itself, and using the right OpenSSL version it should compile properly.
Hint from the directories you're working, seems you're using RubyInstaller based installers, or maybe trying to work from scratch?
If is from scratch, I would suggest you look into RubyInstaller project which provides a repository of compilation recipes located on GitHub:
http://github.com/oneclick/rubyinstaller/
Hope that helps.
精彩评论