Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33290. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
|
Very strange CI errors: |
It seems a behaviour change overlooked in #32880. |
Suggesting this patch for a quick fix: --- a/ci/test/03_test_script.sh
+++ b/ci/test/03_test_script.sh
@@ -123,6 +123,7 @@ if [[ "${RUN_TIDY}" == "true" ]]; then
fi
bash -c "cmake -S $BASE_ROOT_DIR -B ${BASE_BUILD_DIR} $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || (
+ cd "${BASE_BUILD_DIR}"
# shellcheck disable=SC2046
cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")
falsecc @maflcko |
8ca7a3c to
1df094f
Compare
|
Thanks @hebasto, I added a commit here to try that fix. |
|
Mind submitting ed95f4f095fecb0a6e5601199959db21e811dd71 as a separate pull? |
|
@maflcko I prefer if someone else does it, as I don't really know what this part of CI is doing. Also, those builds still break. |
That is expected. ed95f4f must not interfere with unrelated issues. The reason why your build fails is because you are adding the targets twice. (You can see this by reading the log) |
1df094f to
fc2e3f5
Compare
for reference, this specific warning was also printed without the verbose log: https://cirrus-ci.com/task/4516741763563520?logs=ci#L894 : |
fc2e3f5 to
f39a782
Compare
|
Using Another issue was that the depends build also threw this warning, which I added a check for. |
janb84
left a comment
There was a problem hiding this comment.
ACK f39a782
PR adds warning text to cmake configure step if CAPNP is not installed. The CAPNP dependency is new, and this warning helps people that do not read the Releasenotes how to solve the error.
Although I do not recommend to upgrade without reading the Release notes / changelog, this warning can reduce the number of issues and guides (non-technical) users to avoid errors .
- code review ✅
- build with and without capnp to test warning. ✅
Details
without capnp:
CMake Warning at cmake/libmultiprocess.cmake:12 (message):
Cap'n Proto (capnp) not found. Compile with -DENABLE_IPC=OFF if you do not
need IPC functionality.
Call Stack (most recent call first):
src/CMakeLists.txt:24 (add_libmultiprocess)without capnp & -DENABLE_IPC=OFF:
IPC ................................. OFF
-- Configuring done (4.8s)with capnp:
IPC ................................. ON
-- Configuring done (5.2s)|
This is a nice idea and approach seems ok if it works in practice. I think a more general approach might to have the bitcoin build set a variable the libmultiprocess build can use to show better error messages like: It could append this message if it can't find the cap'n proto package, or doesn't find a compatible version (for bitcoin-core/libmultiprocess#199 and #33176). |
|
@ryanofsky I like your approach better since it can be used under more circumstances, such as not having the right version. But we're close to branch-off so maybe this approach suffices for now. |
| function(add_libmultiprocess subdir) | ||
| # Provide a more helpful message without pulling in CapnProtoConfig.cmake, | ||
| # which is included again by libmultiprocess. Skip the check when using the | ||
| # depends toolchain. |
There was a problem hiding this comment.
NACK to adding any depends specific code. CMAKE_TOOLCHAIN_FILE also doesn't necessarily mean a depends build; anyone can bring/use a toolchain file.
There was a problem hiding this comment.
re: #33290 (comment)
NACK to adding any depends specific code.
CMAKE_TOOLCHAIN_FILEalso doesn't necessarily mean a depends build; anyone can bring/use a toolchain file.
Yeah I think it is clear this is not a good long term solution, but to be fair I don't think there is much actual harm done here if CMAKE_TOOLCHAIN_FILE is set, since this would just fail to print a warning that is likely to be irrelevant.
But I do think it could be nice to close this PR and extend @willcl-ark's approach as described in bitcoin-core/libmultiprocess#205 (comment) to handle this in libmultiprocess instead of of bitcoin core.
There was a problem hiding this comment.
I have extended bitcoin-core/libmultiprocess#205 to include more helpful error messages when the capnproto package is not found by cmake.
There was a problem hiding this comment.
Let's go for that approach then.
9b76eef ci: cd into BASE_BUILD_DIR for GetCMakeLogFiles (Sjors Provoost) Pull request description: When a bug is introduced in cmake, we render its logs, which was broken: #33290 (comment) ACKs for top commit: maflcko: lgtm ACK 9b76eef 💽 hebasto: ACK 9b76eef, [obviously](#33290 (comment)). Tree-SHA512: 97a440efcaa058af1144d66257ac0157d499b66fd9a00fa01e0eaa013267af1643cb062ec6c74366fab88cb706c9cf9d5fb0316195e79582679c7ae8d39ec200
| if(NOT (DEFINED CMAKE_TOOLCHAIN_FILE)) | ||
| find_program(_CAPNP capnp) | ||
| if(NOT _CAPNP) | ||
| message(WARNING "Cap'n Proto (capnp) not found. Compile with -DENABLE_IPC=OFF if you do not need IPC functionality.") |
There was a problem hiding this comment.
We might also want to mention that doc/build-*.md contains instructions for installing this new dependency, should they choose to not add -DENABLE_IPC=OFF
|
Conceptual question: Why not print a warning and |
|
@davidgumberg I believe that's a philosophical difference between cmakeland and autotoolsland, and I think in the case of optional build dependencies, it's better not to autodetect them, to avoid build system configuration leaking into the build (which then might not work on the system you actually want to run it on). |
|
Closing in favour of bitcoin-core/libmultiprocess#205. |
|
#33315 could be added to the v30 milestone so we don't forget. |
…ogFiles bec10cc ci: cd into BASE_BUILD_DIR for GetCMakeLogFiles (Sjors Provoost) Pull request description: When a bug is introduced in cmake, we render its logs, which was broken: bitcoin/bitcoin#33290 (comment) ACKs for top commit: maflcko: lgtm ACK bec10cc 💽 hebasto: ACK bec10cc, [obviously](bitcoin/bitcoin#33290 (comment)). Tree-SHA512: 97a440efcaa058af1144d66257ac0157d499b66fd9a00fa01e0eaa013267af1643cb062ec6c74366fab88cb706c9cf9d5fb0316195e79582679c7ae8d39ec200
…ogFiles dd6af75 ci: cd into BASE_BUILD_DIR for GetCMakeLogFiles (Sjors Provoost) Pull request description: When a bug is introduced in cmake, we render its logs, which was broken: bitcoin/bitcoin#33290 (comment) ACKs for top commit: maflcko: lgtm ACK dd6af75 💽 hebasto: ACK dd6af75, [obviously](bitcoin/bitcoin#33290 (comment)). Tree-SHA512: 97a440efcaa058af1144d66257ac0157d499b66fd9a00fa01e0eaa013267af1643cb062ec6c74366fab88cb706c9cf9d5fb0316195e79582679c7ae8d39ec200
…ogFiles 9b76eef2d2b42703e2a30952d4c3474b533e360a ci: cd into BASE_BUILD_DIR for GetCMakeLogFiles (Sjors Provoost) Pull request description: When a bug is introduced in cmake, we render its logs, which was broken: bitcoin/bitcoin#33290 (comment) ACKs for top commit: maflcko: lgtm ACK 9b76eef2d2b42703e2a30952d4c3474b533e360a 💽 hebasto: ACK 9b76eef2d2b42703e2a30952d4c3474b533e360a, [obviously](bitcoin/bitcoin#33290 (comment)). Tree-SHA512: 97a440efcaa058af1144d66257ac0157d499b66fd9a00fa01e0eaa013267af1643cb062ec6c74366fab88cb706c9cf9d5fb0316195e79582679c7ae8d39ec200
Since #31802, when existing users upgrade to a recent version of master, or the upcoming v30 release, they'll be treated by an error that CapnProto is missing. Unless they read the release notes :-)
This error is generated by
src/ipc/libmultiprocess/CMakeLists.txtwhich is a git subtree and so it doesn't have context of our project, and doesn't know about the-DENABLE_IPCoption.This pull request adds a simple pre-check in own CMake file to see if Cap'n Proto is missing. For ease of maintenance it doesn't check the version.
The new warning is shown in yellow, the (unchanged) error in red: