Skip to content

Commit 2529007

Browse files
committed
Merge bitcoin/bitcoin#24397: build: Fix Boost.Process check for Boost 1.73 and older
774323e ci: Force `--enable-external-signer` to prevent future regressions (Hennadii Stepanov) 6997885 build: Fix Boost.Process check for Boost 1.73 and older (Hennadii Stepanov) 2199ef7 build: Fix a non-portable use of `test` (Hennadii Stepanov) d436c48 build, refactor: Replace tabs with spaces (Hennadii Stepanov) Pull request description: On master (5f44c5c) 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 ACK 774323e, is a bugfix/workaround, seems fine to merge last minute for 23.0. Tree-SHA512: 2a9d4b67fd8910e107af972d8c223286b7c933bc310616f86c8b6d8c903438916980fc76bd7e37f2698f6ce5361dc706cbf2933d1ac2c081bcabe1b83ca7d6b6
2 parents 159f89c + 774323e commit 2529007

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

ci/test/00_setup_env_win64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ export DPKG_ADD_ARCH="i386"
1313
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64 wine32 file"
1414
export RUN_FUNCTIONAL_TESTS=false
1515
export GOAL="deploy"
16-
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests"
16+
export BITCOIN_CONFIG="--enable-reduce-exports --disable-external-signer --disable-gui-tests"

ci/test/06_script_a.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ -n "$ANDROID_TOOLS_URL" ]; then
1414
exit 0
1515
fi
1616

17-
BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
17+
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"
1818
if [ -z "$NO_WERROR" ]; then
1919
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
2020
fi

configure.ac

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ esac
359359
if test "$enable_debug" = "yes"; then
360360
dnl Clear default -g -O2 flags
361361
if test "$CXXFLAGS_overridden" = "no"; then
362-
CXXFLAGS=""
362+
CXXFLAGS=""
363363
fi
364364

365365
dnl Disable all optimizations
@@ -978,14 +978,14 @@ AC_CHECK_DECLS([setsid])
978978
AC_CHECK_DECLS([pipe2])
979979

980980
AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,,
981-
[#if HAVE_ENDIAN_H
981+
[#if HAVE_ENDIAN_H
982982
#include <endian.h>
983983
#elif HAVE_SYS_ENDIAN_H
984984
#include <sys/endian.h>
985985
#endif])
986986

987987
AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,,
988-
[#if HAVE_BYTESWAP_H
988+
[#if HAVE_BYTESWAP_H
989989
#include <byteswap.h>
990990
#endif])
991991

@@ -1438,11 +1438,15 @@ if test "$use_external_signer" != "no"; then
14381438
;;
14391439
*)
14401440
AC_MSG_CHECKING([whether Boost.Process can be used])
1441+
TEMP_LDFLAGS="$LDFLAGS"
1442+
dnl Boost 1.73 and older require the following workaround.
1443+
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
14411444
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
14421445
[have_boost_process="yes"],
14431446
[have_boost_process="no"])
1447+
LDFLAGS="$TEMP_LDFLAGS"
14441448
AC_MSG_RESULT([$have_boost_process])
1445-
if test "$have_boost_process" == "yes"; then
1449+
if test "$have_boost_process" = "yes"; then
14461450
use_external_signer="yes"
14471451
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
14481452
else

0 commit comments

Comments
 (0)