Skip to content

Commit 9e32adb

Browse files
committed
Merge bitcoin#24523: build: Fix Boost.Process test for Boost 1.78
532c64a build: Fix Boost.Process test for Boost 1.78 (Hennadii Stepanov) Pull request description: Rebased bitcoin#24415 with Luke's suggestion. Fixes bitcoin#24413. ACKs for top commit: hebasto: ACK 532c64a, tested on Mac mini (M1, 2020) + macOS Monterey 12.3 (21E230). Tree-SHA512: 74f779695f6bbc45a2b7341a1402f747cc0d433d74825c7196cb9f156db0c0299895365f01665bd0bff12a8ebb5ea33a29b9a52f5eac0007ec35d1dca6544705
2 parents 565aac2 + 532c64a commit 9e32adb

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

configure.ac

+5
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,10 @@ if test "$use_external_signer" != "no"; then
14541454
;;
14551455
*)
14561456
AC_MSG_CHECKING([whether Boost.Process can be used])
1457+
TEMP_CXXFLAGS="$CXXFLAGS"
1458+
dnl Boost 1.78 requires the following workaround.
1459+
dnl See: https://github.com/boostorg/process/issues/235
1460+
CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
14571461
TEMP_CPPFLAGS="$CPPFLAGS"
14581462
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
14591463
TEMP_LDFLAGS="$LDFLAGS"
@@ -1464,6 +1468,7 @@ if test "$use_external_signer" != "no"; then
14641468
[have_boost_process="no"])
14651469
LDFLAGS="$TEMP_LDFLAGS"
14661470
CPPFLAGS="$TEMP_CPPFLAGS"
1471+
CXXFLAGS="$TEMP_CXXFLAGS"
14671472
AC_MSG_RESULT([$have_boost_process])
14681473
if test "$have_boost_process" = "yes"; then
14691474
use_external_signer="yes"

src/test/system_tests.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,16 @@
1212
// For details see https://github.com/bitcoin/bitcoin/pull/22348.
1313
#define __kernel_entry
1414
#endif
15+
#if defined(__GNUC__)
16+
// Boost 1.78 requires the following workaround.
17+
// See: https://github.com/boostorg/process/issues/235
18+
#pragma GCC diagnostic push
19+
#pragma GCC diagnostic ignored "-Wnarrowing"
20+
#endif
1521
#include <boost/process.hpp>
22+
#if defined(__GNUC__)
23+
#pragma GCC diagnostic pop
24+
#endif
1625
#endif // ENABLE_EXTERNAL_SIGNER
1726

1827
#include <boost/test/unit_test.hpp>

src/util/system.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66
#include <util/system.h>
77

88
#ifdef ENABLE_EXTERNAL_SIGNER
9+
#if defined(__GNUC__)
10+
// Boost 1.78 requires the following workaround.
11+
// See: https://github.com/boostorg/process/issues/235
12+
#pragma GCC diagnostic push
13+
#pragma GCC diagnostic ignored "-Wnarrowing"
14+
#endif
915
#include <boost/process.hpp>
16+
#if defined(__GNUC__)
17+
#pragma GCC diagnostic pop
18+
#endif
1019
#endif // ENABLE_EXTERNAL_SIGNER
1120

1221
#include <chainparamsbase.h>

0 commit comments

Comments
 (0)