public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-core/files/, net-p2p/bitcoin-core/
Date: Thu,  8 Aug 2024 11:08:26 +0000 (UTC)	[thread overview]
Message-ID: <1723115272.045c6968dbaa67827b95a371e125c78ceebd1b12.sam@gentoo> (raw)

commit:     045c6968dbaa67827b95a371e125c78ceebd1b12
Author:     Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name>
AuthorDate: Thu Aug  8 08:06:53 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug  8 11:07:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=045c6968

net-p2p/bitcoin-core: patch for GCC 15 compatibility

Closes: https://bugs.gentoo.org/937531
Signed-off-by: Matt Whitlock <gentoo <AT> mattwhitlock.name>
Closes: https://github.com/gentoo/gentoo/pull/38015
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild |  1 +
 net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild    |  1 +
 net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild |  1 +
 net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild    |  1 +
 net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild    |  1 +
 net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild    |  2 +
 net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild    |  2 +
 net-p2p/bitcoin-core/files/25.0-gcc15.patch      | 37 ++++++++++++++
 net-p2p/bitcoin-core/files/27.0-gcc15.patch      | 61 ++++++++++++++++++++++++
 9 files changed, 107 insertions(+)

diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild
index 52a3f31055e3..775041e6ebdd 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild
@@ -95,6 +95,7 @@ DOCS=(
 
 PATCHES=(
 	"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+	"${FILESDIR}/25.0-gcc15.patch"
 	"${FILESDIR}/25.0-syslibs.patch"
 	"${FILESDIR}/init.patch"
 )

diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild
index d3b23526e37c..a5bf6b1f0433 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild
@@ -96,6 +96,7 @@ DOCS=(
 
 PATCHES=(
 	"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+	"${FILESDIR}/25.0-gcc15.patch"
 	"${FILESDIR}/25.0-syslibs.patch"
 	"${FILESDIR}/init.patch"
 )

diff --git a/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild
index 27e0238e5b62..c89c35852110 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild
@@ -95,6 +95,7 @@ DOCS=(
 
 PATCHES=(
 	"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+	"${FILESDIR}/25.0-gcc15.patch"
 	"${FILESDIR}/26.0-syslibs.patch"
 	"${FILESDIR}/26.0-init.patch"
 )

diff --git a/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild
index 5327852ba303..f134e690a97a 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild
@@ -96,6 +96,7 @@ DOCS=(
 
 PATCHES=(
 	"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+	"${FILESDIR}/25.0-gcc15.patch"
 	"${FILESDIR}/26.0-syslibs.patch"
 	"${FILESDIR}/26.0-init.patch"
 )

diff --git a/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild
index 8c33bb9af0a7..96303f672e91 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild
@@ -94,6 +94,7 @@ DOCS=(
 )
 
 PATCHES=(
+	"${FILESDIR}/25.0-gcc15.patch"
 	"${FILESDIR}/26.0-syslibs.patch"
 	"${FILESDIR}/26.0-init.patch"
 )

diff --git a/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild b/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild
index f35da4dc4869..d29c9e015a1c 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild
@@ -96,6 +96,8 @@ DOCS=(
 
 PATCHES=(
 	"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+	"${FILESDIR}/25.0-gcc15.patch"
+	"${FILESDIR}/27.0-gcc15.patch"
 	"${FILESDIR}/27.0-syslibs.patch"
 	"${FILESDIR}/26.0-init.patch"
 )

diff --git a/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild
index 9ee8d0810153..019dc6f4fbf1 100644
--- a/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild
+++ b/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild
@@ -96,6 +96,8 @@ DOCS=(
 
 PATCHES=(
 	"${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch"
+	"${FILESDIR}/25.0-gcc15.patch"
+	"${FILESDIR}/27.0-gcc15.patch"
 	"${FILESDIR}/27.0-syslibs.patch"
 	"${FILESDIR}/26.0-init.patch"
 )

diff --git a/net-p2p/bitcoin-core/files/25.0-gcc15.patch b/net-p2p/bitcoin-core/files/25.0-gcc15.patch
new file mode 100644
index 000000000000..f63b23a8a3e3
--- /dev/null
+++ b/net-p2p/bitcoin-core/files/25.0-gcc15.patch
@@ -0,0 +1,37 @@
+From 74eebed6491d38d9c076bebc99d073cdd129003a Mon Sep 17 00:00:00 2001
+From: Matt Whitlock <bitcoin@mattwhitlock.name>
+Date: Wed, 7 Aug 2024 22:04:40 -0400
+Subject: [PATCH] add missing #include <cstdint> for GCC 15
+
+---
+ src/chainparamsbase.h   | 1 +
+ src/node/interface_ui.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
+index d593cff722..09751b12b9 100644
+--- a/src/chainparamsbase.h
++++ b/src/chainparamsbase.h
+@@ -5,6 +5,7 @@
+ #ifndef BITCOIN_CHAINPARAMSBASE_H
+ #define BITCOIN_CHAINPARAMSBASE_H
+ 
++#include <cstdint>
+ #include <memory>
+ #include <string>
+ 
+diff --git a/src/node/interface_ui.h b/src/node/interface_ui.h
+index 22c241cb78..f0c804b7cf 100644
+--- a/src/node/interface_ui.h
++++ b/src/node/interface_ui.h
+@@ -6,6 +6,7 @@
+ #ifndef BITCOIN_NODE_INTERFACE_UI_H
+ #define BITCOIN_NODE_INTERFACE_UI_H
+ 
++#include <cstdint>
+ #include <functional>
+ #include <memory>
+ #include <string>
+-- 
+2.45.2
+

diff --git a/net-p2p/bitcoin-core/files/27.0-gcc15.patch b/net-p2p/bitcoin-core/files/27.0-gcc15.patch
new file mode 100644
index 000000000000..ab6c3df388fa
--- /dev/null
+++ b/net-p2p/bitcoin-core/files/27.0-gcc15.patch
@@ -0,0 +1,61 @@
+From e866aecd9b5697aee1291bc4daf48d09824804d4 Mon Sep 17 00:00:00 2001
+From: Matt Whitlock <bitcoin@mattwhitlock.name>
+Date: Wed, 7 Aug 2024 21:14:28 -0400
+Subject: [PATCH] policy/feerate.h: avoid constraint self-dependency
+
+In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/format:48,
+                 from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/chrono_io.h:39,
+                 from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/chrono:3362,
+                 from ./util/time.h:9,
+                 from ./primitives/block.h:12,
+                 from ./blockencodings.h:8,
+                 from blockencodings.cpp:5:
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits: In substitution of 'template<class _Up>  requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, const _Up&>) && (__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<CFeeRate>::optional(const std::optional<_Tp>&) [with _Up = CFeeRate]':
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:1140:25:   required by substitution of 'template<class _Tp, class ... _Args> using std::__is_constructible_impl = std::__bool_constant<__is_constructible(_Tp, _Args ...)> [with _Tp = CFeeRate; _Args = {std::optional<CFeeRate>&}]'
+ 1140 |       = __bool_constant<__is_constructible(_Tp, _Args...)>;
+      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:1145:12:   required from 'struct std::is_constructible<CFeeRate, std::optional<CFeeRate>&>'
+ 1145 |     struct is_constructible
+      |            ^~~~~~~~~~~~~~~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:178:35:   required by substitution of 'template<class ... _Bn> std::__detail::__first_t<std::integral_constant<bool, false>, typename std::enable_if<(!(bool)(_Bn::value)), void>::type ...> std::__detail::__or_fn(int) [with _Bn = {std::is_constructible<CFeeRate, std::optional<CFeeRate>&>, std::is_convertible<std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, std::optional<CFeeRate> >, std::is_convertible<std::optional<CFeeRate>, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate>&>, std::is_convertible<const std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate> >, std::is_convertible<const std::optional<CFeeRate>, CFeeRate>}]'
+  178 |                                      __enable_if_t<!bool(_Bn::value)>...>;
+      |                                                               ^~~~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:196:41:   required from 'struct std::__or_<std::is_constructible<CFeeRate, std::optional<CFeeRate>&>, std::is_convertible<std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, std::optional<CFeeRate> >, std::is_convertible<std::optional<CFeeRate>, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate>&>, std::is_convertible<const std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate> >, std::is_convertible<const std::optional<CFeeRate>, CFeeRate> >'
+  196 |     : decltype(__detail::__or_fn<_Bn...>(0))
+      |                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:824:45:   required from 'constexpr const bool std::optional<CFeeRate>::__construct_from_contained_value<CFeeRate, CFeeRate>'
+  824 |           = !__converts_from_optional<_Tp, _From>::value;
+      |                                                    ^~~~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:884:7:   required by substitution of 'template<class _Up>  requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, const _Up&>) && (__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<CFeeRate>::optional(const std::optional<_Tp>&) [with _Up = CFeeRate]'
+  884 |           && __construct_from_contained_value<_Up>
+      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+./validation.h:164:41:   required from here
+  164 |         return MempoolAcceptResult(state);
+      |                                         ^
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:886:2:   required by the constraints of 'template<class _Tp> template<class _Up>  requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, const _Up&>) && (__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<_Tp>::optional(const std::optional<_From>&)'
+/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:884:14: error: satisfaction of atomic constraint '__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type> [with _Tp = _Tp; _Up = _Up]' depends on itself
+  884 |           && __construct_from_contained_value<_Up>
+      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---
+ src/policy/feerate.h | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/policy/feerate.h b/src/policy/feerate.h
+index 2e50172914..63ddf6827d 100644
+--- a/src/policy/feerate.h
++++ b/src/policy/feerate.h
+@@ -38,10 +38,8 @@ private:
+ public:
+     /** Fee rate of 0 satoshis per kvB */
+     CFeeRate() : nSatoshisPerK(0) { }
+-    template<typename I>
++    template<std::integral I>
+     explicit CFeeRate(const I _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) {
+-        // We've previously had bugs creep in from silent double->int conversion...
+-        static_assert(std::is_integral<I>::value, "CFeeRate should be used without floats");
+     }
+ 
+     /**
+-- 
+2.45.2
+


             reply	other threads:[~2024-08-08 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 11:08 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-02  5:06 [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoin-core/files/, net-p2p/bitcoin-core/ Sam James
2025-03-20  0:06 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1723115272.045c6968dbaa67827b95a371e125c78ceebd1b12.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox