Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rev 0.3.2 doesn't link against openssl 1.0.0 #3

Closed
graaff opened this issue Oct 3, 2010 · 6 comments
Closed

rev 0.3.2 doesn't link against openssl 1.0.0 #3

graaff opened this issue Oct 3, 2010 · 6 comments

Comments

@graaff
Copy link

graaff commented Oct 3, 2010

x86_64-pc-linux-gnu-gcc -shared -o rev_ext.so libev.o rev_ext.o rev_io_watcher.o rev_loop.o rev_ssl.o rev_stat_watcher.o rev_timer_watcher.o rev_utils.o rev_watcher.o -L. -L/usr/lib64 -Wl,-R/usr/lib64 -L. -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -Wl,-R -Wl,/usr/lib64 -L/usr/lib64 -lruby18 -lrt -lrt -ldl -lcrypt -lm -lc -lrt -lssl -lcrypto
rev_ssl.o: In function Rev_SSL_IO_ssl_setup': rev_ssl.c:(.text+0x508): undefined reference toossl_ssl_ex_ptr_idx'
rev_ssl.c:(.text+0x52b): undefined reference to ossl_ssl_ex_vcb_idx' rev_ssl.c:(.text+0x54e): undefined reference toossl_ssl_ex_client_cert_cb_idx'
rev_ssl.c:(.text+0x571): undefined reference to ossl_ssl_ex_tmp_dh_callback_idx' rev_ssl.c:(.text+0x592): undefined reference toossl_raise'
collect2: ld returned 1 exit status
make: *** [rev_ext.so] Error 1

@tarcieri
Copy link
Collaborator

tarcieri commented Oct 3, 2010

I've seen this issue reported once before and I haven't been able to reproduce it, even on the same Ruby versions.

Can you tell me what version of Ruby you were using and a little more about your environment?

@graaff
Copy link
Author

graaff commented Oct 17, 2010

Ah, I see what is going on here. On Gentoo we now have -Wl,--no-undefined in our standard ruby LDFLAGS, both for forward compatibility with ruby 1.9 and to let mix-and-match problems with our multiple supported ruby implementations fail early. This is what triggers the error, since the ossl_raise symbol (and the others) are unknown at link time but resolved at runtime by ruby loading openssl.so.

I can easily fix this on the Gentoo side for rev, but this may still be an issue for ruby 1.9 support. I'll leave the issue open if you want to investigate that, but feel free to close it.

@tarcieri
Copy link
Collaborator

On the Ruby 1.9 side, 1.9.2 has native support for non-blocking SSL. I'm afraid my hacks to support it on 1.8.x are brittle due to this problem, and I think the only solution is to discontinue support for SSL on 1.8.x.

@graaff
Copy link
Author

graaff commented Oct 24, 2010

I've added rev as a supported package in Gentoo so that we can work around our own --no-undefined feature for it. If people are running Gentoo and run into this issue then please tell them to install the Gentoo package instead.

@tarcieri
Copy link
Collaborator

I think the best solution may be to split off SSL support into its own gem. There's already the openssl-nonblock gem... I'd like to make a rev-ssl gem which uses this.

@tarcieri
Copy link
Collaborator

cool.io-ssl is now split off into its own gem

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants