Skip to content

Conversation

vasild
Copy link
Contributor

@vasild vasild commented Apr 23, 2020

Add an option to ./configure to suppress compilation warnings from
external headers. The option is off by default (no change in behavior,
show warnings from external headers).

This option is useful if e.g. Boost or Qt is installed outside of
/usr/include (warnings from headers in /usr/include are already
suppressed by default) and those warnings stand in the way of compiling
Bitcoin Core with -Werror[=...] or they just clutter the build output
too much and make our own warnings hard to spot.

-isystem /usr/include bricks GCC's #include_next, so we use
-idirafter instead. This way we don't have to treat /usr/include
specially.

@vasild
Copy link
Contributor Author

vasild commented Apr 23, 2020

cc @Empact @hebasto @theuni

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 23, 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.

@vasild
Copy link
Contributor Author

vasild commented Apr 24, 2020

To test that this works as intended plant some warning in a Qt header (if you don't have already!). For example:

inline bool f(int iii, unsigned uuu) { return iii < uuu; }

in /qt/installed/here/include/qt5/QtCore/qglobal.h and see that the warning is gone with ./configure --enable-suppress-external-warnings.

@vasild
Copy link
Contributor Author

vasild commented Apr 24, 2020

We currently compile our code with some warnings explicitly silenced: -Wno-unused-local-typedef -Wno-deprecated-register -Wno-implicit-fallthrough.

Currently Bitcoin Core is free of such warnings, but they can sneak in at anytime completely unnoticed - due to the above flags nobody will notice if a new code introduces such a warning.

If this PR gets merged, then we can consider removing the above -Wno-... flags. If it turns out that some external header produces such warnings, then they can be silenced using the functionality from this PR. This way we will spot if a new code introduces such a warning in Bitcoin Core.

@jonatack
Copy link
Member

Concept ACK

@brakmic
Copy link
Contributor

brakmic commented May 1, 2020

Concept ACK.

@hebasto
Copy link
Member

hebasto commented May 3, 2020

Tested on Ubuntu 20.04 LTS (gcc 9.3.0) and macOS 10.15.4 (llvm clang 10.0). Works as expected.

I've looked through our docs, and didn't find any compiler warning policy. Or did I miss it?

From the POV of a user who respects one's own safety and builds one's own node binaries from the source, I believe there is no a such thing like a "harmless compiler warning". At least for major OSes (the two latest versions of Ubuntu LTS, Debian stable, Fedora, macOS, Windows with default system compilers) on the x86_64 platform. In the worst case, a rare warning should be documented in the release notes.

Concept ACK.

Is it possible to increase the granularity of --enable-suppress-external-warnings?
E.g., --enable-suppress-external-warnings=qt?
Related: #16722.

@vasild
Copy link
Contributor Author

vasild commented May 4, 2020

Tested on Ubuntu 20.04 LTS (gcc 9.3.0) and macOS 10.15.4 (llvm clang 10.0). Works as expected.

Excellent!

From the POV of a user who respects one's own safety and builds one's own node binaries from the source, I believe there is no a such thing like a "harmless compiler warning".

I agree. This is why the new option is off by default. And I do not think it should ever be changed (to on by default).

Is it possible to increase the granularity of --enable-suppress-external-warnings?
E.g., --enable-suppress-external-warnings=qt?

I did consider this! It would increase the complexity of this feature to some extent, but there is a bigger problem - we suppress warnings based on the directory in which the header which produced the warning is located. So, if both qt and boost are installed in the same directory (e.g. /usr/local/include) then such separation will not work as expected.

luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Jun 14, 2020
Add an option to `./configure` to suppress compilation warnings from
external headers. The option is off by default (no change in behavior,
show warnings from external headers).

This option is useful if e.g. Boost or Qt is installed outside of
`/usr/include` (warnings from headers in `/usr/include` are already
suppressed by default) and those warnings stand in the way of compiling
Bitcoin Core with `-Werror[=...]` or they just clutter the build output
too much and make our own warnings hard to spot.

`-isystem /usr/include` bricks GCC's `#include_next`, so we use
`-idirafter` instead. This way we don't have to treat `/usr/include`
specially.

Github-Pull: bitcoin#18750
Rebased-From: 1e4e981
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Jun 15, 2020
Add an option to `./configure` to suppress compilation warnings from
external headers. The option is off by default (no change in behavior,
show warnings from external headers).

This option is useful if e.g. Boost or Qt is installed outside of
`/usr/include` (warnings from headers in `/usr/include` are already
suppressed by default) and those warnings stand in the way of compiling
Bitcoin Core with `-Werror[=...]` or they just clutter the build output
too much and make our own warnings hard to spot.

`-isystem /usr/include` bricks GCC's `#include_next`, so we use
`-idirafter` instead. This way we don't have to treat `/usr/include`
specially.

Github-Pull: bitcoin#18750
Rebased-From: 1e4e981
@vasild vasild force-pushed the suppress_external_warnings branch from 1e4e981 to 426e6dc Compare June 15, 2020 17:05
@vasild
Copy link
Contributor Author

vasild commented Jun 15, 2020

Rebased (trivial conflict with the merged #18297).

@vasild
Copy link
Contributor Author

vasild commented Aug 11, 2020

Rebased to resolve conflicts.

@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 1, 2020

Guix builds

File commit 1769828
(master)
commit 75b42f9
(master and this pull)
*-aarch64-linux-gnu-debug.tar.gz 2c90411d96eeef0a... d1b1c6711dab92dc...
*-aarch64-linux-gnu.tar.gz 9316a0f77c5cf478... 895d7365e18f30bc...
*-arm-linux-gnueabihf-debug.tar.gz 222c50ce8f2c0ffc... 9ec9ea5de526a12f...
*-arm-linux-gnueabihf.tar.gz 4e2977e8a8a33266... 3dc0c21c7abc1d80...
*-riscv64-linux-gnu-debug.tar.gz 820db95fd8891d61... 25306dd7bfd1f2e5...
*-riscv64-linux-gnu.tar.gz 4d51430614ca2fc7... a945cc0f5faf05c8...
*-win-unsigned.tar.gz 51f33713e3d706f9... be3b56bbda932053...
*-win64-debug.zip dc6355584170c13d... adb36e02fc77d847...
*-win64-setup-unsigned.exe 6280c2c1ee411214... 673ddc3eb2c13da5...
*-win64.zip 1c63275334074f40... 7544fbb63518b312...
*-x86_64-linux-gnu-debug.tar.gz f249f8a755a16fbb... 95c9072e4bf7595f...
*-x86_64-linux-gnu.tar.gz 3cab2d29de25d7ac... fc93fa6117ce766c...
*.tar.gz bac5492f2d68c97c... bb2f70ea90c584ac...
guix_build.log e97379d33c122448... 86e53b0040f36f5c...
guix_build.log.diff 57e8da602d723af1...

@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 2, 2020

Gitian builds

File commit 3487e42
(master)
commit 075064e
(master and this pull)
*-aarch64-linux-gnu-debug.tar.gz 610763669e7e3cb7... 33035bce46b95145...
*-aarch64-linux-gnu.tar.gz 51812ca091622ed9... b406d50cec49a3f2...
*-arm-linux-gnueabihf-debug.tar.gz f93c0427cd047290... 06cbc1ca11daa6f1...
*-arm-linux-gnueabihf.tar.gz 6df65db3f3a7a123... c6ff1969ea796a5f...
*-osx-unsigned.dmg 0d4a4bf011b2019e... 3c1b7b22e158ebfa...
*-osx64.tar.gz 0aa9fd6f4187d33f... b3f3b6a4df2af0a3...
*-riscv64-linux-gnu-debug.tar.gz 58914f8feac72537... 33b5790f09aaad56...
*-riscv64-linux-gnu.tar.gz 1a30336e17f7cd6b... 022fb921d6fa95ef...
*-win64-debug.zip 2f06f34ffd627e79... d721eda9e9bfb8e8...
*-win64-setup-unsigned.exe f23026e90602164d... a5ee4164e3273583...
*-win64.zip 8d3acee5e2584d3b... c3de365b9adceb46...
*-x86_64-linux-gnu-debug.tar.gz be688faf54cfea87... 5c5bc415d8c7b2c3...
*-x86_64-linux-gnu.tar.gz 2a78323df8c70758... c0f268c3ebf21bdc...
*.tar.gz 7bf0d038afb59072... ae81bc977248923e...
bitcoin-core-linux-0.21-res.yml 2b37aee7c44927ee... e4ebc15cddc8666b...
bitcoin-core-osx-0.21-res.yml 1c3793321abc2f61... 9d5183fb50a6f3e9...
bitcoin-core-win-0.21-res.yml 5de911b923fdda5a... 9bd083214ee81fd2...
linux-build.log e44bb3ce2f5117e8... 8e0d48eaf53688fe...
osx-build.log 886fd63ccaf3e7cb... 36567233ae47375f...
win-build.log aba8b79f48c7ff90... 237c646313597eeb...
bitcoin-core-linux-0.21-res.yml.diff 11b392af50349d0e...
bitcoin-core-osx-0.21-res.yml.diff 7aef47fbcda76204...
bitcoin-core-win-0.21-res.yml.diff 5178884b6c020cf6...
linux-build.log.diff d835a581c9dbfcd2...
osx-build.log.diff e877416b362f608b...
win-build.log.diff 75c0c7e2054c8217...

Add an option to `./configure` to suppress compilation warnings from
external headers. The option is off by default (no change in behavior,
show warnings from external headers).

This option is useful if e.g. Boost or Qt is installed outside of
`/usr/include` (warnings from headers in `/usr/include` are already
suppressed by default) and those warnings stand in the way of compiling
Bitcoin Core with `-Werror[=...]` or they just clutter the build output
too much and make our own warnings hard to spot.
@vasild vasild force-pushed the suppress_external_warnings branch from 3598707 to ba8950e Compare October 12, 2020 16:18
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK ba8950e, tested on Linux Mint 20 (x86_64).

With --enable-suppress-external-warnings having warnings from leveldb only:

$ make > /dev/null 
leveldb/db/c.cc: In function ‘leveldb_filterpolicy_t* leveldb_filterpolicy_create_bloom(int)’:
leveldb/db/c.cc:474:17: warning: ‘virtual const char* leveldb_filterpolicy_create_bloom(int)::Wrapper::Name() const’ can be marked override [-Wsuggest-override]
  474 |     const char* Name() const { return rep_->Name(); }
      |                 ^~~~
leveldb/db/c.cc:475:10: warning: ‘virtual void leveldb_filterpolicy_create_bloom(int)::Wrapper::CreateFilter(const leveldb::Slice*, int, std::string*) const’ can be marked override [-Wsuggest-override]
  475 |     void CreateFilter(const Slice* keys, int n, std::string* dst) const {
      |          ^~~~~~~~~~~~
leveldb/db/c.cc:478:10: warning: ‘virtual bool leveldb_filterpolicy_create_bloom(int)::Wrapper::KeyMayMatch(const leveldb::Slice&, const leveldb::Slice&) const’ can be marked override [-Wsuggest-override]
  478 |     bool KeyMayMatch(const Slice& key, const Slice& filter) const {
      |          ^~~~~~~~~~~

Copy link
Member

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

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

utACK ba8950e

@practicalswift
Copy link
Contributor

ACK ba8950e: diff looks correct!

Really looking forward to having this in master :)

@laanwj laanwj merged commit 99a1d57 into bitcoin:master Oct 14, 2020
@vasild vasild deleted the suppress_external_warnings branch October 14, 2020 16:06
@laanwj
Copy link
Member

laanwj commented Oct 14, 2020

Thanks for adding this option, it definitely helps reduce the flood of warnings in boost and qt etc.

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 16, 2020
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 2, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 2, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 2, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 2, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 5, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 5, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 5, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 11, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 11, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 11, 2021
ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
UdjinM6 pushed a commit to dashpay/dash that referenced this pull request Oct 11, 2021
* Merge bitcoin#18750: build: optionally skip external warnings

ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9

* add --enable-suppress-external-warnings to matrix.sh

Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>
pravblockc pushed a commit to pravblockc/dash that referenced this pull request Nov 18, 2021
* Merge bitcoin#18750: build: optionally skip external warnings

ba8950e build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950e: diff looks correct!
  hebasto:
    ACK ba8950e, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950e

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9

* add --enable-suppress-external-warnings to matrix.sh

Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants