Skip to content

Commit d7efd31

Browse files
authored
Merge pull request ElementsProject#1400 from psgreco/master-fixbuild
Fix build in master with newer environments
2 parents 99c2ee7 + 04b114c commit d7efd31

File tree

12 files changed

+40
-5
lines changed

12 files changed

+40
-5
lines changed

.cirrus.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ task:
215215
env:
216216
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
217217
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
218+
MAKEJOBS: "-j2" # Avoid excessive memory use due to MSan
218219

219220
task:
220221
name: '[MSan, depends] [focal]'
@@ -224,7 +225,6 @@ task:
224225
env:
225226
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
226227
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
227-
MAKEJOBS: "-j4" # Avoid excessive memory use due to MSan
228228

229229
task:
230230
name: '[ASan + LSan + UBSan + integer, no depends] [jammy]'
@@ -236,7 +236,6 @@ task:
236236
env:
237237
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
238238
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
239-
MAKEJOBS: "-j4" # Avoid excessive memory use
240239

241240
task:
242241
name: '[fuzzer,address,undefined,integer, no depends] [jammy]'

configure.ac

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,13 +1458,21 @@ if test "$use_external_signer" != "no"; then
14581458
;;
14591459
*)
14601460
AC_MSG_CHECKING([whether Boost.Process can be used])
1461+
TEMP_CXXFLAGS="$CXXFLAGS"
1462+
dnl Boost 1.78 requires the following workaround.
1463+
dnl See: https://github.com/boostorg/process/issues/235
1464+
CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
1465+
TEMP_CPPFLAGS="$CPPFLAGS"
1466+
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
14611467
TEMP_LDFLAGS="$LDFLAGS"
14621468
dnl Boost 1.73 and older require the following workaround.
14631469
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
14641470
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
14651471
[have_boost_process="yes"],
14661472
[have_boost_process="no"])
14671473
LDFLAGS="$TEMP_LDFLAGS"
1474+
CPPFLAGS="$TEMP_CPPFLAGS"
1475+
CXXFLAGS="$TEMP_CXXFLAGS"
14681476
AC_MSG_RESULT([$have_boost_process])
14691477
if test "$have_boost_process" = "yes"; then
14701478
use_external_signer="yes"

src/chainparamsbase.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#ifndef BITCOIN_CHAINPARAMSBASE_H
66
#define BITCOIN_CHAINPARAMSBASE_H
77

8+
#include <cstdint>
89
#include <memory>
910
#include <string>
1011

src/node/ui_interface.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
#ifndef BITCOIN_NODE_UI_INTERFACE_H
77
#define BITCOIN_NODE_UI_INTERFACE_H
88

9+
#include <cstdint>
910
#include <functional>
10-
#include <memory>
1111
#include <string>
12+
#include <vector>
1213

1314
class CBlockIndex;
1415
enum class SynchronizationState;

src/support/lockedpool.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
#endif
2323

2424
#include <algorithm>
25+
#include <limits>
26+
#include <stdexcept>
27+
#include <utility>
2528
#ifdef ARENA_DEBUG
2629
#include <iomanip>
2730
#include <iostream>

src/support/lockedpool.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#ifndef BITCOIN_SUPPORT_LOCKEDPOOL_H
66
#define BITCOIN_SUPPORT_LOCKEDPOOL_H
77

8-
#include <stdint.h>
8+
#include <cstddef>
99
#include <list>
1010
#include <map>
11-
#include <mutex>
1211
#include <memory>
12+
#include <mutex>
1313
#include <unordered_map>
1414

1515
/**

src/test/system_tests.cpp

Lines changed: 9 additions & 0 deletions
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/bip32.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define BITCOIN_UTIL_BIP32_H
77

88
#include <attributes.h>
9+
#include <cstdint>
910
#include <string>
1011
#include <vector>
1112

src/util/string.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <algorithm>
1111
#include <array>
12+
#include <cstdint>
1213
#include <cstring>
1314
#include <locale>
1415
#include <sstream>

src/util/system.cpp

Lines changed: 9 additions & 0 deletions
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)