Bug 2047853

Summary: boost: bad constants in ppc64le-specific code
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: boostAssignee: Jonathan Wakely <jwakely>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 36CC: dakingun, denis.arnaud_fedora, jwakely, mcermak, trodgers
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: boost-1.76.0-9.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-14 21:33:33 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:
Bug Depends On:    
Bug Blocks: 2046753    

Description Jerry James 2022-01-28 17:48:11 UTC
Description of problem:
The mp package failed the mass rebuild on ppc64le (see https://koji.fedoraproject.org/koji/buildinfo?buildID=1889533).  The build log indicates that bad constants in boost headers are to blame:

In file included from /usr/include/boost/numeric/interval/hw_rounding.hpp:27,
                 from /usr/include/boost/numeric/interval.hpp:18,
                 from /usr/include/gecode/float.hh:80,
                 from /usr/include/gecode/minimodel.hh:51,
                 from /usr/include/gecode/driver.hh:37,
                 from /builddir/build/BUILD/mp-7fd4828c934fccf7367499c9e01cc9a1e90a2093/solvers/gecode/gecode.h:33,
                 from /builddir/build/BUILD/mp-7fd4828c934fccf7367499c9e01cc9a1e90a2093/solvers/gecode/gecode.cc:23:
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:31:56: error: narrowing conversion of '18444492273895866370' from 'long long unsigned int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   31 | static const rounding_mode_struct mode_upward      = { 0xFFF8000000000002LL };
      |                                                        ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:32:56: error: narrowing conversion of '18444492273895866371' from 'long long unsigned int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   32 | static const rounding_mode_struct mode_downward    = { 0xFFF8000000000003LL };
      |                                                        ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:33:56: error: narrowing conversion of '18444492273895866368' from 'long long unsigned int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   33 | static const rounding_mode_struct mode_to_nearest  = { 0xFFF8000000000000LL };
      |                                                        ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/numeric/interval/detail/ppc_rounding_control.hpp:34:56: error: narrowing conversion of '18444492273895866369' from 'long long unsigned int' to 'boost::long_long_type' {aka 'long long int'} [-Wnarrowing]
   34 | static const rounding_mode_struct mode_toward_zero = { 0xFFF8000000000001LL };
      |                                                        ^~~~~~~~~~~~~~~~~~~~

Those constants should have a "ULL" suffix instead of "LL".


Version-Release number of selected component (if applicable):
boost-1.76.0-6.fc36

How reproducible:
Always

Steps to Reproduce:
1. Build the mp package in Rawhide for ppc64le

Actual results:
The errors shown above.

Expected results:
Good build.

Additional info:

Comment 1 Jonathan Wakely 2022-01-28 17:52:05 UTC
(In reply to Jerry James from comment #0)
> Those constants should have a "ULL" suffix instead of "LL".

No, they already have type unsigned long long, changing the prefix wouldn't alter that. The problem is that they are initializing objects of type long long.

Comment 2 Jonathan Wakely 2022-01-31 11:37:55 UTC
Fix proposed upstream: https://github.com/boostorg/interval/pull/30

Comment 3 Ben Cotton 2022-02-08 20:24:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 4 Jonathan Wakely 2022-07-14 21:33:33 UTC
Fixed by https://bodhi.fedoraproject.org/updates/FEDORA-2022-2682b8a02c