Bug 1300741 - asio-devel requires boost-devel and openssl-devel but does not need them
asio-devel requires boost-devel and openssl-devel but does not need them
Status: NEW
Product: Fedora
Classification: Fedora
Component: asio (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Marc Maurer
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-01-21 10:32 EST by Ryan Mulder
Modified: 2017-02-28 04:52 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ryan Mulder 2016-01-21 10:32:10 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):

Additional info:
Would you consider changing the Requres to some form of weak dependency?
Comment 1 Jan Kurik 2016-02-24 09:18:52 EST
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:
Comment 2 Jonathan Wakely 2016-11-18 14:41:40 EST
(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.
Comment 3 Ryan Mulder 2016-11-21 12:59:33 EST
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.
Comment 4 Jonathan Wakely 2016-11-22 08:19:24 EST
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.
Comment 5 Fedora End Of Life 2017-02-28 04:52:55 EST
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Note You need to log in before you can comment on or make changes to this bug.