aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-11-29 12:08:37 +0000
committerfanquake <fanquake@gmail.com>2023-12-01 10:46:19 +0000
commit308aec3e5655327d98e0428d8205d246f24d6af5 (patch)
treec65b252202a63771443d38c86fc1557fe235f274 /configure.ac
parent35537318a19360ddf1ea8f0c1e6d8ad49e635516 (diff)
downloadbitcoin-308aec3e5655327d98e0428d8205d246f24d6af5.tar.xz
build: disable external-signer for Windows
It's come to light that Boost ASIO (a Boost Process sub dep) has in some instances, been queitly initialising our network stack on Windows (see PR #28486 and discussion in #28940). This has been shielding a bug in our own code, but the larger issue is that Boost Process/ASIO is running code before main, and doing things like setting up networking. This undermines our own assumptions about how our binary works, happens before we get to run any sanity checks, and also runs before we call our own code to setup networking. It's also not clear why a feature like external signer would have a dependency that would be doing anything network/socket related, given it only exists to spawn a local process.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 1b5dc32b04..fd9e10d44a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1515,9 +1515,19 @@ if test "$use_external_signer" != "no"; then
CXXFLAGS="$TEMP_CXXFLAGS"
AC_MSG_RESULT([$have_boost_process])
if test "$have_boost_process" = "yes"; then
- use_external_signer="yes"
- AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
- AC_DEFINE([BOOST_PROCESS_USE_STD_FS], [1], [Defined to avoid Boost::Process trying to use Boost Filesystem])
+ case $host in
+ dnl Boost Process for Windows uses Boost ASIO. Boost ASIO performs
+ dnl pre-main init of Windows networking libraries, which we do not
+ dnl want.
+ *mingw*)
+ use_external_signer="no"
+ ;;
+ *)
+ use_external_signer="yes"
+ AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
+ AC_DEFINE([BOOST_PROCESS_USE_STD_FS], [1], [Defined to avoid Boost::Process trying to use Boost Filesystem])
+ ;;
+ esac
else
if test "$use_external_signer" = "yes"; then
AC_MSG_ERROR([External signing is not supported for this Boost version])