Red Hat Bugzilla – Bug 1300741
asio-devel requires boost-devel and openssl-devel but does not need them
Last modified: 2017-02-28 04:52:55 EST
Description of problem:
asio-devel Requires boost-devel, but according to asio's website:
"Asio can be used independently of Boost by defining ASIO_STANDALONE when you compile."
I use asio-devel with the ASIO_STANDALONE configuration, and it works quite well.
Similarly, openssl is only required if using asio's ssl features, otherwise it is unnecessary:
So far, I only use asio without openssl.
Version-Release number of selected component (if applicable):
Would you consider changing the Requres to some form of weak dependency?
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.
More information and reason for this action is here:
(Changing version back to rawhide, since this isn't something that should be changed on a stable release.)
AFAICT the default configuration tries to use openssl if available, so requiring it is correct. We could potentially have separate asio-with-ssl and asio-without-ssl packages, but simply providing a more feature-complete package seems preferable.
> So far, I only use asio without openssl.
What about other users?
Just because you *can* build it without SSL support doesn't mean it's more useful. (Although it's worth noting that the version of openssl in rawhide prevents building asio, see Bug 1396638, so disabling it would solve that!)
Removing the boost dependency might make sense now that the version of G++ in Fedora defaults to C++14, the features that Asio uses from Boost have replacements in the C++ standard library. Boost.DateTime seems to be an exception, parts of Asio such as basic_deadline_timer appear to depend on Boost and are disabled without it, although there's a steady_timer alternative based on std::chrono.
Thanks for taking a look at this, Jonathan. I appreciate your time.
> What about other users?
You're right that the package needs to be usable by everyone, so it should be feature-complete.
I failed to mention in my problem description that the asio-devel package is header only. There are no compiled libraries released in the rpm (file list here: http://koji.fedoraproject.org/koji/rpminfo?rpmID=8074845).
So, because there are only headers deployed, every user must choose the preprocessor definitions that they want to build with. That allows me to opt-out of boost and openssl, and allows others to opt-in.
Therefore, it is unnecessary to require the installation of the openssl and boost devel packages when installing the asio-devel package. Could the "Requires:" statements in the spec file be changed to "Recommends:" or "Suggests:" to more accurately reflect that these are optional dependencies?
I did notice in the build log that the example and test code is compiled during the rpm build: https://kojipkgs.fedoraproject.org//packages/asio/1.10.7/1.fc26/data/logs/x86_64/build.log So, the "BuildRequires:" for openssl-devel and boost-devel still makes sense.
Aha, since I saw the asio package failing to build against an updated boost package I assumed there was a binary component. It must have been only the examples and tests failing.
In that case I agree that Requires seems wrong.
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.