0

I am compiling my c++ code by linking the openssl shared objects using cmake. I am getting below compilation issue.

In function boost::asio::ssl::context::context(boost::asio::ssl::context_base::method)':
/usr/include/boost/asio/ssl/impl/context.ipp:81: undefined reference to `SSLv2_method'
/usr/include/boost/asio/ssl/impl/context.ipp:84: undefined reference to `SSLv2_client_method'
/usr/include/boost/asio/ssl/impl/context.ipp:87: undefined reference to `SSLv2_server_method'

CMakeFile.txt

find_library(SSL_LIB libssl.so REQUIRED)
find_library(CRYPTO_LIB libcrypto.so REQUIRED)

target_link_libraries (rtcc
    ${RTCC_LIBS}
    ${Boost_LIBRARIES}
    ${SSL_LIB}
    ${CRYPTO_LIB}
)

Versions:

Boost : 1.54
*apt-cache policy openssl* gives
Openssl : Installed: 1.0.1f-1ubuntu2.19
ubuntu : 14.04

Could you please help me in resoving this issue.

jww
  • 97,681
  • 90
  • 411
  • 885
Tejaswi Burgula
  • 329
  • 3
  • 14
  • The Boost folks need to guard their use of SSLv2 and friends. They need to include ``, and only include SSLv2 gear ***if*** `OPENSSL_NO_SSL2` is *not* defined. Also see [Compile error in Boost.Asio with OPENSSL_NO_SSL2](http://svn.boost.org/trac/boost/ticket/5453) on Boost Bug Trac. You may want to file a bug report against Ubuntu and ask they pickup the changes from the Boost bug report. – jww Aug 03 '16 at 14:24
  • I have included the macro in /usr/include/boost/asio/ssl/impl/context.ipp file. Now could you please tell me how to compile this as well. And it should update my ssl so files also. – Tejaswi Burgula Aug 03 '16 at 15:31
  • See [Howto: Install Boost from source](https://ubuntuforums.org/showthread.php?t=1180792) on the Ubuntu forums. Or, ask a new questions with details like your modifications to Boost to overcome lack of SSLv2 methods. – jww Aug 03 '16 at 16:38

0 Answers0