Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Cmake warnings should be errors #31476

Open
maflcko opened this issue Dec 12, 2024 · 2 comments
Open

CI: Cmake warnings should be errors #31476

maflcko opened this issue Dec 12, 2024 · 2 comments

Comments

@maflcko
Copy link
Member

maflcko commented Dec 12, 2024

It is brittle to silently ignore Cmake warnings in the CI.

They should be turned into errors.

This will uncover an issue in the centos task that the correct python version is missing. I guess this should be fixed by installing and activating an acceptable python version.

@fanquake fanquake added this to the 29.0 milestone Dec 12, 2024
fanquake added a commit that referenced this issue Dec 13, 2024
fa47baa ci: Bump centos gcc (MarcoFalke)

Pull request description:

  Currently the centos stream9 CI task is using gcc-11. This is fine, because this is also the minimum supported.

  However:

  * There is already a CI task that is checking the minimum supported version: https://github.com/bitcoin/bitcoin/blob/62bd61de110b057cbfd6e31e4d0b727d93119c72/ci/test/00_setup_env_native_previous_releases.sh#L11-L12
  * The CI log is a bit useless, because it is mostly just `#warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp]`. This makes it harder to spot real warnings, such as #31476

  Fix both issues by using gcc-12.

ACKs for top commit:
  hebasto:
    ACK fa47baa.

Tree-SHA512: 573618efc949437d33365a24f77a26a9b68457f7fb9bd603ee92bc5f17fec73ccba114cafb900eddee3531af47508ce5c246def93268787cdfa2b99e6f45a13d
@hebasto
Copy link
Member

hebasto commented Dec 13, 2024

It is brittle to silently ignore Cmake warnings in the CI.

They should be turned into errors.

When building with Berkeley DB > 4.8, this warning will be always emitted:

bitcoin/CMakeLists.txt

Lines 107 to 109 in 78f1bff

message(WARNING "Found Berkeley DB (BDB) other than 4.8.\n"
"BDB (legacy) wallets opened by this build will not be portable!"
)

@maflcko
Copy link
Member Author

maflcko commented Dec 13, 2024

I guess I was mostly thinking about configure_warnings.

An alternative would be to require python to be disabled explicitly. Otherwise, it seems odd that every setting in cmake has a static default that can only be overridden explicitly, except for some, which are silently downgraded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants