facebook / wangle

Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
Apache License 2.0
3.04k stars 536 forks source link

[Fedora] undefined reference to ssl #29

Closed petomalina closed 8 years ago

petomalina commented 8 years ago

I recently compiled the Wangle library without libatomic (as it errors on Fedora 23). I just tried to build server that is very close to echo example in the implementation. When trying to build, this is what happens:

usr/bin/ld: /usr/local/lib/libwangle.a(SSLSessionCacheManager.cpp.o): undefined reference to symbol 'SSL_CTX_get_ex_new_index@@libssl.so.10'
/usr/lib64/libssl.so.10: error adding symbols: DSO missing from command line

libssl can be found in the given directories. Is there a way to disable SSLSessionCacheManager? Am I missing any dependencies?

What I did:

anirudhvr commented 8 years ago

Sorry for the delay. Can you check your SSL version (usually just 'openssl version')? SSL_CTX_get_ex_new_index has been around at least since OpenSSL 1.0.1.

The 'DSO missing from command line' also may indicate a linking order in your build command. Can you confirm that the build command includes -L /path/to/libssl.so -lssl at the end (after the .o files).

petomalina commented 8 years ago

OpenSSL version: OpenSSL 1.0.2f-fips 28 Jan 2016

I will try the ssl link tomorrow, but I was using CMake tool and added the openssl. Not sure if the pure ssl was present.

anirudhvr commented 8 years ago

OpenSSL is just two libraries, libcrypto and libssl. It'd help if you can post the link command invocation that caused the failure (should be in some cmake log),

petomalina commented 8 years ago

Will look into this during the summer when I have enough time, thanks for the support :)

Closing for now.