mireo / async-mqtt5

A C++17 MQTT client based on Boost.Asio.
https://spacetime.mireo.com/async-mqtt5/
Boost Software License 1.0
154 stars 11 forks source link

undefined reference to `ERR_lib_error_string' #14

Closed slovak194 closed 2 months ago

slovak194 commented 2 months ago

Hi!

I was using v.1.0.1 and d52090f for some time with no issues. However, when I tried to run against master - the following linker error appeared:

in function `boost::asio::error::detail::ssl_category::message[abi:cxx11](int) const':
/usr/include/boost/asio/ssl/impl/error.ipp:39: undefined reference to `ERR_reason_error_string'
/usr/bin/ld: /usr/include/boost/asio/ssl/impl/error.ipp:42: undefined reference to `ERR_lib_error_string'

Boost: -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found suitable version "1.83.0", minimum required is "1.82")
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0") found components: system

Best regards, Alex

ksimicevic commented 2 months ago

Hi, Alex!

Apologies for the inconvenience.

It turns out that we unintentionally made the OpenSSL library a required dependency with commit 7bc1ccf072edd1c87e6c343383c27606d83e9be3, which caused linker errors when the library was not installed.

We have pushed a fix to master, making OpenSSL an optional dependency again. This should resolve the linker error you encountered.