commit:     6343cf3dd0fcf9d341a4c3156589703a3da80d03
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Mon Apr 28 07:25:16 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 28 14:33:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6343cf3d

dev-libs/boost: fix network sandbox failure & more gcc-15 fallout

Fixes for some previosuly undetected test fallout:
- beast: delete a test that fails with network-sandbox
- bind: disable -Werror for gcc-15
- callable_traits: fails with gcc-15
- yap: add <cstdint> for gcc-15

Closes: https://bugs.gentoo.org/954810
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Part-of: https://github.com/gentoo/gentoo/pull/41818
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/boost/boost-1.88.0.ebuild                 |  8 ++++--
 .../files/boost-1.88.0-beast-network-sandbox.patch | 33 ++++++++++++++++++++++
 .../boost/files/boost-1.88.0-bind-no-Werror.patch  | 28 ++++++++++++++++++
 .../boost/files/boost-1.88.0-yap-cstdint.patch     | 22 +++++++++++++++
 4 files changed, 89 insertions(+), 2 deletions(-)

diff --git a/dev-libs/boost/boost-1.88.0.ebuild 
b/dev-libs/boost/boost-1.88.0.ebuild
index acab980f3296..0ac724b61c97 100644
--- a/dev-libs/boost/boost-1.88.0.ebuild
+++ b/dev-libs/boost/boost-1.88.0.ebuild
@@ -28,8 +28,7 @@ REQUIRED_USE="
        python? ( ${PYTHON_REQUIRED_USE} )
        test-full? ( test )
 "
-# Restricted for bug #954810 (network access), will be fixed shortly
-RESTRICT="!test? ( test ) test"
+RESTRICT="!test? ( test )"
 
 RDEPEND="
        bzip2? ( app-arch/bzip2:=[${MULTILIB_USEDEP}] )
@@ -50,6 +49,9 @@ PATCHES=(
        "${FILESDIR}"/${PN}-1.81.0-disable_icu_rpath.patch
        "${FILESDIR}"/${PN}-1.79.0-build-auto_index-tool.patch
        "${FILESDIR}"/${PN}-1.87.0-process-error-alpha.patch
+       "${FILESDIR}"/${PN}-1.88.0-beast-network-sandbox.patch
+       "${FILESDIR}"/${PN}-1.88.0-bind-no-Werror.patch
+       "${FILESDIR}"/${PN}-1.88.0-yap-cstdint.patch
 )
 
 create_user-config.jam() {
@@ -246,6 +248,8 @@ multilib_src_test() {
        local libs_excluded=(
                # fails to use std::reverse_copy
                "algorithm"
+               # is_invocable.cpp:35:58: error: static assertion failed: 
(std::is_invocable<Callable, Args...>() == 
boost::callable_traits::is_invocable<Callable, Args...>())
+               "callable_traits"
                # test output comparison failure
                "config"
                # "C++03 support was deprecated in Boost.Chrono 1.82" ??

diff --git a/dev-libs/boost/files/boost-1.88.0-beast-network-sandbox.patch 
b/dev-libs/boost/files/boost-1.88.0-beast-network-sandbox.patch
new file mode 100644
index 000000000000..4d42b8fea1ff
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.88.0-beast-network-sandbox.patch
@@ -0,0 +1,33 @@
+Delete a test case that tries to fail to connect to an
+unconnectable address, but instead fails because network-sandbox
+prevents the connection.
+
+Bug: https://bugs.gentoo.org/954810
+
+--- boost_1_88_0/libs/beast/test/beast/core/basic_stream.cpp~  2025-04-03 
13:37:23.000000000 +0200
++++ boost_1_88_0/libs/beast/test/beast/core/basic_stream.cpp   2025-04-27 
22:42:50.705597311 +0200
+@@ -1014,24 +1014,6 @@ public:
+         //
+ 
+         {
+-            // normal timeout
+-            // Requires timeout happen before ECONNREFUSED 
+-            stream_type s(ioc);
+-            auto const ep = net::ip::tcp::endpoint(
+-            #if 1
+-                // This address _should_ be unconnectible
+-                net::ip::make_address("72.5.65.111"), 1);
+-            #else
+-                // On Travis ECONNREFUSED happens before the timeout
+-                net::ip::make_address("127.0.0.1"), 1);
+-            #endif
+-            s.expires_after(std::chrono::seconds(0));
+-            s.async_connect(ep, connect_handler{error::timeout});
+-            ioc.run_for(std::chrono::seconds(1));
+-            ioc.restart();
+-        }
+-
+-        {
+             // stream destroyed
+             {
+                 stream_type s(ioc);

diff --git a/dev-libs/boost/files/boost-1.88.0-bind-no-Werror.patch 
b/dev-libs/boost/files/boost-1.88.0-bind-no-Werror.patch
new file mode 100644
index 000000000000..2ebd7e402630
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.88.0-bind-no-Werror.patch
@@ -0,0 +1,28 @@
+Prevent test failure due to:
+
+bind_dm3_test.cpp: In function 'int main()':
+bind_dm3_test.cpp:39:17: error: possibly dangling reference to a temporary 
[-Werror=dangling-reference]
+   39 |     int const & x = boost::bind( &pair_type::first, _1 )( pair );
+      |                 ^
+bind_dm3_test.cpp:39:32: note: 'boost::_bi::bind_t<const int&, 
boost::_mfi::dm<int, std::pair<int, int> >, boost::_bi::list<boost::arg<1> > >' 
temporary created here
+   39 |     int const & x = boost::bind( &pair_type::first, _1 )( pair );
+      |                     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
+cc1plus: all warnings being treated as errors
+
+This was seemingly fixed before in commit:
+https://github.com/boostorg/bind/commit/8729fbdbfa124291612bc011a7d639d8701de0c2
+but either it was not fixed properly or regressed in gcc-15.
+
+Bug: https://bugs.gentoo.org/954810
+
+--- boost_1_88_0/libs/bind/test/Jamfile.v2~    2025-04-03 13:37:23.000000000 
+0200
++++ boost_1_88_0/libs/bind/test/Jamfile.v2     2025-04-28 01:23:11.942535523 
+0200
+@@ -19,7 +19,7 @@ project
+   : requirements
+ 
+     <toolset>msvc:<warnings-as-errors>on
+-    <toolset>gcc:<warnings-as-errors>on
++    <toolset>gcc:<warnings-as-errors>off
+     <toolset>clang:<warnings-as-errors>on
+ 
+     <toolset>gcc:<cxxflags>$(gcc-flags)

diff --git a/dev-libs/boost/files/boost-1.88.0-yap-cstdint.patch 
b/dev-libs/boost/files/boost-1.88.0-yap-cstdint.patch
new file mode 100644
index 000000000000..c7602f411043
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.88.0-yap-cstdint.patch
@@ -0,0 +1,22 @@
+Building tests with gcc-15 fails with:
+
+operators_unary.cpp: In function 'int main()':
+operators_unary.cpp:30:14: error: 'uint32_t' was not declared in this scope
+   30 |         term<uint32_t> x{{2u}};
+      |              ^~~~~~~~
+
+Bug: https://bugs.gentoo.org/954810
+
+diff --git boost_1_88_0/libs/yap/test/operators_unary.cpp~ 
boost_1_88_0/libs/yap/test/operators_unary.cpp
+index c65aead..25a6b2f 100644
+--- boost_1_88_0/libs/yap/test/operators_unary.cpp~
++++ boost_1_88_0/libs/yap/test/operators_unary.cpp
+@@ -8,7 +8,7 @@
+ #include <boost/core/lightweight_test.hpp>
+ 
+ #include <sstream>
+-
++#include <cstdint>
+ 
+ template<typename T>
+ using term = boost::yap::terminal<boost::yap::expression, T>;

Reply via email to