Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Oct 19, 2020

This PR prevents introducing of new compiler warnings in the master branch, e.g., #19986, #20162.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fill out the PR description. What's the motivation for this change.

@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 19, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@practicalswift
Copy link
Contributor

Concept ACK: deduplication is good

Copy link
Contributor

@vasild vasild left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach ACK

@maflcko
Copy link
Member

maflcko commented Oct 21, 2020

The build system changes should go separate from the test/ci changes. Are they required or orthogonal?

@vasild
Copy link
Contributor

vasild commented Oct 21, 2020

[@hebasto, correct me if I am wrong]

@MarcoFalke, if they are going to go as separate PRs, then I think the CI change must go first and after that the configure.ac change. Otherwise we will get CI trying to compile with full -Werror and without --enable-suppress-external-warnings which will likely cause build failures.

@hebasto
Copy link
Member Author

hebasto commented Oct 21, 2020

The build system changes should go separate from the test/ci changes. Are they required or orthogonal?

CI changes require build system changes.

Copy link
Contributor

@vasild vasild left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 81ade9b

configure.ac Outdated
Comment on lines 423 to 425
dnl This is a temporary workaround. See https://github.com/bitcoin/bitcoin/pull/17919#issuecomment-674404780
AX_CHECK_COMPILE_FLAG([-Wunused-command-line-argument],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-unused-command-line-argument"],,[[$CXXFLAG_WERROR]])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When can this workaround be removed? It is not clear from the linked comment.

I think whenever -Wno-foo is added (silencing a class of warnings in Bitcoin Core code) that should link a PR that fixes those warnings or at least some concrete plan to ensure that the added -Wno-foo will not be forgotten and remain forever in configure.ac.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but we have no a PR with a fix now ((

@vasild
Copy link
Contributor

vasild commented Nov 5, 2020

ACK 3a409f6

@hebasto hebasto force-pushed the 201018-error branch 3 times, most recently from b9e778f to bd09b7b Compare November 26, 2020 18:41
@hebasto hebasto changed the title ci: Enable -Werror for Travis builds, and document exceptions ci: Enable -Werror, and document exceptions Nov 26, 2020
@hebasto hebasto marked this pull request as ready for review November 26, 2020 20:10
@hebasto
Copy link
Member Author

hebasto commented Nov 26, 2020

@fanquake @practicalswift @vasild @MarcoFalke

Mind (re)reviewing this PR (at the early stage of 22.0 cycle)?

@practicalswift
Copy link
Contributor

cr ACK 2ca5156: patch looks correct!

@hebasto
Copy link
Member Author

hebasto commented Dec 2, 2020

The build system changes should go separate from the test/ci changes.

Build system changes. i.e. the first commit, has been split out into a separated pr #20544.

@vasild
Copy link
Contributor

vasild commented Dec 3, 2020

To resolve the dependency tangle with #20544 I think that:

@hebasto
Copy link
Member Author

hebasto commented Dec 3, 2020

To resolve the dependency tangle with #20544 I think that:

Something similar was in my mind, so done.

@hebasto
Copy link
Member Author

hebasto commented Dec 3, 2020

@MarcoFalke the assigned label could be switched from "Build system" to "Tests" now, right?

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this makes sense by itself in the current form. I failed to reproduce the compile failures locally.

@hebasto hebasto changed the title ci: Enable -Werror, and document exceptions ci: Build with --enable-werror by default, and document exceptions Dec 3, 2020
@hebasto
Copy link
Member Author

hebasto commented Dec 3, 2020

Updated cbb234c -> 0e2d9ef (pr20182.10 -> pr20182.11):

  • removed unrelated changes
  • rebased on top of the recent CI changes

Copy link
Contributor

@vasild vasild left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 0e2d9ef

I am fine with NO_WERROR=1 in some of the .sh files as long as those files did not contain --enable-werror in their BITCOIN_CONFIG before this PR. I.e. they did not use werror before this PR and will not use it after this PR either.

Surely, the less NO_WERROR=1 the better :)

@@ -14,3 +14,4 @@ export RUN_FUNCTIONAL_TESTS=false
export RUN_SECURITY_TESTS="true"
export GOAL="deploy"
export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests --without-boost-process"
export NO_WERROR=1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tried this one yet. What is the error here?

Copy link
Member Author

@hebasto hebasto Dec 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://cirrus-ci.com/task/6268532532969472

script/interpreter.cpp: In function ‘bool EvalChecksig(const valtype&, const valtype&, prevector<28, unsigned char>::const_iterator, prevector<28, unsigned char>::const_iterator, ScriptExecutionData&, unsigned int, const BaseSignatureChecker&, SigVersion, ScriptError*, bool&)’:
script/interpreter.cpp:429:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1plus: some warnings being treated as errors

https://sourceforge.net/p/mingw-w64/bugs/306/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Can confirm locally:

Screenshot from 2020-12-03 18-29-59

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could mention with a comment?

@maflcko
Copy link
Member

maflcko commented Dec 3, 2020

ACK 0e2d9ef 👈

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

ACK 0e2d9ef54cdf21fddcfec1d8188633fb159ea993 👈
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUjnwQv/f0RCPeajlgbPOL9U/Wqu/v50H3e8UfBTrKadvu4rz560W2Lhco2duJTz
E1U2KcKridi8Q/1Xgg75Jz0qm6X9S6EOI+brvc4IWMFu2IrKyZa3rDcrUTGoA6cB
LIBiDpoQPkFaWJH1bAgQLDwF1VOHoQx01qXQkcZRSNAC1yT8yCVuJ7OWrUDDusw8
nY+X7MZpB01E70gfJhZWnJfBT1i3R21gk6Zv7iej0nEP81l3887V4IgtCqwCX+qS
iOQxcsz/4GHZNZ1fiU5mz5GpZBcikdn9jRsqnLkJWGzZr+9z3hCY1pUsKx4tooHu
8L0s8x1Q/OH3+SUHivJNbIZ/h8HCaABZXlFZqULbK6abH4Zx4YKSeGPLJYhmIxcv
H9hUUlBYlplWI3lPz0yNkGr4yC2aWCX6gpxJzLwhq+Nf3VKEXDtttp0tsUudvRBN
YfCMqk4e0wzh3Ce7iaZymSdZeT3AMfDl3TSvSKcgxo9CQ5mqW3Yzdq215BWoX2dV
xUa3Mvso
=wpNQ
-----END PGP SIGNATURE-----

Timestamp of file with hash bf23f2c7778536b97f325b2e84fde80d36846b764324b5b39cd6d0f4c94e45fa -

@hebasto
Copy link
Member Author

hebasto commented Dec 3, 2020

Updated 0e2d9ef -> 2f6fe4e (pr20182.11 -> pr20182.12, diff):

Could mention with a comment?

@practicalswift
Copy link
Contributor

cr ACK 2f6fe4e: patch looks correct

Copy link
Contributor

@vasild vasild left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 2f6fe4e

@maflcko
Copy link
Member

maflcko commented Dec 4, 2020

re-ACK 2f6fe4e 🏏

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

re-ACK 2f6fe4e4e9 🏏
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUhqegv7Bn3eV9QYxtVtRWO0JksQf+6awouqP9K4uHCR4Wkq/xG1yFw6+fMlm9yw
S/Zzv8tTdBfu3uwsqLGamAEd7lMrsN+nvqcnrl0gTOyaoOpKFfAZTOTD0kgF8zKI
n8323jIjYkOdCgLGsaDRgaHcQRZUoa9WRSr6SyavhXtBx1vKjeAGbWpVHt/knpG4
hNhqDO3gTxF6S6Bt7nSj7WkG9CTj1ZzY1yJJe6tFE5xIfefRC5LHVBhwfFaRLa4t
P4K9TPJnlbB7fJyf2/o80FKWNR4nLHsL/W218PQ58Iq8tEtvh2NcIwEcBHq0/sSV
Nn/J8S6eghuR2bKwKS8XpkR/4Y0MfFBRHeFWDKhGCk3QY0KB52lFwWOpDcOPYnvN
Gr79QqZJZs3Hghl5pha15yF+C8LPzWECs7Od7FAZJct+8Pf0J/M8lTDdZ4Y2VOpR
kdQG+v5tdLAiMdqNndtBYvJ7aKJaKaYFGISz8r+JrVYlMaBfD4/GZwETzxGPm4tX
GygUgrQE
=gz7a
-----END PGP SIGNATURE-----

Timestamp of file with hash f9a4b582f6420d97a683d6112df2a75c1b6bc10c52fbb86286062edb48eef81d -

@maflcko maflcko merged commit e2ae6a2 into bitcoin:master Dec 4, 2020
@hebasto hebasto deleted the 201018-error branch December 4, 2020 09:40
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 4, 2020
fanquake pushed a commit to fanquake/bitcoin that referenced this pull request Jul 29, 2021
maflcko pushed a commit that referenced this pull request Jul 30, 2021
55e941f test: Fix intermittent feature_taproot issue (MarcoFalke)
681f728 ci: Build with --enable-werror by default, and document exceptions (Hennadii Stepanov)
89426c4 ci: Fix macOS brew install command (Hennadii Stepanov)

Pull request description:

  This backports a few changes to fix CI failures we are seeing with the 0.21 branch.

  Backports #21663, this might be the easiest way to fix the macOS CI failures we're seeing. i.e in #22569. The underlying issue is that the older CI images are using a version of brew that without running `brew update` first, is trying to download packages like Boost, from bintray (which no-longer works).

  This also includes #20182, as by fixing macOS failure, via running `brew upgrade`, we end up using a newer version of miniupnpc, which emits a GNU extension related warning, and causes the build to fail, because we use `-Werror`.

  Backporting #20535 should fix #22581.

ACKs for top commit:
  hebasto:
    ACK 55e941f, I verified changes by backporting locally.

Tree-SHA512: 3ab2c5c73c707d0f5b862264f3a0179cdeee30ae55aae872f3c3e0bb81d71a5027c39ba830210c99a21f98cc86c4167c4f215e24d1a8891ec79ce512debf82df
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Dec 15, 2021
Needed to remain compatible with backport commit 681f728

Github-Pull: bitcoin#20182
Rebased-From: 2f6fe4e
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants