conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
958 stars 1.76k forks source link

[package] boost/1.83.0: missing openssl requirement #21658

Open JonathanGirardeau opened 11 months ago

JonathanGirardeau commented 11 months ago

Description

When I include boost/asio/ssl.hpp I get a build issue: include/boost/asio/ssl/detail/openssl_types.hpp:23:10: fatal error: openssl/conf.h: No such file or directory I think the openssl requirement should be added in boost recipe with transitive_headers=True.

Package and Environment Details

Conan profile

[settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=17 compiler.libcxx=libstdc++11 compiler.version=9 os=Linux

Steps to reproduce

conan build .

Logs

Click to expand log ``` In file included from /home/developer/.conan2/p/boost644a10592370a/p/include/boost/asio/ssl/context_base.hpp:19, from /home/developer/.conan2/p/boost644a10592370a/p/include/boost/asio/ssl/context.hpp:23, from /home/developer/.conan2/p/boost644a10592370a/p/include/boost/asio/ssl.hpp:18, ... /home/developer/.conan2/p/boost644a10592370a/p/include/boost/asio/ssl/detail/openssl_types.hpp:23:10: fatal error: openssl/conf.h: No such file or directory 23 | #include | ^~~~~~~~~~~~~~~~ compilation terminated. ```
Nekto89 commented 11 months ago

does official boost installation provide separate component for asio?

Nekto89 commented 11 months ago

I've checked https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake and "Prebuilt windows binaries". Asio doesn't have separate component and there is no mentioning of OpenSSL in cmake files at all. Asio headers are part of official target "Boost::headers". OpenSSL is optional dependency of asio - not every user of "Boost::headers" needs it.

JonathanGirardeau commented 10 months ago

Hi @Nekto89, thanks for checking. Do you think an option like with_openssl (=False by default) should be added in boost recipe to add the optional openssl requirement or do you think it is the consumer recipe that need to add openssl requirement ?