Can't compile CentOS 5, Ruby 1.9.2 and OpenSSL 1.0.0c

Posted by pstinnett on Server Fault See other posts from Server Fault or by pstinnett
Published on 2011-02-25T16:25:42Z Indexed on 2012/04/01 5:31 UTC
Read the original article Hit count: 666

Filed under:
|
|
|

I'm trying to install Ruby 1.9.2 on CentOS 5.5. I get through most of the make process, but when it tries to compile OpenSSL I get an error. Below is the errror outputted:

compiling openssl
make[1]: Entering directory `/sources/ruby-1.9.2-p136/ext/openssl'
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -o ossl_x509.o -c ossl_x509.c
In file included from ossl.h:201,
                 from ossl_x509.c:11:
openssl_missing.h:71: error: conflicting types for ‘HMAC_CTX_copy’
/usr/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’
/usr/include/openssl/evp.h:459: error: previous declaration of ‘EVP_CIPHER_CTX_copy’ was here
make[1]: *** [ossl_x509.o] Error 1
make[1]: Leaving directory `/sources/ruby-1.9.2-p136/ext/openssl'
make: *** [mkmain.sh] Error 1

Any help would be greatly appreciated! I'm not a master at Linux by any means, but I was able to successfully install this version of Ruby on our dev server. Our live server is running a newer version of OpenSSL which I'm assuming is why it's breaking. Just not sure what the fix is!

© Server Fault or respective owner

Related posts about centos

Related posts about ruby-on-rails