Skip to main content

Sponsors

Compiling Ruby 1.9.1-p376 on Fedora 12

Posted in

Get the following errors while compiling Ruby 1.9.1-p376?

ossl_ssl.c: In function ‘ossl_sslctx_get_ciphers’:
ossl_ssl.c:626: error: ‘STACK’ undeclared (first use in this function)
ossl_ssl.c:626: error: (Each undeclared identifier is reported only once
ossl_ssl.c:626: error: for each function it appears in.)
ossl_ssl.c:626: error: expected expression before ‘)’ token
ossl_ssl.c:629: error: expected expression before ‘)’ token
ossl_ssl.c:629: error: too few arguments to function ‘sk_value’
ossl_ssl.c: In function ‘ossl_ssl_get_peer_cert_chain’:
ossl_ssl.c:1198: warning: passing argument 1 of ‘sk_num’ from incompatible pointer type
/usr/include/openssl/stack.h:79: note: expected ‘const struct _STACK *’ but argument is of type ‘struct stack_st_X509 *’
ossl_ssl.c:1201: warning: passing argument 1 of ‘sk_value’ from incompatible pointer type
/usr/include/openssl/stack.h:80: note: expected ‘const struct _STACK *’ but argument is of type ‘struct stack_st_X509 *’
ossl_ssl.c: In function ‘ossl_ssl_get_cipher’:
ossl_ssl.c:1223: warning: assignment discards qualifiers from pointer target type
make[1]: *** [ossl_ssl.o] Error 1

Try the patch in this post.

ruby-1.9.1-p376 $ tar zxf fix_stack_not_found.tgz
ruby-1.9.1-p376 $ cat fix_stack_not_found.patch | patch -p1
patching file ext/openssl/ossl.c
patching file ext/openssl/ossl_pkcs7.c
patching file ext/openssl/ossl_ssl.c

ruby-1.9.1-p376 $ make
...

The compilation is now able to complete. However, I didn't verify whether the SSL is working properly.

thanks, very helpful

thanks, very helpful

Helpful, however, I did not

Helpful, however, I did not find the patch file you are referring to here. Was the link removed?

It's at the bottom of the

It's at the bottom of the post. Here's the direct link.

http://myxman.org/dp/files/fix_stack_not_found.tgz

Nice Post, I was struggling

Nice Post,

I was struggling to install ruby 1.9.1 on my FC12, using RVM
The above patch worked like a charm.
Thanks xman, very helpful patch :)

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.