Merge bitcoin/bitcoin#24397: build: Fix Boost.Process check for Boost 1.73 and older
774323e378ci: Force `--enable-external-signer` to prevent future regressions (Hennadii Stepanov)69978858a4build: Fix Boost.Process check for Boost 1.73 and older (Hennadii Stepanov)2199ef79cbbuild: Fix a non-portable use of `test` (Hennadii Stepanov)d436c488d4build, refactor: Replace tabs with spaces (Hennadii Stepanov) Pull request description: On master (5f44c5c428) Boost.Process check false fails without the `-lpthread` flag. ``` $ grep -C 2 pthread_detach config.log /usr/bin/ld: /tmp/cczCQfQv.o: in function `boost::asio::detail::posix_global_impl<boost::asio::system_context>::~posix_global_impl()': conftest.cpp:(.text._ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED2Ev[_ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED5Ev]+0xa3): undefined reference to `pthread_join' /usr/bin/ld: conftest.cpp:(.text._ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED2Ev[_ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED5Ev]+0xc4): undefined reference to `pthread_detach' collect2: error: ld returned 1 exit status configure:26674: $? = 1 ``` Not required for Boost 1.74+. ACKs for top commit: laanwj: Code review ACK774323e378, is a bugfix/workaround, seems fine to merge last minute for 23.0. Tree-SHA512: 2a9d4b67fd8910e107af972d8c223286b7c933bc310616f86c8b6d8c903438916980fc76bd7e37f2698f6ce5361dc706cbf2933d1ac2c081bcabe1b83ca7d6b6
This commit is contained in:
3 files changed
+7
-3
No files matched your search
@@ -13,4 +13,4 @@ export DPKG_ADD_ARCH="i386"
|
|||||||
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64 wine32 file"
|
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64 wine32 file"
|
||||||
export RUN_FUNCTIONAL_TESTS=false
|
export RUN_FUNCTIONAL_TESTS=false
|
||||||
export GOAL="deploy"
|
export GOAL="deploy"
|
||||||
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests"
|
export BITCOIN_CONFIG="--enable-reduce-exports --disable-external-signer --disable-gui-tests"
|
||||||
@@ -14,7 +14,7 @@ if [ -n "$ANDROID_TOOLS_URL" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
|
BITCOIN_CONFIG_ALL="--enable-external-signer --enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
|
||||||
if [ -z "$NO_WERROR" ]; then
|
if [ -z "$NO_WERROR" ]; then
|
||||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
|
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
|
||||||
fi
|
fi
|
||||||
|
|||||||
+5
-1
@@ -1438,11 +1438,15 @@ if test "$use_external_signer" != "no"; then
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
AC_MSG_CHECKING([whether Boost.Process can be used])
|
AC_MSG_CHECKING([whether Boost.Process can be used])
|
||||||
|
TEMP_LDFLAGS="$LDFLAGS"
|
||||||
|
dnl Boost 1.73 and older require the following workaround.
|
||||||
|
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
|
||||||
[have_boost_process="yes"],
|
[have_boost_process="yes"],
|
||||||
[have_boost_process="no"])
|
[have_boost_process="no"])
|
||||||
|
LDFLAGS="$TEMP_LDFLAGS"
|
||||||
AC_MSG_RESULT([$have_boost_process])
|
AC_MSG_RESULT([$have_boost_process])
|
||||||
if test "$have_boost_process" == "yes"; then
|
if test "$have_boost_process" = "yes"; then
|
||||||
use_external_signer="yes"
|
use_external_signer="yes"
|
||||||
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
|
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user