mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-09 10:43:19 -05:00
Merge #19667: build: set minimum required Boost to 1.58.0
70452a070b
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: ACK70452a070b
-- patch looks correct laanwj: ACK70452a070b
hebasto: ACK70452a070b
, tested on Linux Mint 20 (x86_64). Tree-SHA512: d290415e3c70a394b3d7659c0480a35b4082bdce8d48b1c64a0025f7ad6e21567b4dc85813869513ad246d27f950706930410587c11c1aa3693ae6245084765c
This commit is contained in:
commit
82127d27c9
2 changed files with 4 additions and 65 deletions
67
configure.ac
67
configure.ac
|
@ -1180,9 +1180,9 @@ fi
|
||||||
if test x$use_boost = xyes; then
|
if test x$use_boost = xyes; then
|
||||||
|
|
||||||
dnl Minimum required Boost version
|
dnl Minimum required Boost version
|
||||||
define(MINIMUM_REQUIRED_BOOST, 1.47.0)
|
define(MINIMUM_REQUIRED_BOOST, 1.58.0)
|
||||||
|
|
||||||
dnl Check for boost libs
|
dnl Check for Boost libs
|
||||||
AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST])
|
AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST])
|
||||||
if test x$want_boost = xno; then
|
if test x$want_boost = xno; then
|
||||||
AC_MSG_ERROR([[only libbitcoinconsensus can be built without boost]])
|
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
|
||||||
m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro
|
m4_pattern_allow(DBOOST_AC_USE_STD_ATOMIC) dnl otherwise it's treated like a macro
|
||||||
BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS"
|
BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFLAGS"
|
||||||
|
|
||||||
if test x$use_reduce_exports = xyes; then
|
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
|
||||||
AC_MSG_CHECKING([for working boost reduced exports])
|
|
||||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
|
||||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
@%:@include <boost/version.hpp>
|
|
||||||
]], [[
|
|
||||||
#if BOOST_VERSION >= 104900
|
|
||||||
// Everything is okay
|
|
||||||
#else
|
|
||||||
# error Boost version is too old
|
|
||||||
#endif
|
|
||||||
]])],[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
],[
|
|
||||||
AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.])
|
|
||||||
])
|
|
||||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$use_reduce_exports = xyes; then
|
if test x$use_reduce_exports = xyes; then
|
||||||
|
@ -1231,7 +1213,6 @@ if test x$use_tests = xyes; then
|
||||||
AC_MSG_ERROR(hexdump is required for tests)
|
AC_MSG_ERROR(hexdump is required for tests)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test x$use_boost = xyes; then
|
if test x$use_boost = xyes; then
|
||||||
|
|
||||||
AX_BOOST_UNIT_TEST_FRAMEWORK
|
AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||||
|
@ -1257,48 +1238,6 @@ if test x$use_tests = xyes; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$use_boost = xyes; then
|
|
||||||
|
|
||||||
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
|
|
||||||
|
|
||||||
|
|
||||||
dnl If boost (prior to 1.57) was built without c++11, it emulated scoped enums
|
|
||||||
dnl using c++98 constructs. Unfortunately, this implementation detail leaked into
|
|
||||||
dnl the abi. This was fixed in 1.57.
|
|
||||||
|
|
||||||
dnl When building against that installed version using c++11, the headers pick up
|
|
||||||
dnl on the native c++11 scoped enum support and enable it, however it will fail to
|
|
||||||
dnl link. This can be worked around by disabling c++11 scoped enums if linking will
|
|
||||||
dnl fail.
|
|
||||||
dnl BOOST_NO_SCOPED_ENUMS was changed to BOOST_NO_CXX11_SCOPED_ENUMS in 1.51.
|
|
||||||
|
|
||||||
TEMP_LIBS="$LIBS"
|
|
||||||
LIBS="$BOOST_LIBS $LIBS"
|
|
||||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
|
||||||
AC_MSG_CHECKING([for mismatched boost c++11 scoped enums])
|
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
#include <boost/version.hpp>
|
|
||||||
#if !defined(BOOST_NO_SCOPED_ENUMS) && !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && BOOST_VERSION < 105700
|
|
||||||
#define BOOST_NO_SCOPED_ENUMS
|
|
||||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
|
||||||
#define CHECK
|
|
||||||
#endif
|
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
]],[[
|
|
||||||
#if defined(CHECK)
|
|
||||||
boost::filesystem::copy_file("foo", "bar");
|
|
||||||
#else
|
|
||||||
choke;
|
|
||||||
#endif
|
|
||||||
]])],
|
|
||||||
[AC_MSG_RESULT(mismatched); BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS"], [AC_MSG_RESULT(ok)])
|
|
||||||
LIBS="$TEMP_LIBS"
|
|
||||||
CPPFLAGS="$TEMP_CPPFLAGS"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl libevent check
|
dnl libevent check
|
||||||
|
|
||||||
if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnonononono; then
|
if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnonononono; then
|
||||||
|
|
|
@ -6,7 +6,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
|
||||||
| Dependency | Version used | Minimum required | CVEs | Shared | [Bundled Qt library](https://doc.qt.io/qt-5/configure-options.html#third-party-libraries) |
|
| Dependency | Version used | Minimum required | CVEs | Shared | [Bundled Qt library](https://doc.qt.io/qt-5/configure-options.html#third-party-libraries) |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| Berkeley DB | [4.8.30](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No | | |
|
| Berkeley DB | [4.8.30](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No | | |
|
||||||
| Boost | [1.70.0](https://www.boost.org/users/download/) | [1.47.0](https://github.com/bitcoin/bitcoin/pull/8920) | No | | |
|
| Boost | [1.70.0](https://www.boost.org/users/download/) | [1.58.0](https://github.com/bitcoin/bitcoin/pull/19667) | No | | |
|
||||||
| Clang | | [3.3+](https://releases.llvm.org/download.html) (C++11 support) | | | |
|
| Clang | | [3.3+](https://releases.llvm.org/download.html) (C++11 support) | | | |
|
||||||
| Expat | [2.2.7](https://libexpat.github.io/) | | No | Yes | |
|
| Expat | [2.2.7](https://libexpat.github.io/) | | No | Yes | |
|
||||||
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
|
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
|
||||||
|
|
Loading…
Add table
Reference in a new issue