Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Michal Kolar
ec9cd8a4aa tests/boost-testsuite-sanity: adapt to rpm package > 4.18.91, use the proper rpm macro value to determine the required path 2024-06-07 20:32:13 +01:00
Jonathan Wakely
2ec8af445c Add patch to fix another test failure in Boost.Random. 2024-06-07 17:56:13 +01:00
Jonathan Wakely
6f35a0c6e4 Add missing Requires for rpminspect errors. 2024-06-07 13:25:38 +01:00
Kefu Chai
0276e583db Add patch for fixing a test failure in Boost.Random
the patch addresses a test failure in Boost.Random:
```
terminate called after throwing an instance of 'boost::wrapexcept<std::overflow_error>'
  what():  Error in function float_next<double>(double): Overflow Error
Running 21 test cases...
unknown location(0): fatal error: in "distributions_test<boost__random__piecewise_constant_distribution<boost__multiprecision__number<boost__multiprecision__backends__cpp_bin_float<100u_ (boost__multiprecision__backends__digit_base_type)10_ void_ int_ 0_ 0>_ (boost__multiprecision__expression_template_option)1>_ double>>": signal: SIGABRT (application abort requested)
multiprecision_float_test.cpp(115): last checkpoint
```

The backported patch is included by boost 1.84
See https://github.com/boostorg/random/pull/88

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2024-06-07 13:25:10 +01:00
Jonathan Wakely
aebf7af53e Remove dropped patches
These were dropped from the spec file but not removed from git.
2024-06-05 10:13:27 +01:00
Kefu Chai
ae5b7e3dd0 Add patch for addressing a Boost.Math bug
This change addresses the issue of
https://github.com/boostorg/math/issues/1132

the patch addresses the issue where float_next() and float_prior() return
a domain error instead +INF or -INF. this issue is a regression in
Boost 1.79.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit e13a584ab7)
2024-06-05 09:13:28 +08:00
Kefu Chai
31d7e54b1a Add patch for Boost.Accumulators bug
This change silences the warning when compiling Boost.accumulators
with GCC 13. as some projects using Boost.Accumulators are compiled
with -Werror. Without this change, these project would have to disable
-Wuninitialized warning or silence it temporarily when including
the offending headers. Neither of these two solution is ideal from
a developer's perspective. so let's apply the patch when packaging
Boost. The patch was included by Boost 1.83.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2023-08-22 11:01:36 +01:00
7 changed files with 262 additions and 102 deletions

View file

@ -1,27 +0,0 @@
From d1343f28dcbe25b100b082b34775bd92ead4602c Mon Sep 17 00:00:00 2001
From: jzmaddock <john@johnmaddock.co.uk>
Date: Tue, 25 Jan 2022 09:27:40 +0000
Subject: [PATCH] Update gcc Intel intrinsic usage config. Fixes
https://github.com/boostorg/multiprecision/issues/419.
---
include/boost/multiprecision/cpp_int/intel_intrinsics.hpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp b/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp
index eb4624bb4..37717cd51 100644
--- a/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp
+++ b/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp
@@ -19,7 +19,11 @@
// If this is GCC/clang, then check that the actual intrinsic exists:
//
#if defined(__has_builtin) && defined(__GNUC__)
-#if !__has_builtin(__builtin_ia32_addcarryx_u64) && defined(BOOST_MP_HAS_IMMINTRIN_H) && !(defined(BOOST_GCC) && (__GNUC__ >= 9))
+#if !__has_builtin(__builtin_ia32_addcarryx_u64) && defined(BOOST_MP_HAS_IMMINTRIN_H) \
+ && !(defined(BOOST_GCC) && (__GNUC__ >= 9) \
+ && (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64)\
+ || defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_AMD64) \
+ || defined(_M_X64) || defined(__amd64__) || defined(_M_X64)))
#undef BOOST_MP_HAS_IMMINTRIN_H
#endif
#elif defined(BOOST_MP_HAS_IMMINTRIN_H) && defined(__GNUC__) && !(defined(BOOST_GCC) && (__GNUC__ >= 9))

View file

@ -1,72 +0,0 @@
From 78fd284a42caabe8815cb0870b46e5567872e75b Mon Sep 17 00:00:00 2001
From: Dmitry <grisumbras@gmail.com>
Date: Sat, 11 Dec 2021 16:58:23 +0300
Subject: [PATCH] Don't skip install targets if there's <build>no in ureqs
(#113)
---
src/tools/stage.jam | 4 ++++
test/install_build_no.py | 26 ++++++++++++++++++++++++++
test/test_all.py | 1 +
3 files changed, 31 insertions(+)
create mode 100755 test/install_build_no.py
diff --git a/tools/build/src/tools/stage.jam b/tools/build/src/tools/stage.jam
index c5f02e3ba4..325129dc81 100644
--- a/tools/build/src/tools/stage.jam
+++ b/tools/build/src/tools/stage.jam
@@ -478,6 +478,10 @@ class install-target-class : basic-target
return [ sequence.unique $(result2) ] ;
}
+ rule skip-from-usage-requirements ( )
+ {
+ }
+
# Returns true iff 'type' is subtype of some element of 'types-to-include'.
#
local rule include-type ( type : types-to-include * )
diff --git a/tools/build/test/install_build_no.py b/tools/build/test/install_build_no.py
new file mode 100755
index 0000000000..0ccf3c5cc6
--- /dev/null
+++ b/tools/build/test/install_build_no.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+
+# Copyright 2021 Dmitry Arkhipov (grisumbras@gmail.com)
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
+
+# Check that <build>no in usage-requirements of dependencies does not affect
+# install rule, i.e. a skipped installed target does not affect insallation of
+# other targets.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("a.cpp", "int main() {}\n")
+
+t.write("jamroot.jam", """
+make x : : maker : <build>no ;
+exe a : a.cpp ;
+install install : x a ;
+""")
+
+t.run_build_system()
+t.expect_addition("install/a.exe")
+
+t.cleanup()
diff --git a/tools/build/test/test_all.py b/tools/build/test/test_all.py
index b7ef5ad701..9ed729d017 100644
--- a/tools/build/test/test_all.py
+++ b/tools/build/test/test_all.py
@@ -250,6 +250,7 @@ def reorder_tests(tests, first_test):
"inherit_toolset",
"inherited_dependency",
"inline",
+ "install_build_no",
"libjpeg",
"liblzma",
"libpng",

View file

@ -0,0 +1,41 @@
From ecdc3d41be93d994cf293b6ce08cc33cb9e39e71 Mon Sep 17 00:00:00 2001
From: Kefu Chai <tchaikov@gmail.com>
Date: Thu, 27 Apr 2023 13:09:28 +0800
Subject: [PATCH] always initialize member variable
in this change, impl::extended_p_square_quantile_impl::probability is
zero-initialized to silence -Wuninitialized warning from GCC-13.
despite that this variable is always initialized in
impl::extended_p_square_quantile_impl::result(), it is still referenced
by, for instance the copy constructor, which could be called before
`result()` gets called. and GCC-13 rightly warn us like:
In copy constructor constexpr boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>::extended_p_square_quantile_impl(const boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>&),
inlined from boost::accumulators::detail::accumulator_wrapper<Accumulator, Feature>::accumulator_wrapper(const boost::accumulators::detail::accumulator_wrapper<Accumulator, Feature>&) [with Accumulator = boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>; Feature = boost::accumulators::tag::extended_p_square_quantile_quadratic] at /usr/include/boost/accumulators/framework/depends_on.hpp:320:69,
inlined from constexpr boost::fusion::cons<Car, Cdr>::cons(typename boost::fusion::detail::call_param<Car>::type, typename boost::fusion::detail::call_param<Cdr>::type) [with Car = boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>, boost::accumulators::tag::extended_p_square_quantile_quadratic>; Cdr = boost::fusion::cons<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::sum_impl<double, boost::accumulators::tag::sample>, boost::accumulators::tag::sum>, boost::fusion::cons<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::mean_impl<double, boost::accumulators::tag::sum>, boost::accumulators::tag::mean>, boost::fusion::cons<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::max_impl<double>, boost::accumulators::tag::max>, boost::fusion::nil_> > >] at /usr/include/boost/fusion/container/list/cons.hpp:66:15,
inlined from static boost::accumulators::detail::build_acc_list<First, Last, false>::type boost::accumulators::detail::build_acc_list<First, Last, false>::call(const Args&, const First&, const Last&) [with Args = boost::parameter::aux::flat_like_arg_list<boost::parameter::aux::flat_like_arg_tuple<boost::accumulators::tag::accumulator, boost::parameter::aux::tagged_argument<boost::accumulators::tag::accumulator, boost::accumulators::accumulator_set<double, boost::accumulators::stats<boost::accumulators::tag::extended_p_square_quantile(boost::accumulators::quadratic), boost::accumulators::tag::mean, boost::accumulators::tag::max, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, void> >, std::integral_constant<bool, true> >, boost::parameter::aux::flat_like_arg_tuple<boost::accumulators::tag::extended_p_square_probabilities_<0>, boost::parameter::aux::tagged_argument<boost::accumulators::tag::extended_p_square_probabilities_<0>, std::array<double, 4> >, std::integral_constant<bool, true> > >; First = boost::fusion::mpl_iterator<boost::mpl::v_iter<boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::max_impl<double>, boost::accumulators::tag::max>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::mean_impl<double, boost::accumulators::tag::sum>, boost::accumulators::tag::mean>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::sum_impl<double, boost::accumulators::tag::sample>, boost::accumulators::tag::sum>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>, boost::accumulators::tag::extended_p_square_quantile_quadratic>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_impl<double>, boost::accumulators::tag::extended_p_square>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::count_impl, boost::accumulators::tag::count>, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, 2> >; Last = boost::fusion::mpl_iterator<boost::mpl::v_iter<boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::max_impl<double>, boost::accumulators::tag::max>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::mean_impl<double, boost::accumulators::tag::sum>, boost::accumulators::tag::mean>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::sum_impl<double, boost::accumulators::tag::sample>, boost::accumulators::tag::sum>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>, boost::accumulators::tag::extended_p_square_quantile_quadratic>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_impl<double>, boost::accumulators::tag::extended_p_square>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::count_impl, boost::accumulators::tag::count>, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, 6> >] at /usr/include/boost/accumulators/framework/depends_on.hpp:252:86,
inlined from static boost::accumulators::detail::build_acc_list<First, Last, false>::type boost::accumulators::detail::build_acc_list<First, Last, false>::call(const Args&, const First&, const Last&) [with Args = boost::parameter::aux::flat_like_arg_list<boost::parameter::aux::flat_like_arg_tuple<boost::accumulators::tag::accumulator, boost::parameter::aux::tagged_argument<boost::accumulators::tag::accumulator, boost::accumulators::accumulator_set<double, boost::accumulators::stats<boost::accumulators::tag::extended_p_square_quantile(boost::accumulators::quadratic), boost::accumulators::tag::mean, boost::accumulators::tag::max, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, void> >, std::integral_constant<bool, true> >, boost::parameter::aux::flat_like_arg_tuple<boost::accumulators::tag::extended_p_square_probabilities_<0>, boost::parameter::aux::tagged_argument<boost::accumulators::tag::extended_p_square_probabilities_<0>, std::array<double, 4> >, std::integral_constant<bool, true> > >; First = boost::fusion::mpl_iterator<boost::mpl::v_iter<boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::max_impl<double>, boost::accumulators::tag::max>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::mean_impl<double, boost::accumulators::tag::sum>, boost::accumulators::tag::mean>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::sum_impl<double, boost::accumulators::tag::sample>, boost::accumulators::tag::sum>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>, boost::accumulators::tag::extended_p_square_quantile_quadratic>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_impl<double>, boost::accumulators::tag::extended_p_square>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::count_impl, boost::accumulators::tag::count>, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, 1> >; Last = boost::fusion::mpl_iterator<boost::mpl::v_iter<boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::max_impl<double>, boost::accumulators::tag::max>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::mean_impl<double, boost::accumulators::tag::sum>, boost::accumulators::tag::mean>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::sum_impl<double, boost::accumulators::tag::sample>, boost::accumulators::tag::sum>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>, boost::accumulators::tag::extended_p_square_quantile_quadratic>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_impl<double>, boost::accumulators::tag::extended_p_square>, boost::mpl::v_item<boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::count_impl, boost::accumulators::tag::count>, boost::mpl::vector0<mpl_::na>, 0>, 0>, 0>, 0>, 0>, 0>, 6> >] at /usr/include/boost/accumulators/framework/depends_on.hpp:252:86:
/usr/include/boost/accumulators/statistics/extended_p_square_quantile.hpp:57:12: error: <unnamed>.boost::accumulators::detail::accumulator_wrapper<boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>, boost::accumulators::tag::extended_p_square_quantile_quadratic>::<unnamed>.boost::accumulators::impl::extended_p_square_quantile_impl<double, boost::accumulators::unweighted, boost::accumulators::quadratic>::probability is used uninitialized [-Werror=uninitialized]
57 | struct extended_p_square_quantile_impl
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
---
boost/accumulators/statistics/extended_p_square_quantile.hpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/boost/accumulators/statistics/extended_p_square_quantile.hpp b/boost/accumulators/statistics/extended_p_square_quantile.hpp
index f57304c..a4ac3cd 100644
--- a/boost/accumulators/statistics/extended_p_square_quantile.hpp
+++ b/boost/accumulators/statistics/extended_p_square_quantile.hpp
@@ -76,6 +76,7 @@ namespace impl
boost::begin(args[extended_p_square_probabilities])
, boost::end(args[extended_p_square_probabilities])
)
+ , probability()
{
}
--
2.39.2

View file

@ -0,0 +1,118 @@
From f3e0cde514e444c2e25a3522d05a6e244fb2f23a Mon Sep 17 00:00:00 2001
From: jzmaddock <john@johnmaddock.co.uk>
Date: Fri, 17 May 2024 19:17:04 +0100
Subject: [PATCH 1/2] Correct float_next(+INF) and float_prior(-INF) Fixes
https://github.com/boostorg/math/issues/1132
---
include/boost/math/special_functions/next.hpp | 32 ++++++++++++++-----
test/test_next.cpp | 11 +++++--
2 files changed, 32 insertions(+), 11 deletions(-)
diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp
index c696b97b5..02a208e4e 100644
--- a/boost/math/special_functions/next.hpp
+++ b/boost/math/special_functions/next.hpp
@@ -194,10 +194,14 @@ T float_next_imp(const T& val, const std::true_type&, const Policy& pol)
int fpclass = (boost::math::fpclassify)(val);
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ if (fpclass == (int)FP_INFINITE)
{
- if(val < 0)
+ if (val < 0)
return -tools::max_value<T>();
+ return val; // +INF
+ }
+ else if (fpclass == (int)FP_NAN)
+ {
return policies::raise_domain_error<T>(
function,
"Argument must be finite, but got %1%", val, pol);
@@ -243,10 +247,14 @@ T float_next_imp(const T& val, const std::false_type&, const Policy& pol)
int fpclass = (boost::math::fpclassify)(val);
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ if (fpclass == (int)FP_INFINITE)
{
- if(val < 0)
+ if (val < 0)
return -tools::max_value<T>();
+ return val; // +INF
+ }
+ else if (fpclass == (int)FP_NAN)
+ {
return policies::raise_domain_error<T>(
function,
"Argument must be finite, but got %1%", val, pol);
@@ -328,10 +336,14 @@ T float_prior_imp(const T& val, const std::true_type&, const Policy& pol)
int fpclass = (boost::math::fpclassify)(val);
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ if (fpclass == (int)FP_INFINITE)
{
- if(val > 0)
+ if (val > 0)
return tools::max_value<T>();
+ return val; // -INF
+ }
+ else if (fpclass == (int)FP_NAN)
+ {
return policies::raise_domain_error<T>(
function,
"Argument must be finite, but got %1%", val, pol);
@@ -378,10 +390,14 @@ T float_prior_imp(const T& val, const std::false_type&, const Policy& pol)
int fpclass = (boost::math::fpclassify)(val);
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ if (fpclass == (int)FP_INFINITE)
{
- if(val > 0)
+ if (val > 0)
return tools::max_value<T>();
+ return val; // -INF
+ }
+ else if (fpclass == (int)FP_NAN)
+ {
return policies::raise_domain_error<T>(
function,
"Argument must be finite, but got %1%", val, pol);
diff --git a/test/test_next.cpp b/test/test_next.cpp
index b4f05b437..8bb5f8d99 100644
--- a/libs/math/test/test_next.cpp
+++ b/libs/math/test/test_next.cpp
@@ -171,12 +171,12 @@ void test_values(const T& val, const char* name)
BOOST_CHECK_EQUAL(boost::math::float_advance(val, primes[i]), v1);
BOOST_CHECK_EQUAL(boost::math::float_advance(val, -primes[i]), v2);
}
- if(std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_infinity))
+ BOOST_IF_CONSTEXPR(std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_infinity))
{
BOOST_CHECK_EQUAL(boost::math::float_prior(std::numeric_limits<T>::infinity()), (std::numeric_limits<T>::max)());
BOOST_CHECK_EQUAL(boost::math::float_next(-std::numeric_limits<T>::infinity()), -(std::numeric_limits<T>::max)());
- BOOST_MATH_CHECK_THROW(boost::math::float_prior(-std::numeric_limits<T>::infinity()), std::domain_error);
- BOOST_MATH_CHECK_THROW(boost::math::float_next(std::numeric_limits<T>::infinity()), std::domain_error);
+ BOOST_CHECK_EQUAL(boost::math::float_prior(-std::numeric_limits<T>::infinity()), -std::numeric_limits<T>::infinity());
+ BOOST_CHECK_EQUAL(boost::math::float_next(std::numeric_limits<T>::infinity()), std::numeric_limits<T>::infinity());
if(boost::math::policies:: BOOST_MATH_OVERFLOW_ERROR_POLICY == boost::math::policies::throw_on_error)
{
BOOST_MATH_CHECK_THROW(boost::math::float_prior(-(std::numeric_limits<T>::max)()), std::overflow_error);
@@ -188,6 +188,11 @@ void test_values(const T& val, const char* name)
BOOST_CHECK_EQUAL(boost::math::float_next((std::numeric_limits<T>::max)()), std::numeric_limits<T>::infinity());
}
}
+ BOOST_IF_CONSTEXPR(std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_quiet_NaN))
+ {
+ BOOST_MATH_CHECK_THROW(boost::math::float_prior((std::numeric_limits<T>::quiet_NaN)()), std::domain_error);
+ BOOST_MATH_CHECK_THROW(boost::math::float_next((std::numeric_limits<T>::quiet_NaN)()), std::domain_error);
+ }
//
// We need to test float_distance over multiple orders of magnitude,
// the only way to get an accurate true result is to count the representations
--
2.45.1

View file

@ -0,0 +1,59 @@
From 4239d93dad32a11e4c3829050f8070d456266133 Mon Sep 17 00:00:00 2001
From: jzmaddock <john@johnmaddock.co.uk>
Date: Wed, 1 Jun 2022 19:35:36 +0100
Subject: [PATCH] Update multiprecision_float_test.cpp to not overflow type
double. Previously the max value for uint1024_t could just squeeze into a
double because truncation occurred during the conversion, now that cpp_int
performs correctly rounded conversions, overflow occurs, and the computation
fails. Changed the problem distribution to use a multiprecision weight type,
rather than double.
---
test/multiprecision_float_test.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/multiprecision_float_test.cpp b/test/multiprecision_float_test.cpp
index bc2a936..2b53483 100644
--- a/libs/random/test/multiprecision_float_test.cpp
+++ b/libs/random/test/multiprecision_float_test.cpp
@@ -77,7 +77,7 @@ typedef boost::mpl::list <
boost::random::lognormal_distribution<big_float>,
boost::random::normal_distribution<big_float>,
#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
- boost::random::piecewise_constant_distribution<big_float>,
+ boost::random::piecewise_constant_distribution<big_float, big_float>,
boost::random::piecewise_linear_distribution<big_float>,
#endif
boost::random::student_t_distribution<big_float>,
From 7561690135c67ecf88c2133bad7680ebd2665c36 Mon Sep 17 00:00:00 2001
From: jzmaddock <john@johnmaddock.co.uk>
Date: Wed, 1 Jun 2022 19:32:55 +0100
Subject: [PATCH] Update multiprecision_int_test.cpp to not accidentality
overflow type double. Multiprecision now performs correct rounding when
converting to double - previously the max value for uint1024_t would just fit
in a double if it was truncated. But now that it's correctly rounded it
overflows and breaks the calculation.
---
test/multiprecision_int_test.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/test/multiprecision_int_test.cpp b/test/multiprecision_int_test.cpp
index 41ec229b5..a861cca39 100644
--- a/libs/random/test/multiprecision_int_test.cpp
+++ b/libs/random/test/multiprecision_int_test.cpp
@@ -215,8 +215,11 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(discrete_distributions, distribution_type, other_d
distribution_type d2;
ss >> d2;
BOOST_CHECK(d == d2);
-
- boost::random::independent_bits_engine<boost::random::mt19937, std::numeric_limits<boost::multiprecision::uint1024_t>::digits, boost::multiprecision::uint1024_t > big_random;
+ //
+ // The number of digits in the independent_bits_engine must be low enough that we don't overflow
+ // when converting to a double (see other_distributions declared above).
+ //
+ boost::random::independent_bits_engine<boost::random::mt19937, std::numeric_limits<boost::multiprecision::uint1024_t>::digits - 2, boost::multiprecision::uint1024_t > big_random;
for(unsigned i = 0; i < 200; ++i)
{
result_type r = d(big_random);

View file

@ -42,7 +42,7 @@ Name: boost
%global real_name boost
Summary: The free peer-reviewed portable C++ source libraries
Version: 1.81.0
Release: 7%{?dist}
Release: 11%{?dist}
License: BSL-1.0 AND MIT AND Python-2.0.1
# Replace each . with _ in %%{version}
@ -152,6 +152,16 @@ Patch5: boost-1.76.0-fix-narrowing-conversions-for-ppc.patch
# https://github.com/boostorg/phoenix/issues/115
Patch6: boost-1.81-phoenix-multiple-defn.patch
# PR https://github.com/boostorg/accumulators/pull/54
Patch7: boost-1.81.0-always-initialize-member-variable.patch
# https://github.com/boostorg/math/commit/f3e0cde514e444c2e25a3522d05a6e244fb2f23a
# https://github.com/boostorg/math/issues/1132
Patch8: boost-1.83-math-Correct-float_next-INF-and-float_prior-INF.patch
# https://github.com/boostorg/random/pull/88
Patch9: boost-1.84-random-test-overflow.patch
%bcond_with tests
%bcond_with docs_generated
@ -216,6 +226,7 @@ provides a sort of cooperative multitasking on a single thread.
%package coroutine
Summary: Run-time component of boost coroutine library
Requires: %{name}-context%{?_isa} = %{version}-%{release}
%description coroutine
Run-time support for Boost.Coroutine, a library that provides
@ -235,6 +246,8 @@ on generic programming concepts.
%if %{with context}
%package fiber
Summary: Run-time component of boost fiber library
Requires: %{name}-context%{?_isa} = %{version}-%{release}
Requires: %{name}-filesystem%{?_isa} = %{version}-%{release}
%description fiber
@ -244,6 +257,7 @@ micro-/userland-threads (fibers) scheduled cooperatively.
%package filesystem
Summary: Run-time component of boost filesystem library
Requires: %{name}-atomic%{?_isa} = %{version}-%{release}
Requires: %{name}-system%{?_isa} = %{version}-%{release}
%description filesystem
@ -272,6 +286,7 @@ stream buffers and i/o filters.
%package json
Summary: Run-time component of boost json library
Requires: %{name}-container%{?_isa} = %{version}-%{release}
%description json
@ -292,6 +307,11 @@ handling tools.
%package log
Summary: Run-time component of boost logging library
Requires: %{name}-atomic%{?_isa} = %{version}-%{release}
Requires: %{name}-chrono%{?_isa} = %{version}-%{release}
Requires: %{name}-filesystem%{?_isa} = %{version}-%{release}
Requires: %{name}-regex%{?_isa} = %{version}-%{release}
Requires: %{name}-thread%{?_isa} = %{version}-%{release}
%description log
@ -424,6 +444,7 @@ with as little as one #include and one additional line of code.
Summary: Run-time component of boost type erasure library
Requires: %{name}-chrono%{?_isa} = %{version}-%{release}
Requires: %{name}-system%{?_isa} = %{version}-%{release}
Requires: %{name}-thread%{?_isa} = %{version}-%{release}
%description type_erasure
@ -1281,6 +1302,24 @@ fi
%{_mandir}/man1/b2.1*
%changelog
* Fri Jun 07 2024 Jonathan Wakely <jwakely@fedoraproject.org> - 1.81.0-11
- Add patch to fix another test failure in Boost.Random.
* Thu Jun 06 2024 Jonathan Wakely <jwakely@fedoraproject.org> - 1.81.0-10
- Add missing Requires for rpminspect errors.
* Fri Jun 07 2024 Kefu Chai <tchaikov@fedoraproject.org> - 1.81.0-10
- Add patch to fix test failure in Boost.Random.
* Sat May 25 2024 Kefu Chai <tchaikov@fedoraproject.org> - 1.81.0-9
- Add patch to fix Boost.Math bug where float_next(+INF) and float_prior(-INF)
returns NaN, but they should return +INF and -INF respectively.
See https://github.com/boostorg/math/issues/1132
* Sun Aug 20 2023 Kefu Chai <tchaikov@fedoraproject.org> - 1.81.0-8
- Add patch for Boost.Accumulators bug
See https://github.com/boostorg/accumulators/pull/54
* Wed Aug 2 2023 Tom Callaway <spot@fedoraproject.org> - 1.81.0-7
- add symlink for b2 files

View file

@ -54,9 +54,11 @@ rlJournalStart
rlPhaseStartSetup "build boost"
rlRun "rpm -D \"_topdir $TmpDir\" -U *.src.rpm"
rlRun "dnf builddep -y $TmpDir/SPECS/*.spec"
rlRun "sed -i -e 's/^%prep/%prep\n%dump/' $TmpDir/SPECS/*.spec"
rlRun "su -c 'rpmbuild -D \"_topdir $TmpDir\" -bp $TmpDir/SPECS/*.spec &>$TmpDir/rpmbuild.log' $BUILD_USER"
rlRun "rlFileSubmit $TmpDir/rpmbuild.log"
rlRun "cd $TmpDir/BUILD/boost*"
rlRun "toplev_dirname=`awk '/toplev_dirname/{print $3; exit}' $TmpDir/rpmbuild.log`"
rlRun "cd $TmpDir/BUILD/$toplev_dirname"
rlRun "su -c './bootstrap.sh &>$TmpDir/bootstrap.log' $BUILD_USER"
rlRun "rlFileSubmit $TmpDir/bootstrap.log"
rlPhaseEnd
@ -64,7 +66,7 @@ rlJournalStart
rlPhaseStartTest "run testsuite"
while read test_path; do
if [ -f $TmpDir/BUILD/boost*/libs/$test_path/test/Jamfile* ]; then
rlRun "cd $TmpDir/BUILD/boost*/libs/$test_path/test"
rlRun "cd $TmpDir/BUILD/$toplev_dirname/libs/$test_path/test"
rlRun "su -c '/usr/bin/b2 -d1 --build-dir=$TmpDir/test-build &>>$TmpDir/testsuite.log' $BUILD_USER"
rm -fr $TmpDir/test-build
else