Bug 1421784

Summary: boost.asio tests fail other builds
Product: [Fedora] Fedora Reporter: Michael Cronenworth <mike>
Component: boostAssignee: Jonathan Wakely <jwakely>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dakingun, denis.arnaud_fedora, jwakely, me
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: boost-1.63.0-9.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-04 22:22:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Cronenworth 2017-02-13 16:31:40 UTC
Description of problem:
Boost 1.63 introduced some logic in Boost.asio that expects ERR_PACK, ERR_LIB_SSL, and SSL_R_SHORT_READ to be defined.

boost/asio/ssl/error.hpp lines 47-48
#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
  stream_truncated = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)

Since these are not defined by anything other libraries that pull in Boost, such as rb_libtorrent, fail to build. I expect that this #elfi block is not meant to be used in Fedora and it needs to be cleaned up.


rb_libtorrent build failure:
https://koji.fedoraproject.org/koji/buildinfo?buildID=855962

Comment 1 Jonathan Wakely 2017-02-13 16:36:10 UTC
I suspect those lines were meant to be used, but this is more fallout of the move from openssl 1.0.1 to 1.1.0 and the version check doesn't work with 1.0.1

Comment 2 Jonathan Wakely 2017-02-13 16:38:39 UTC
In F24:

# define OPENSSL_VERSION_NUMBER  0x100020bfL

In rawhide:

# define OPENSSL_VERSION_NUMBER  0x1010004fL

These are both less than 0x10100000L so the test passes in both cases. I think there are too many zeros in 0x10100000L. I'll fix it and report it upstream.

Comment 3 Jonathan Wakely 2017-02-13 16:40:19 UTC
Oops, no it isn't ... I can't count!

So something else is going on.

Comment 4 Jonathan Wakely 2017-02-13 16:42:02 UTC
Maybe OPENSSL_VERSION_NUMBER simply isn't defined at that point and so expands to 0, I'll check that.

Comment 5 Jonathan Wakely 2017-02-13 17:27:36 UTC
The problem is these lines in the rb_libtorrent test_ssl.cpp file:

#ifdef TORRENT_USE_OPENSSL
#include <boost/asio/ssl/error.hpp> // for asio::error::get_ssl_category()
#include <boost/asio/ssl.hpp>

This includes the definition of asio::error::get_ssl_category() before the OPENSSL_VERSION_NUMBER macro has been defined.

Reversing the order of those two includes (or simply removing the first one) fixes the build.

Comment 6 Jonathan Wakely 2017-02-13 17:36:02 UTC
I've reported this to https://github.com/chriskohlhoff/asio/issues/184

Comment 7 Jonathan Wakely 2017-02-18 11:25:20 UTC
rb_libtorrent is fixed. I'll keep this open until I hear from upstream about the header order dependency.

Comment 8 Fedora End Of Life 2017-02-28 11:16:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 9 Fedora Update System 2017-09-27 16:05:16 UTC
boost-1.63.0-9.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-87acef340c

Comment 10 Fedora Update System 2017-09-29 00:54:18 UTC
boost-1.63.0-9.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-87acef340c

Comment 11 Fedora Update System 2017-10-04 22:22:59 UTC
boost-1.63.0-9.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.