Skip to content

Commit 82127d2

Browse files
committed
Merge #19667: build: set minimum required Boost to 1.58.0
70452a0 build: set minimum required Boost to 1.58 (fanquake) Pull request description: Any systems which only have an older installable Boost can use depends. 1.58.0 retains compatibility with the packages [installable on Ubuntu 16.04](https://packages.ubuntu.com/xenial/libboost-dev). The projects usage of Boost wont be going away any time soon, if ever (i.e #15382), and our usage of the test framework. Fixes: #19506 ACKs for top commit: practicalswift: ACK 70452a0 -- patch looks correct laanwj: ACK 70452a0 hebasto: ACK 70452a0, tested on Linux Mint 20 (x86_64). Tree-SHA512: d290415e3c70a394b3d7659c0480a35b4082bdce8d48b1c64a0025f7ad6e21567b4dc85813869513ad246d27f950706930410587c11c1aa3693ae6245084765c
2 parents 19f812c + 70452a0 commit 82127d2

File tree

2 files changed

+4
-65
lines changed

2 files changed

+4
-65
lines changed

configure.ac

Lines changed: 3 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,9 +1180,9 @@ fi
11801180
if test x$use_boost = xyes; then
11811181

11821182
dnl Minimum required Boost version
1183-
define(MINIMUM_REQUIRED_BOOST, 1.47.0)
1183+
define(MINIMUM_REQUIRED_BOOST, 1.58.0)
11841184

1185-
dnl Check for boost libs
1185+
dnl Check for Boost libs
11861186
AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST])
11871187
if test x$want_boost = xno; then
11881188
AC_MSG_ERROR([[only libbitcoinconsensus can be built without boost]])
@@ -1199,25 +1199,7 @@ dnl counter implementations. In 1.63 and later the std::atomic approach is defau
11991199
m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro
12001200
BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS"
12011201

1202-
if test x$use_reduce_exports = xyes; then
1203-
AC_MSG_CHECKING([for working boost reduced exports])
1204-
TEMP_CPPFLAGS="$CPPFLAGS"
1205-
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
1206-
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
1207-
@%:@include <boost/version.hpp>
1208-
]], [[
1209-
#if BOOST_VERSION >= 104900
1210-
// Everything is okay
1211-
#else
1212-
# error Boost version is too old
1213-
#endif
1214-
]])],[
1215-
AC_MSG_RESULT(yes)
1216-
],[
1217-
AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.])
1218-
])
1219-
CPPFLAGS="$TEMP_CPPFLAGS"
1220-
fi
1202+
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
12211203
fi
12221204

12231205
if test x$use_reduce_exports = xyes; then
@@ -1231,7 +1213,6 @@ if test x$use_tests = xyes; then
12311213
AC_MSG_ERROR(hexdump is required for tests)
12321214
fi
12331215

1234-
12351216
if test x$use_boost = xyes; then
12361217

12371218
AX_BOOST_UNIT_TEST_FRAMEWORK
@@ -1257,48 +1238,6 @@ if test x$use_tests = xyes; then
12571238
fi
12581239
fi
12591240

1260-
if test x$use_boost = xyes; then
1261-
1262-
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
1263-
1264-
1265-
dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums
1266-
dnl using c++98 constructs. Unfortunately, this implementation detail leaked into
1267-
dnl the abi. This was fixed in 1.57.
1268-
1269-
dnl When building against that installed version using c++11, the headers pick up
1270-
dnl on the native c++11 scoped enum support and enable it, however it will fail to
1271-
dnl link. This can be worked around by disabling c++11 scoped enums if linking will
1272-
dnl fail.
1273-
dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51.
1274-
1275-
TEMP_LIBS="$LIBS"
1276-
LIBS="$BOOST_LIBS $LIBS"
1277-
TEMP_CPPFLAGS="$CPPFLAGS"
1278-
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
1279-
AC_MSG_CHECKING([for mismatched boost c++11 scoped enums])
1280-
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1281-
#include <boost/config.hpp>
1282-
#include <boost/version.hpp>
1283-
#if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700
1284-
#define BOOST_NO_SCOPED_ENUMS
1285-
#define BOOST_NO_CXX11_SCOPED_ENUMS
1286-
#define CHECK
1287-
#endif
1288-
#include <boost/filesystem.hpp>
1289-
]],[[
1290-
#if defined(CHECK)
1291-
boost::filesystem::copy_file("foo", "bar");
1292-
#else
1293-
choke;
1294-
#endif
1295-
]])],
1296-
[AC_MSG_RESULT(mismatched); BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"], [AC_MSG_RESULT(ok)])
1297-
LIBS="$TEMP_LIBS"
1298-
CPPFLAGS="$TEMP_CPPFLAGS"
1299-
1300-
fi
1301-
13021241
dnl libevent check
13031242

13041243
if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnonononono; then

doc/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
66
| Dependency | Version used | Minimum required | CVEs | Shared | [Bundled Qt library](https://doc.qt.io/qt-5/configure-options.html#third-party-libraries) |
77
| --- | --- | --- | --- | --- | --- |
88
| Berkeley DB | [4.8.30](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No | | |
9-
| Boost | [1.70.0](https://www.boost.org/users/download/) | [1.47.0](https://github.com/bitcoin/bitcoin/pull/8920) | No | | |
9+
| Boost | [1.70.0](https://www.boost.org/users/download/) | [1.58.0](https://github.com/bitcoin/bitcoin/pull/19667) | No | | |
1010
| Clang | | [3.3+](https://releases.llvm.org/download.html) (C++11 support) | | | |
1111
| Expat | [2.2.7](https://libexpat.github.io/) | | No | Yes | |
1212
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |

0 commit comments

Comments
 (0)