Rebased #24415 with Luke's suggestion.
Fixes #24413.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
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"
The reverse CXXFLAGS="$TEMP_CXXFLAGS" is required after the test.
But then it won't compile src/util/system.cpp, gives the same error.
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.
Ok, I'll try that.
Pushed an alternative that only ignores the error locally.
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
It does not work on macOS, where __clang__ is defined.
Also the similar changes should be applied to src/test/system_tests.cpp.
Still not clear to me how -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?
ACK 532c64a7264dd3c7329e8839547837c57da7dbe8, tested on Mac mini (M1, 2020) + macOS Monterey 12.3 (21E230).
Tested that 532c64a7264dd3c7329e8839547837c57da7dbe8 compiles and runs the tests on macOS 12.3 on an Intel mac.
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
2022-03-29 13:03:47 laanwj it's kind of an ugly workaround though, not sure why the warning matters so much
2022-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
2022-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.