Rebased #24415 with Luke’s suggestion.
Fixes #24413.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
No conflicts as of last run.
1445@@ -1446,6 +1446,10 @@ if test "$use_external_signer" != "no"; then
1446 ;;
1447 *)
1448 AC_MSG_CHECKING([whether Boost.Process can be used])
1449+ TEMP_CXXFLAGS="$CXXFLAGS"
1450+ dnl Boost 1.78 requires the following workaround.
1451+ dnl See: https://github.com/boostorg/process/issues/235
1452+ CXXFLAGS="$CXXFLAGS -Wno-error=narrowing"
CXXFLAGS="$TEMP_CXXFLAGS"
is required after the test.
The reverse
CXXFLAGS="$TEMP_CXXFLAGS"
is required after the test.
I mean, https://github.com/hebasto/bitcoin/commits/220222-boost-m
But then it won’t compile src/util/system.cpp, gives the same error.
What configuration with?
But then it won’t compile src/util/system.cpp, gives the same error.
Then something like https://github.com/hebasto/bitcoin/commits/220222-boost-m2?
It keeps the -Wno-error=narrowing
flag only when it is necessary.
5@@ -6,7 +6,16 @@
6 #include <util/system.h>
7
8 #ifdef ENABLE_EXTERNAL_SIGNER
9+#if defined(__GNUC__) && !defined(__clang__)
10+// Boost 1.78 requires the following workaround.
11+// See: https://github.com/boostorg/process/issues/235
12+#pragma GCC diagnostic push
13+#pragma GCC diagnostic ignored "-Wnarrowing"
14+#endif
__clang__
is defined.
src/test/system_tests.cpp
.
-Werror
is getting enabled for this in the first place. :/
Still not clear to me how -Werror is getting enabled for this in the first place. :/
Was #24413 (comment) unclear?
Still not clear to me how -Werror is getting enabled for this in the first place. :/
I had a similar comment about this on IRC
02022-03-29 13:03:47 laanwj it's kind of an ugly workaround though, not sure why the warning matters so much
12022-03-29 13:05:04 laanwj i wouldn't really like cluttering gcc pragmas over the code to silence warnings in third-party deps to become a common thing
22022-03-29 13:07:10 laanwj "just don't use Werror with broken deps" would be fine with me too
I might be missing some pressing reason for this, of course.
Edit: ok just read #24413 (comment) , it’s not about Werror but clang regarding this as a compilation error always.