Commit Graph

754 Commits

Author SHA1 Message Date
UdjinM6
0c11f0e99b
Merge branch 'master' into merge_master_21.0.2 2024-08-02 18:12:06 +03:00
pasta
56cc39d178
chore: bump version to 21.0.2 2024-08-01 16:52:41 -05:00
pasta
98a33939fd
chore: set release to true 2024-07-24 23:29:01 -05:00
pasta
04adca3395
Merge #6113: backport: bitcoin#21613 -Wdocumentation and related fixes
252ffee815 fix: adjust doxygen for dash codebase for -Wdocumentation (Konstantin Akimov)
4f260cd4b1 fix: ignore warnings for dashbls/ (Konstantin Akimov)
0afffcccc4 Merge #21613: build: enable -Wdocumentation (fanquake)

Pull request description:

  ## What was done?
  Backport bitcoin#21613 to enable -Wdocumentation and related fixes for dash code

  ## How Has This Been Tested?
  Build with clang compiler and see no failures anymore with `--enable-werror`

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK 252ffee815
  PastaPastaPasta:
    utACK 252ffee815

Tree-SHA512: 1670076665e26228567042ed33ce149780c3992aaa78cdeafeefdc5609b1d1590034a3a2ddc056b69120b2b4e8b0dffaff729b8178043aebe19b1c5880a10d0d
2024-07-19 16:51:04 -05:00
fanquake
0afffcccc4
Merge #21613: build: enable -Wdocumentation
a4e970adb6de8425025ae3f62fb89d9e27a8ab1f build: enable -Wdocumentation if suppressing external warnings (fanquake)
3b0078f958c46e94b468c829522ba965f5549f11 doc: fixup -Wdocumentation issues (fanquake)
c6edcf1c710e4aaf1cafdbf8e86fe209b57bdeb8 build: suppress libevent warnings if supressing external warnings (fanquake)

Pull request description:

  Enable `-Wdocumentation` by taking advantage of our `--enable-suppress-external-warnings` flag. Most of the CIs are using this flag now, so any regressions should be caught.

  This also required modifying libevents flags when suppressing warnings, as depending on the version being built against, that could generate a large number of warnings. i.e:
  ```bash
  In file included from httpserver.cpp:34:
  In file included from ./support/events.h:12:
  /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:464:11: warning: parameter 'req' not found in the function declaration [-Wdocumentation]
     @param req a request object
            ^~~
  /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:465:11: warning: parameter 'databuf' not found in the function declaration [-Wdocumentation]
     @param databuf the data chunk to send as part of the reply.
            ^~~~~~~
  /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:467:11: warning: parameter 'call' not found in the function declaration [-Wdocumentation]
     @param call back's argument.
            ^~~~
  /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:939:4: warning: declaration is marked with '@deprecated' command but does not have a deprecation attribute [-Wdocumentation-deprecated-sync]
    @deprecated  This function is deprecated; you probably want to use
    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:946:1: note: add a deprecation attribute to the declaration to silence this warning
  char *evhttp_decode_uri(const char *uri);
  ^
  __AVAILABILITY_INTERNAL_DEPRECATED
  /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:979:5: warning: declaration is marked with '@deprecated' command but does not have a deprecation attribute [-Wdocumentation-deprecated-sync]
     @deprecated This function is deprecated as of Libevent 2.0.9.  Use
     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:987:1: note: add a deprecation attribute to the declaration to silence this warning
  int evhttp_parse_query(const char *uri, struct evkeyvalq *headers);
  ^
  __AVAILABILITY_INTERNAL_DEPRECATED
  /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:1002:11: warning: parameter 'query_parse' not found in the function declaration [-Wdocumentation]
     @param query_parse the query portion of the URI
            ^~~~~~~~~~~
  /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:1002:11: note: did you mean 'uri'?
     @param query_parse the query portion of the URI
            ^~~~~~~~~~~
            uri
  69 warnings generated.
  ```

  Note that a lot of these have already been fixed upstream.

ACKs for top commit:
  laanwj:
    Concept and code review ACK a4e970adb6de8425025ae3f62fb89d9e27a8ab1f
  practicalswift:
    cr ACK a4e970adb6de8425025ae3f62fb89d9e27a8ab1f: automatic compiler feedback comes sooner and is more reliable than manual reviewer feedback
  jonatack:
    Light ACK a4e970adb6de8425025ae3f62fb89d9e27a8ab1f skimmed the changes, clang 11 build is clean with the change, verified -Wdocumentation build warnings with this change when a doc fix was reverted

Tree-SHA512: 57a1e30cffcc8bcceee72d85f58ebe29eae525861c70acb237541bd480c51ede89875c033042c0af376fdbb49fb7f588ef9282a47c6e78f9d4501c41f1b21eb6
2024-07-13 00:41:25 +07:00
Kittywhiskers Van Gogh
f15e1db477
fix: make std::unary_function suppression flag no longer contingent on --enable-suppress-external-warnings
This is in line with how it's done in 880d4aaf upstream. This wasn't
noticed with CI as we build with `--enable-suppress-external-warnings`
by default.
2024-07-11 16:37:02 +00:00
Kittywhiskers Van Gogh
7ad0141d66
merge bitcoin#23947: use host_os instead of TARGET_OS in configure output 2024-06-25 13:39:57 +00:00
Kittywhiskers Van Gogh
9126006c18
merge bitcoin#20201: pkg-config related cleanup 2024-06-25 13:39:57 +00:00
Kittywhiskers Van Gogh
ef4b35060d
merge bitcoin#23269: remove redundant warning flags 2024-06-25 13:39:56 +00:00
Kittywhiskers Van Gogh
1fbdd009cd
merge bitcoin#21430: Add -Werror=implicit-fallthrough compile flag 2024-06-25 13:39:56 +00:00
Kittywhiskers Van Gogh
54be58b494
merge bitcoin#22845: improve check for ::(w)system 2024-06-25 13:22:13 +00:00
Kittywhiskers Van Gogh
abdf4d7b9f
build: use enough padding to match with labels in options printout 2024-06-25 13:22:12 +00:00
fanquake
eeec2f2799
Merge bitcoin/bitcoin#21884: fuzz: Remove unused --enable-danger-fuzz-link-all option
fa27d6d3ac065684a1219e9a948514d27929cf7c fuzz: Remove unused --enable-danger-fuzz-link-all option (MarcoFalke)

Pull request description:

  Remove the unused build option, which was *dangerous* (as the name implies). Also remove the fuzzbuzz config, which was never used as part of this repo and seems redundant now that we integrate with oss-fuzz.

ACKs for top commit:
  practicalswift:
    cr ACK fa27d6d3ac065684a1219e9a948514d27929cf7c: patch looks correct and rationale makes sense
  hebasto:
    ACK fa27d6d3ac065684a1219e9a948514d27929cf7c, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 9bd65ed6a76d13d8d9c7a88aaae30f701215d5d0619693a3115d5ec350808aaf6a1aa4737466a5b96f3948513ec4d063808fe16219818366720e247880a15177
2024-04-23 22:41:09 +07:00
Wladimir J. van der Laan
6ca0eb189e
Merge #21007: bitcoind: Add -daemonwait option to wait for initialization
e017a913d0d78ef0766cf73586fe7a38488e1a26 bitcoind: Add -daemonwait option to wait for initialization (Wladimir J. van der Laan)
c3e6fdee6d39d3f52dec421b48a0ac8bad5006f7 shutdown: Use RAII TokenPipe in shutdown (Wladimir J. van der Laan)
612f746a8ffa265b6877bedbbe21fcbb392f1516 util: Add RAII TokenPipe (Wladimir J. van der Laan)

Pull request description:

  This adds a `-daemonwait` flag that does the same as `-daemon` except that it, from a user perspective, backgrounds the process only after initialization is complete. This is similar to the behaviour of some other software such as c-lightning.

  This can be useful when the process launching bitcoind wants to guarantee that either the RPC server is running, or that initialization failed, before continuing. The exit code indicates the initialization result.

  The use of the libc function `daemon()` is replaced by a custom implementation which is inspired by the [glibc implementation](https://github.com/lattera/glibc/blob/master/misc/daemon.c#L44), but which also creates a pipe from the child to the parent process for communication.

  An additional advantage of having our own `daemon()` implementation is that no MACOS-specific pragmas are needed anymore to silence a deprecation warning.

  TODO:

  - [x] Factor out `token_read` and `token_write` to an utility, and use  them in `shutdown.cpp` as well—this is exactly the same kind of communication mechanism.

      - [x] RAII-ify pipe endpoints.

  - [x] Improve granularity of the `configure.ac` checks. This currently  still checks for the function `daemon()` which makes no sense as  it's not used. It should check for individual functions such as
    `fork()` and `setsid()` etc—the former being required, the second optional.

  - [-] ~~Signal propagation during initialization: if say, pressing Ctrl-C during `-daemonwait` it would be good to pass this SIGINT on to the child process instead of detaching the parent process and letting the child run free.~~ This is not necessary, see https://github.com/bitcoin/bitcoin/pull/21007#issuecomment-769007341.

  Future:

  - Consider if it makes sense to use this in the RPC tests (there would be no more need for "is RPC ready" polling loops). I think this is out of scope for this PR.

ACKs for top commit:
  jonatack:
    Tested ACK e017a913d0d78ef0766cf73586fe7a38488e1a26 checked change since previous review is move-only

Tree-SHA512: 53369b8ca2247e4cf3af8cb2cfd5b3399e8e0e3296423d64be987004758162a7ddc1287b01a92d7692328edcb2da4cf05d279b1b4ef61a665b71440ab6a6dbe2
2024-04-22 09:42:16 -05:00
Wladimir J. van der Laan
318c7263d0
Merge #19522: build: fix building libconsensus with reduced exports for Darwin targets
de4238f92f4c067f099663f68d9772105de81d75 build: consolidate reduced export checks (fanquake)
012bdec1b7df01906566a6526e56f27d57d1653b build: add building libconsensus to end-of-configure output (fanquake)
8f360e349e365870b40a6873917c81de714ae41a build: remove ax_gcc_func_attribute macro (fanquake)
f054a089ecfbdc4732e6f705a10e93189074f41c build: remove AX_GCC_FUNC_ATTRIBUTE test for dllimport (fanquake)
7cd0a696643a824ab6f6911278f116f01c5af662 build: test for __declspec(dllexport) in configure (fanquake)
1624e17b5430dfe808bb3b1b79dfa53bf45aa053 build: remove duplicate visibility attribute detection (fanquake)

Pull request description:

  Darwin targets do not have a `protected` visibility function attribute, see [LLVM explanation](8e9a505139/clang/lib/Basic/Targets/OSTargets.h (L131)). This means that the `AX_GCC_FUNC_ATTRIBUTE` check for `visibility` fails:
  ```bash
  configure:24513: checking for __attribute__((visibility))
  configure:24537: g++ -std=c++11 -o conftest -g -O2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0  -Wl,-headerpad_max_install_names conftest.cpp  >&5
  conftest.cpp:35:56: warning: target does not support 'protected' visibility; using 'default' [-Wunsupported-visibility]
                      int foo_pro( void ) __attribute__((visibility("protected")));
                                                         ^
  1 warning generated.
  configure:24537: $? = 0
  configure:24550: result: no
  ```

  This leads to `EXPORT_SYMBOL` being [defined to nothing](f4de89edfa/src/script/bitcoinconsensus.h (L29)), as `HAVE_FUNC_ATTRIBUTE_VISIBILITY` is not defined, and when building with reduced exports, you end up with a libbitcoinconsensus.dylib that doesn't export any  `_bitcoinconsensus_*` symbols.
  ```bash
  ➜  git:(master) nm -C src/.libs/libbitcoinconsensus.dylib | rg _bitcoinconsensus_
  ➜  git:(master)
  ```

  We do have a [second check](f4de89edfa/configure.ac (L882)) for the `visibility` attribute, which works for Darwin as it's only testing for default visibility, however the result of this check isn't used at all. It was added in #4725, along with the `--enable-reduce-exports` option, however when libbitcoinconsensus was added in #5235, it used the results of the added `AX_GCC_FUNC_ATTRIBUTE` calls.

  This PR removes our usage of the AX_GCC_FUNC_ATTRIBUTE macro entirely, in favour of our own checks in configure. This meant adding a check for `dllexport`, which I've tested as working with both [GCC](https://gcc.gnu.org/onlinedocs/gcc/Microsoft-Windows-Function-Attributes.html) and [Clang](https://releases.llvm.org/10.0.0/tools/clang/docs/AttributeReference.html#dllexport) when building for Windows. I haven't added an equivalent check for `dllimport`, as we weren't actually using the result of that check, we're just testing that `MSC_VER` was defined before using.

  With these changes building a libbitcoinconsensus with reduced exports, when targeting Darwin, works as expected:
  ```bash
  ./autogen.sh
  ./configure --disable-tests --disable-bench --with-utils=no --with-daemon=no --with-gui=no --disable-wallet --with-libs=yes --enable-reduce-exports
  make -j8
  ...
  nm -C src/.libs/libbitcoinconsensus.dylib | rg _bitcoinconsensus_
  000000000000a340 T _bitcoinconsensus_verify_script
  00000000000097e0 T _bitcoinconsensus_verify_script_with_amount
  000000000000a3c0 T _bitcoinconsensus_version
  ```

  ```python
  >>> import ctypes
  >>> consensus = ctypes.CDLL("src/.libs/libbitcoinconsensus.dylib")
  >>> print(consensus.bitcoinconsensus_version())
  1
  >>> exit()
  ```

  TODO: Modify a CI job to compile with --enable-reduce-exports and check for symbols in shared lib?

ACKs for top commit:
  laanwj:
    Code review ACK de4238f92f4c067f099663f68d9772105de81d75

Tree-SHA512: d148f3c55d14dac6e9e5b718cc65bb557bcf6f663218d24bc9044b86281bd5dd3d931ebea79c336a58e8ed50d683218c0a9e75494f2267b91097665043e252ae
2024-04-11 02:25:06 +07:00
pasta
ef8c951eb0
chore: bump version to v21.0.0; allow breaking changes from here out 2024-03-05 12:09:15 -06:00
laanwj
6af409da1a
Merge bitcoin/bitcoin#25425: build: Fix ::_wsystem check
b5f6a4650334d58245b45eace57f2bc23467ffc7 build: Fix `::_wsystem` check (Hennadii Stepanov)

Pull request description:

  The `::_wsystem` check has been introduced in bitcoin/bitcoin#15457, and it is broken.

  An excerpt from `config.log` for `./autogen.sh && ./configure CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site` on master (a09033e22c4f072c86a1885dd476f3059e5416d1):
  ```
  configure:29111: checking for ::_wsystem
  configure:29125: x86_64-w64-mingw32-g++-posix -std=c++17 -o conftest.exe -pipe -std=c++17 -O2  -I/home/hebasto/git/bitcoin/depends/x86_64-w64-mingw32/include/  -L/home/hebasto/git/bitcoin/depends/x86_64-w64-mingw32/lib  conftest.cpp -lssp -liphlpapi -lshlwapi -lws2_32 -ladvapi32 -luuid -loleaut32 -lole32 -lcomctl32 -lshell32 -lwinmm -lcomdlg32 -lgdi32 -luser32 -lkernel32  >&5
  conftest.cpp: In function 'int main()':
  conftest.cpp:81:15: error: '::_wsystem' has not been declared
     81 |  int nErr = ::_wsystem("");
        |               ^~~~~~~~
  configure:29125: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME "Bitcoin Core"
  | #define PACKAGE_TARNAME "bitcoin"
  | #define PACKAGE_VERSION "23.99.0"
  | #define PACKAGE_STRING "Bitcoin Core 23.99.0"
  | #define PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues"
  | #define PACKAGE_URL "https://bitcoincore.org/"
  | #define HAVE_CXX17 1
  | #define HAVE_STDIO_H 1
  | #define HAVE_STDLIB_H 1
  | #define HAVE_STRING_H 1
  | #define HAVE_INTTYPES_H 1
  | #define HAVE_STDINT_H 1
  | #define HAVE_STRINGS_H 1
  | #define HAVE_SYS_STAT_H 1
  | #define HAVE_SYS_TYPES_H 1
  | #define HAVE_UNISTD_H 1
  | #define STDC_HEADERS 1
  | #define LT_OBJDIR ".libs/"
  | #define USE_ASM 1
  | #define HAVE_CLMUL 1
  | #define ENABLE_SSE41 1
  | #define ENABLE_AVX2 1
  | #define ENABLE_X86_SHANI 1
  | #define HAVE_LIBKERNEL32 1
  | #define HAVE_LIBUSER32 1
  | #define HAVE_LIBGDI32 1
  | #define HAVE_LIBCOMDLG32 1
  | #define HAVE_LIBWINMM 1
  | #define HAVE_LIBSHELL32 1
  | #define HAVE_LIBCOMCTL32 1
  | #define HAVE_LIBOLE32 1
  | #define HAVE_LIBOLEAUT32 1
  | #define HAVE_LIBUUID 1
  | #define HAVE_LIBADVAPI32 1
  | #define HAVE_LIBWS2_32 1
  | #define HAVE_LIBSHLWAPI 1
  | #define HAVE_LIBIPHLPAPI 1
  | #define HAVE_PTHREAD_PRIO_INHERIT 1
  | #define HAVE_PTHREAD 1
  | #define _FILE_OFFSET_BITS 64
  | #define HAVE_DECL_STRERROR_R 0
  | #define HAVE_LIBSSP 1
  | #define HAVE_STDIO_H 1
  | #define HAVE_STDLIB_H 1
  | #define HAVE_UNISTD_H 1
  | #define HAVE_STRINGS_H 1
  | #define HAVE_SYS_TYPES_H 1
  | #define HAVE_SYS_STAT_H 1
  | #define HAVE_DECL_GETIFADDRS 0
  | #define HAVE_DECL_FREEIFADDRS 0
  | #define HAVE_DECL_FORK 0
  | #define HAVE_DECL_SETSID 0
  | #define HAVE_DECL_PIPE2 0
  | #define HAVE_DECL_LE16TOH 0
  | #define HAVE_DECL_LE32TOH 0
  | #define HAVE_DECL_LE64TOH 0
  | #define HAVE_DECL_HTOLE16 0
  | #define HAVE_DECL_HTOLE32 0
  | #define HAVE_DECL_HTOLE64 0
  | #define HAVE_DECL_BE16TOH 0
  | #define HAVE_DECL_BE32TOH 0
  | #define HAVE_DECL_BE64TOH 0
  | #define HAVE_DECL_HTOBE16 0
  | #define HAVE_DECL_HTOBE32 0
  | #define HAVE_DECL_HTOBE64 0
  | #define HAVE_DECL_BSWAP_16 0
  | #define HAVE_DECL_BSWAP_32 0
  | #define HAVE_DECL_BSWAP_64 0
  | #define HAVE_BUILTIN_CLZL 1
  | #define HAVE_BUILTIN_CLZLL 1
  | #define HAVE_DEFAULT_VISIBILITY_ATTRIBUTE 1
  | #define HAVE_DLLEXPORT_ATTRIBUTE 1
  | #define HAVE_FDATASYNC 0
  | #define HAVE_O_CLOEXEC 0
  | /* end confdefs.h.  */
  |
  | int
  | main (void)
  | {
  |  int nErr = ::_wsystem("");
  |
  |   ;
  |   return 0;
  | }
  configure:29130: result: no
  ```

  See https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/system-wsystem

ACKs for top commit:
  laanwj:
    Code review ACK b5f6a4650334d58245b45eace57f2bc23467ffc7

Tree-SHA512: 30cadb7e2e2e3885955ba72c2c27c5dfef2f1b0a9e02e7e811d9bd7cb2c380bab77ca9df3a476d83105de3fa01d043f995e3680b7bff5e7c33829d281b67f374
2024-02-27 10:02:43 -06:00
laanwj
99402584d7
Merge bitcoin/bitcoin#25332: build: test for timingsafe_bcmp
491bb14c0c9cf040154d57e246206ffb2f86a7e5 build: test for timingsafe_bcmp (fanquake)

Pull request description:

  Code introduced in #15649 added usage of [`timingsafe_bcmp()`](https://man.openbsd.org/timingsafe_bcmp.3), if
  available, otherwise falling back to our own implementation. However
  the relevant build system check was never added, so currently, we'll
  always just use our implementation, as `HAVE_TIMINGSAFE_BCMP` will never
  be defined.

  Add the check for `timingsafe_bcmp`. Note that as far as I'm aware, it's
  only available on OpenBSD.

  c3daa321f9/src/crypto/chacha_poly_aead.cpp (L16-L28)

  Guix Build (x86_64):
  ```bash
  0a890839e3de040e084d4df6aeabd924f6c6b04e724d7d2a87ef366d5493ac94  guix-build-491bb14c0c9c/output/aarch64-linux-gnu/SHA256SUMS.part
  fd5e1c4531f1739d63e8d552495c24c044ce9ddd34a424d6da1317830e625527  guix-build-491bb14c0c9c/output/aarch64-linux-gnu/bitcoin-491bb14c0c9c-aarch64-linux-gnu-debug.tar.gz
  551f58234ba5acf5c5125df85fccb49f8536399d2a1b7126848e4709b7edb61e  guix-build-491bb14c0c9c/output/aarch64-linux-gnu/bitcoin-491bb14c0c9c-aarch64-linux-gnu.tar.gz
  5a6f7630d36af7e4317f660232c52a5c8c983b1999f57e176a628d83a5eb7b4a  guix-build-491bb14c0c9c/output/arm-linux-gnueabihf/SHA256SUMS.part
  d1eba598d69498e899663cfcba295747ac5808218157adaca79d45459aac8ecf  guix-build-491bb14c0c9c/output/arm-linux-gnueabihf/bitcoin-491bb14c0c9c-arm-linux-gnueabihf-debug.tar.gz
  1e2559a99b89770501308416edc6cfeec94bfea9e9cadb6b64a4df7a487350d1  guix-build-491bb14c0c9c/output/arm-linux-gnueabihf/bitcoin-491bb14c0c9c-arm-linux-gnueabihf.tar.gz
  bc961b8b930df8123a6cad1c55f250658ea600d4a617ec4fceec2bfc28ec779f  guix-build-491bb14c0c9c/output/arm64-apple-darwin/SHA256SUMS.part
  f65118d324a8c1a3d80190dc0a80a2175b116a5ef5b0d977e8ffeaa7a8114851  guix-build-491bb14c0c9c/output/arm64-apple-darwin/bitcoin-491bb14c0c9c-arm64-apple-darwin-unsigned.dmg
  d27cd6193b1b5ecdab50d1fe2b4c3d0bfba04813506ecf63e27a6e9edb32913e  guix-build-491bb14c0c9c/output/arm64-apple-darwin/bitcoin-491bb14c0c9c-arm64-apple-darwin-unsigned.tar.gz
  76fc93a9c11909a826c9bd310ae4a70dc2083b96540c875d9cfb3b31bb86dd3e  guix-build-491bb14c0c9c/output/arm64-apple-darwin/bitcoin-491bb14c0c9c-arm64-apple-darwin.tar.gz
  43f157994432c16cfd481de2ce4894f7c241a0b87ce3797ffc492e219ed00c19  guix-build-491bb14c0c9c/output/dist-archive/bitcoin-491bb14c0c9c.tar.gz
  d04bc01a7b207e2d9e833ef4399d5daa789f5d7476df3915f426ea1c71578cb5  guix-build-491bb14c0c9c/output/powerpc64-linux-gnu/SHA256SUMS.part
  d815ab7157ca87a51c0c08907ba76f6bcec11cf9c0db77c2fd2885bf78796f97  guix-build-491bb14c0c9c/output/powerpc64-linux-gnu/bitcoin-491bb14c0c9c-powerpc64-linux-gnu-debug.tar.gz
  9f912bedf53d6921cf10f48569fb74ef4f42c8571fb976b50e67a64f6754833c  guix-build-491bb14c0c9c/output/powerpc64-linux-gnu/bitcoin-491bb14c0c9c-powerpc64-linux-gnu.tar.gz
  0651ed89f9a7cd4a4a196a48b330aec82f6ca1df5d842e6da863a87ae69f57f4  guix-build-491bb14c0c9c/output/powerpc64le-linux-gnu/SHA256SUMS.part
  4c5f1ea788580a99318dc91cb3ac51f11829163a5821a01d90459911b0ff791d  guix-build-491bb14c0c9c/output/powerpc64le-linux-gnu/bitcoin-491bb14c0c9c-powerpc64le-linux-gnu-debug.tar.gz
  61c91db6b7f34d43292b6e0c0a1e4bd5f6e2d532df835410daca337cf94c66af  guix-build-491bb14c0c9c/output/powerpc64le-linux-gnu/bitcoin-491bb14c0c9c-powerpc64le-linux-gnu.tar.gz
  be4d94e812c02a3955343d7a92a26deff9ced37aada049fd328118e01a8e3c53  guix-build-491bb14c0c9c/output/riscv64-linux-gnu/SHA256SUMS.part
  d73589e28311c8b442bb873d233181988f79d728965ccef395b19683b78203e9  guix-build-491bb14c0c9c/output/riscv64-linux-gnu/bitcoin-491bb14c0c9c-riscv64-linux-gnu-debug.tar.gz
  a1b15c96fcc936928aa183e7b06552c68a2dd5d178122394c3ed2cbd3f07ab2f  guix-build-491bb14c0c9c/output/riscv64-linux-gnu/bitcoin-491bb14c0c9c-riscv64-linux-gnu.tar.gz
  2d608c6b79be12cdc179e5e6414ea21d06d8b2816e098fbdb4e929b8f9338fa5  guix-build-491bb14c0c9c/output/x86_64-apple-darwin/SHA256SUMS.part
  ce11298ab92f388bd43ff2c6cb8c07c777dab44f0f6ea93b909805552bafd20d  guix-build-491bb14c0c9c/output/x86_64-apple-darwin/bitcoin-491bb14c0c9c-x86_64-apple-darwin-unsigned.dmg
  5d0626fc72d473157376efe0736f4d2b5836a5394a4869368bc65bf9d264d238  guix-build-491bb14c0c9c/output/x86_64-apple-darwin/bitcoin-491bb14c0c9c-x86_64-apple-darwin-unsigned.tar.gz
  d9f250bb45c4663f8160b7d22c1ccde8f1abad62dc6667e01fe71d577f00e9f9  guix-build-491bb14c0c9c/output/x86_64-apple-darwin/bitcoin-491bb14c0c9c-x86_64-apple-darwin.tar.gz
  72b3afe2d6124598eddbeed8d0799a8bd23536b4a3e4611162094601c75b923e  guix-build-491bb14c0c9c/output/x86_64-linux-gnu/SHA256SUMS.part
  eef6c0928762c77a23b485b55c350660b111ffdf3446825648d7da05e5e681eb  guix-build-491bb14c0c9c/output/x86_64-linux-gnu/bitcoin-491bb14c0c9c-x86_64-linux-gnu-debug.tar.gz
  a130d87e851f0192bf89dd5ecbe52d63231ce5dbbf584d1e4fb33a36ebb8bf7a  guix-build-491bb14c0c9c/output/x86_64-linux-gnu/bitcoin-491bb14c0c9c-x86_64-linux-gnu.tar.gz
  0f00372e30ea12ca9d16d70c4905b6b8492464987bb6b272ed4f9a945941d6b9  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/SHA256SUMS.part
  2852dff8d38ef6eee759bf9fe717a4288db46c300f061acb3212cd1499607d8d  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/bitcoin-491bb14c0c9c-win64-debug.zip
  ef087e9d6160e183f6ef6d64f9141b499e893d88705be5d1426ced6c49531c18  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/bitcoin-491bb14c0c9c-win64-setup-unsigned.exe
  79392686b9f5781275e346badf8d7166baa0b4f2c0037ddd6df0b4bc23eaedf6  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/bitcoin-491bb14c0c9c-win64-unsigned.tar.gz
  da8c9f6922bdab660dfbd757ec89ce7a2493bf1d02e32172b77c1a21b09daaa9  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/bitcoin-491bb14c0c9c-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  ff7afe1f43ac18df89cf1932568b0713f6f22fd2b449a4a87f9aebf404449897  guix-build-491bb14c0c9c/output/arm-linux-gnueabihf/SHA256SUMS.part
  5e727cc3273615e6f75c6e15bc004946ab7494ee169ecf830f23290cf6f5c3de  guix-build-491bb14c0c9c/output/arm-linux-gnueabihf/bitcoin-491bb14c0c9c-arm-linux-gnueabihf-debug.tar.gz
  4aff5487b129dc483780646994246890a5917c8956980ec52682accfe5a0d02e  guix-build-491bb14c0c9c/output/arm-linux-gnueabihf/bitcoin-491bb14c0c9c-arm-linux-gnueabihf.tar.gz
  cabfeb29771017dfde35a1c8f08c7066255ad84a05d6d565cfcf852a5d869d16  guix-build-491bb14c0c9c/output/arm64-apple-darwin/SHA256SUMS.part
  99360c7135967e1d9709830abcc8f5b6ebc7bc37c5be0eac1ddebe0ce5dbe344  guix-build-491bb14c0c9c/output/arm64-apple-darwin/bitcoin-491bb14c0c9c-arm64-apple-darwin-unsigned.dmg
  9caa58d1efe18c7ad68fec2a71455ade61939f32ae2da0b0457b459204227046  guix-build-491bb14c0c9c/output/arm64-apple-darwin/bitcoin-491bb14c0c9c-arm64-apple-darwin-unsigned.tar.gz
  d9b0ad26346869aa6a4229aa77796535f68880fc50f8b7b7a4297f2e14d2e3ad  guix-build-491bb14c0c9c/output/arm64-apple-darwin/bitcoin-491bb14c0c9c-arm64-apple-darwin.tar.gz
  43f157994432c16cfd481de2ce4894f7c241a0b87ce3797ffc492e219ed00c19  guix-build-491bb14c0c9c/output/dist-archive/bitcoin-491bb14c0c9c.tar.gz
  e2f95f50ae973cef815731485be6b917f39eea92ef4e93fa63aa1ad6cb52a3c9  guix-build-491bb14c0c9c/output/powerpc64-linux-gnu/SHA256SUMS.part
  452f3091a1e841920e958f14f1650e94b3a61cb430cb99930fb5941d8a8aad3d  guix-build-491bb14c0c9c/output/powerpc64-linux-gnu/bitcoin-491bb14c0c9c-powerpc64-linux-gnu-debug.tar.gz
  a371cee3dae3d5cf5ca792b58a1bb492a6a6147e0b515e69869d3543edbeaea5  guix-build-491bb14c0c9c/output/powerpc64-linux-gnu/bitcoin-491bb14c0c9c-powerpc64-linux-gnu.tar.gz
  89153f4b6a3bc6d47787c4d63b57e1dade8116822abb547fc1759c84e6ff6fa2  guix-build-491bb14c0c9c/output/powerpc64le-linux-gnu/SHA256SUMS.part
  9f51353abe7b6154a48da5db3fce29d2dac1dbe9a6c78aade1b9e1b6b12370fa  guix-build-491bb14c0c9c/output/powerpc64le-linux-gnu/bitcoin-491bb14c0c9c-powerpc64le-linux-gnu-debug.tar.gz
  25b21eb2d8e3982dac5e1510b78339b7c4bddf164b986c929036369e403ddadd  guix-build-491bb14c0c9c/output/powerpc64le-linux-gnu/bitcoin-491bb14c0c9c-powerpc64le-linux-gnu.tar.gz
  92c4c404f7355897bca4ba7e38a908828da73617cac7b0fbd89952ce20859d83  guix-build-491bb14c0c9c/output/riscv64-linux-gnu/SHA256SUMS.part
  230361b5a493b3ac17780b3d5496cc10a37d3345b96874b04092c06aab36cb0d  guix-build-491bb14c0c9c/output/riscv64-linux-gnu/bitcoin-491bb14c0c9c-riscv64-linux-gnu-debug.tar.gz
  d8110e6d738a40ccd076cbd286557931b2a433e27c8defcc496ac56f60fe5327  guix-build-491bb14c0c9c/output/riscv64-linux-gnu/bitcoin-491bb14c0c9c-riscv64-linux-gnu.tar.gz
  2d608c6b79be12cdc179e5e6414ea21d06d8b2816e098fbdb4e929b8f9338fa5  guix-build-491bb14c0c9c/output/x86_64-apple-darwin/SHA256SUMS.part
  ce11298ab92f388bd43ff2c6cb8c07c777dab44f0f6ea93b909805552bafd20d  guix-build-491bb14c0c9c/output/x86_64-apple-darwin/bitcoin-491bb14c0c9c-x86_64-apple-darwin-unsigned.dmg
  5d0626fc72d473157376efe0736f4d2b5836a5394a4869368bc65bf9d264d238  guix-build-491bb14c0c9c/output/x86_64-apple-darwin/bitcoin-491bb14c0c9c-x86_64-apple-darwin-unsigned.tar.gz
  d9f250bb45c4663f8160b7d22c1ccde8f1abad62dc6667e01fe71d577f00e9f9  guix-build-491bb14c0c9c/output/x86_64-apple-darwin/bitcoin-491bb14c0c9c-x86_64-apple-darwin.tar.gz
  de7a52a67f243b6db1086c2ab2cc3f01784d38b43b7aaf795b7713c33799ab62  guix-build-491bb14c0c9c/output/x86_64-linux-gnu/SHA256SUMS.part
  88228ef3007e81ade481d0c3fa757ac3ae86bda50aeef2631335c5d54fb4194c  guix-build-491bb14c0c9c/output/x86_64-linux-gnu/bitcoin-491bb14c0c9c-x86_64-linux-gnu-debug.tar.gz
  b1f2ddf50658f4d1bd0667cc16502f9a45d9e0eef4c1d103cd7780cebfc2766d  guix-build-491bb14c0c9c/output/x86_64-linux-gnu/bitcoin-491bb14c0c9c-x86_64-linux-gnu.tar.gz
  f0cc08231ed964fcb4f2c5a697c52160dad8ed374f8d9537eb7f2ca9f47e7b2c  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/SHA256SUMS.part
  d9c49c031bde4f80e63955fdeb14a7fb8f74a27d09bcf01881648917df10a836  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/bitcoin-491bb14c0c9c-win64-debug.zip
  ef087e9d6160e183f6ef6d64f9141b499e893d88705be5d1426ced6c49531c18  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/bitcoin-491bb14c0c9c-win64-setup-unsigned.exe
  79392686b9f5781275e346badf8d7166baa0b4f2c0037ddd6df0b4bc23eaedf6  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/bitcoin-491bb14c0c9c-win64-unsigned.tar.gz
  1d76ceae8c3feef573d4e60fe6c7be5f3bea4afd3994ddc16759d8b381767015  guix-build-491bb14c0c9c/output/x86_64-w64-mingw32/bitcoin-491bb14c0c9c-win64.zip
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 491bb14c0c9cf040154d57e246206ffb2f86a7e5
  theStack:
    ACK 491bb14c0c9cf040154d57e246206ffb2f86a7e5

Tree-SHA512: 50d273706e92016783f6a9d552f56b703c3c26ec2f0fafb9a0d1c1047456eee7c08e76ebc57077d2ecf95aaf5a3804c88a629a2e02a48c8be91b87ffa44cdb3e
2024-02-22 20:58:45 -06:00
Konstantin Akimov
c75fff6454
docs: update license year range to 2024 (#5890)
## What was done?
Happy new year and happy new lunar year!
2024 is here and 20.1 is coming.

## Breaking Changes
N/A

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
2024-02-22 20:56:43 -06:00
Kittywhiskers Van Gogh
24ae76cc19
merge bitcoin#24336: Print enable_fuzz_binary in configure 2024-02-06 08:39:54 -06:00
Kittywhiskers Van Gogh
d9f01c3c9f
build: fix indentation for test, fuzz and bench option print 2024-02-06 08:39:48 -06:00
Wladimir J. van der Laan
0e90ea8fff
Merge #21182: build: remove mostly pointless BOOST_PROCESS macro
7bf04e358a6550ac9851f1b2d87795927fc5ff4b build: remove mostly pointless BOOST_PROCESS macro (fanquake)

Pull request description:

  Performing a series of link checks for a Boost component that is
  header-only doesn't make much sense, and currently means we just have
  another confusing Boost macro in our tree. I'm not sure why this was
  originally done this way; maybe Sjors or luke-jr can elaborate (#15382 (929cda5470f98d1ef85c05b1cad4e2fb9227e3b0))?

  The macro also has the side-effect of producing confusing error
  messages. i.e in #20744, the CI is currently failing with:
  ```bash
  checking for boostlib >= 1.58.0 (105800) lib path in "/tmp/cirrus-ci-build/depends/x86_64-pc-linux-gnu/lib"... yes
  checking for boostlib >= 1.58.0 (105800)... yes
  checking whether the Boost::Process library is available... yes
  configure: error: Could not find a version of the Boost::Process library!
  ```

  This isn't useful, given there is no such thing as a `Boost::Process` library.

  This PR just removes the macro entirely, but maintains a `--with-boost-process`
  (defaulting to off), flag to configure. Hopefully this will also be
  removed, in favour of `--enable/disable-external-signer` if/when #16546
  is merged.

ACKs for top commit:
  laanwj:
    ACK 7bf04e358a6550ac9851f1b2d87795927fc5ff4b

Tree-SHA512: b270a0250f32df2078f986c165b8977967d8c06df80bf2773f3442f74b395a3bfa6544af1024d9b6524d90d47a0f6304194b3aced0e2ecb88e75916da945ccb6
2024-02-01 09:22:04 -06:00
Samuel Dobson
209c48a90a
Merge #15382: util: add RunCommandParseJSON
31cf68a3ad1f0a5537c8419e2912b55fbfb88fa0 [util] add RunCommandParseJSON (Sjors Provoost)
c17f54ee535faaedf9033717403e1f775b5f1530 [ci] use boost::process (Sjors Provoost)
32128ba682033560d6eb2e4848a9f77a842016d2 [doc] include Doxygen comments for HAVE_BOOST_PROCESS (Sjors Provoost)
3c84d85f7d218fa27e9343c5cd1a55e519218980 [build] msvc: add boost::process (Sjors Provoost)
c47e4bbf0b44f2de1278f9538124ec98ee0815bb [build] make boost-process opt-in (Sjors Provoost)
929cda5470f98d1ef85c05b1cad4e2fb9227e3b0 configure: add ax_boost_process (Sjors Provoost)
8314c23d7b39fc36dde8b40b03b6efbe96f85698 [depends] boost: patch unused variable in boost_process (Sjors Provoost)

Pull request description:

  Prerequisite for external signer support in #16546. Big picture overview in [this gist](https://gist.github.com/Sjors/29d06728c685e6182828c1ce9b74483d).

  This adds a new dependency [boost process](https://github.com/boostorg/process/tree/boost-1.64.0). This is part of Boost since 1.64 which is part of `depends`. Because the minimum Boost version is 1.47, this functionality is skipped for older versions of Boost.

  Use `./configure --with-boost-process` to opt in, which checks for the presence of Boost::Process.

  We add `UniValue runCommandParseJSON(const std::string& strCommand)` to `system.{h,cpp}` which calls an arbitrary command and processes the JSON returned by it. This is currently only called by the test suite.

  ~For testing purposes this adds a new regtest-only RPC method `runcommand`, as well as `test/mocks/command.py` used by functional tests.~ (this is no longer the case)

  TODO:
  - [ ] review boost process in #15440

ACKs for top commit:
  achow101:
    ACK 31cf68a3ad1f0a5537c8419e2912b55fbfb88fa0
  hebasto:
    re-ACK 31cf68a3ad1f0a5537c8419e2912b55fbfb88fa0, only rebased (verified with `git range-diff`) and removed an unintentional tab character since the [previous](https://github.com/bitcoin/bitcoin/pull/15382#pullrequestreview-458371035) review.
  meshcollider:
    Very light utACK 31cf68a3ad1f0a5537c8419e2912b55fbfb88fa0, although I am not very confident with build stuff.
  promag:
    Code review ACK 31cf68a3ad1f0a5537c8419e2912b55fbfb88fa0, don't mind the nit.
  ryanofsky:
    Code review ACK 31cf68a3ad1f0a5537c8419e2912b55fbfb88fa0. I left some comments below that could be ignored or followed up later. The current change is clean and comprehensive.

Tree-SHA512: c506e747014b263606e1f538ed4624a8ad7bcf4e025cb700c12cc5739964e254dc04a2bbb848996b170e2ccec3fbfa4fe9e2b3976b191222cfb82fc3e6ab182d
2024-02-01 09:22:03 -06:00
Wladimir J. van der Laan
54501fb5fb
Merge #19403: build: improve __builtin_clz* detection
9952242c03fe587b5dff46a9f770e319146103bf build: improve builtin_clz* detection (fanquake)

Pull request description:

  Fixes #19402.

  The way we currently test for `__builtin_clz*` support with `AC_CHECK_DECLS` does not work with Clang:
  ```bash
  configure:21492: clang++-10 -std=c++11 -c -g -O2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS conftest.cpp >&5
  conftest.cpp💯10: error: builtin functions must be directly called
    (void) __builtin_clz;
           ^
  1 error generated.
  ```

  This also removes the `__builtin_clz()` check, as we don't actually use it anywhere, and it's trvial to re-add detection if we do start using it at some point. If this is controversial then I'll add a test for it as well.

ACKs for top commit:
  sipa:
    ACK 9952242c03fe587b5dff46a9f770e319146103bf
  laanwj:
    ACK 9952242c03fe587b5dff46a9f770e319146103bf

Tree-SHA512: 695abb1a694a01a25aaa483b4fffa7d598842f2ba4fe8630fbed9ce5450b915c33bf34bb16ad16a16b702dd7c91ebf49fe509a2498b9e28254fe0ec5177bbac0
2024-01-16 15:05:08 -06:00
Wladimir J. van der Laan
1835af9b36
Merge #20549: Support make src/bitcoin-node and src/bitcoin-gui
206f74e88cfa343d228c1d6596d3846863824ca5 Support make src/bitcoin-node and src/bitcoin-gui (João Barbosa)

Pull request description:

  This change adds the following configure output variables
  ```
  dnl Multi Process
  BITCOIN_MP_NODE_NAME=bitcoin-node
  BITCOIN_MP_GUI_NAME=bitcoin-gui
  ```
  and adds support for
  ```sh
  make src/bitcoin-node src/bitcoin-gui
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 206f74e88cfa343d228c1d6596d3846863824ca5

Tree-SHA512: 4d1a694b9010ecc267ee955f4475127a58e6da72f30179ec740285ee6fe03cd91dcb6847317a47460dbd548edb88b7da6c7a98eac10f0dabe3ce4e83e0aa8093
2024-01-16 09:34:27 -06:00
fanquake
e94b98175c
Merge #18307: build: Require pkg-config for all of the hosts
92bc268e4af4ebcbde08567ea00e019ac509a769 build: Detect missed pkg-config early (Hennadii Stepanov)
1739eb23d8a6d272e70f95342323b6fe48b8eb6c build: Drop unused use_pkgconfig variable (Hennadii Stepanov)
a661449a2eeaf88efda36b6a84084dcbfe5b24eb build: Drop use_pkgconfig check for libmultiprocess check (Hennadii Stepanov)
90b95e7929463d6127c1b24fe1bf457d750a045c build: Drop dead non-pkg-config code for libevent check (Hennadii Stepanov)
44a14afbb889633a6c9a322a5aeca2e1b2cbdbd8 build: Drop dead non-pkg-config code for qrencode check (Hennadii Stepanov)
10cbae0c399302b0f8b1aa847c4246ba60bf25ee build: Drop dead non-pkg-config code for ZMQ check (Hennadii Stepanov)
06cfc9cadf7c5dd43147e6525a348d5f2d299422 build: Fix indentation in UNIVALUE check (Hennadii Stepanov)
6fd2118e777d11cbc81a45313d1a7d6400e34f3f build: Drop dead non-pkg-config code for UNIVALUE check (Hennadii Stepanov)
e9edbe4dbd8c24a779de7d92e5f10c870aab5511 build: Always use pkg-config (Hennadii Stepanov)
9e2e753b0605c8cd826381a362f0c7de56eea81f build: Always define ZMQ_STATIC for MinGW (Hennadii Stepanov)

Pull request description:

  This PR:
  - is based on #18297 (already merged)
  - drops all of the non-pkg-config paths from the `configure` script

  Ref: #17768

ACKs for top commit:
  fanquake:
    ACK 92bc268e4af4ebcbde08567ea00e019ac509a769. I re-gitian-built. There are a couple follow-ups that I'll PR shortly. Thanks for addressing my feedback above. I took too long to get back to this.
  laanwj:
    ACK 92bc268e4af4ebcbde08567ea00e019ac509a769

Tree-SHA512: 83c2d9cf03518867a1ebf7e26a8fc5b6dd8962ef983fe0d84e0c7eb74717f4c36a834da02faf0e503ffd87167005351671cf040c0d4ddae57ee152a6ff84012b
2024-01-16 09:34:27 -06:00
fanquake
098d0fd430
Merge #18677: Multiprocess build support
e2bab2aa162ae38b2bf8195b577c982402fbee9d multiprocess: add multiprocess travis configuration (Russell Yanofsky)
603fd6a2e708c04ef6c9880f89d0a4cbaa6fc7c5 depends: add MULTIPROCESS depends option (Russell Yanofsky)
5d1377b52bfcd4edf8553aaf332bfeb92fc554cc build: multiprocess autotools changes (Russell Yanofsky)

Pull request description:

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10).

  ---

  This PR consists of build changes only. It adds an `--enable-multiprocess` autoconf option (off by default and marked experimental), that builds new `bitcoin-node` and `bitcoin-gui` binaries. These currently function the same as existing `bitcoind` and `bitcoin-qt` binaries, but are extended in #10102 with IPC features to execute node, wallet, and gui functions in separate processes.

  In addition to adding the `--enable-multiprocess` config flag, it also adds a depends package and autoconf rules to build with the [libmultiprocess](https://github.com/chaincodelabs/libmultiprocess) library, and it adds new travis configuration to exercise the build code and run functional tests with the new binaries.

  The changes in this PR were originally part of #10102 but were moved into #16367 to be able to develop and review the multiprocess build changes independently of the code changes. #16367 was briefly merged and then reverted in #18588. Only change since #16367 has been dropping the `native_boost.mk` depends package which was pointed out to be no longer necessary in https://github.com/bitcoin/bitcoin/pull/16367#issuecomment-596484337 and https://github.com/bitcoin/bitcoin/pull/18588#pullrequestreview-391765649

ACKs for top commit:
  practicalswift:
    ACK e2bab2aa162ae38b2bf8195b577c982402fbee9d
  Sjors:
    tACK e2bab2aa162ae38b2bf8195b577c982402fbee9d on macOS 10.15.4
  hebasto:
    ACK e2bab2aa162ae38b2bf8195b577c982402fbee9d, tested on Linux Mint 19.3 (x86_64):

Tree-SHA512: b5a76eab5abf63d9d8b6d628cbdff4cc1888eef15cafa0a5d56369e2f9d02595fed623f4b74b2cf2830c42c05a774f0943e700f9c768a82d9d348cad199e135c
2024-01-16 09:34:26 -06:00
Wladimir J. van der Laan
0e8a4d54a4
Merge #21064: refactor: use std::shared_mutex & remove Boost Thread
060a2a64d40d75fecb60b7d2b9946a67e46aa6fc ci: remove boost thread installation (fanquake)
06e1d7d81d5a56d136c6fc88f09a2b0654a164f9 build: don't build or use Boost Thread (fanquake)
7097add83c8596f81be9edd66971ffd2486357eb refactor: replace Boost shared_mutex with std shared_mutex in sigcache (fanquake)
8e55981ef834490c438436719f95cbaf888c4914 refactor: replace Boost shared_mutex with std shared_mutex in cuckoocache tests (fanquake)

Pull request description:

  This replaces `boost::shared_mutex` and `boost::unique_lock` with [`std::shared_mutex`](https://en.cppreference.com/w/cpp/thread/shared_mutex) & [`std::unique_lock`](https://en.cppreference.com/w/cpp/thread/unique_lock).

  Even though [some concerns were raised](https://github.com/bitcoin/bitcoin/issues/16684#issuecomment-726214696) in #16684 with regard to `std::shared_mutex` being unsafe to use across some glibc versions, I still think this change is an improvement. As I mentioned in #21022, I also think trying to restrict standard library feature usage based on bugs in glibc is not only hard to do, but it's not currently clear exactly how we do that in practice (does it also extend to patching out use in our dependencies, should we be implementing more runtime checks for features we are using, when do we consider an affected glibc "old enough" not to worry about? etc). If you take a look through the [glibc bug tracker](https://sourceware.org/bugzilla/describecomponents.cgi?product=glibc) you'll no doubt find plenty of (active) bug reports for standard library code we already using. Obviously not to say we shouldn't try and avoid buggy code where possible.

  Two other points:

  [Cory mentioned in #21022](https://github.com/bitcoin/bitcoin/pull/21022#issuecomment-769274179):
  > It also seems reasonable to me to worry that boost hits the same underlying glibc bug, and we've just not happened to trigger the right conditions yet.

  Moving away from Boost to the standard library also removes the potential for differences related to Boosts configuration. Boost has multiple versions of `shared_mutex`, and what you end up using, and what it's backed by depends on:
  * The version of Boost.
  * The platform you're building for.
  * Which version of `BOOST_THREAD_VERSION` is defined: (2,3,4 or 5) default=2. (see [here](https://www.boost.org/doc/libs/1_70_0/doc/html/thread/build.html#thread.build.configuration) for some of the differences).
  * Is `BOOST_THREAD_V2_SHARED_MUTEX` defined? (not by default). If so, you might get the ["less performant, but more robust"](https://github.com/boostorg/thread/issues/230#issuecomment-475937761) version of `shared_mutex`.

  A lot of these factors are eliminated by our use of depends, but users will have varying configurations. It's also not inconceivable to think that a distro, or some package manager might start defining something like `BOOST_THREAD_VERSION=3`. Boost tried to change the default from 2 to 3 at one point.

  With this change, we no longer use Boost Thread, so this PR also removes it from depends, the build system, CI etc.

  Previous similar PRs were #19183 & #20922. The authors are included in the commits here.
  Also related to #21022 - pthread sanity checking.

ACKs for top commit:
  laanwj:
    Code review ACK 060a2a64d40d75fecb60b7d2b9946a67e46aa6fc
  vasild:
    ACK 060a2a64d40d75fecb60b7d2b9946a67e46aa6fc

Tree-SHA512: 572d14d8c9de20bc434511f20d3f431836393ff915b2fe9de5a47a02dca76805ad5c3fc4cceecb4cd43f3ba939a0508178c4e60e62abdbaaa6b3e8db20b75b03
2024-01-16 09:29:52 -06:00
laanwj
0b53b8f332
Merge bitcoin/bitcoin#25051: Bugfix: configure: Define defaults for enable_arm_{crc,shani}
7fd0860d12da723a228ddd3c9fb905380eb8b379 Bugfix: configure: Define defaults for enable_arm_{crc,shani} (Luke Dashjr)

Pull request description:

  Fix for #17398 and #24115

  Trivial, mostly for consistency (you'd have to *try* to break this)

ACKs for top commit:
  pk-b2:
    ACK 7fd0860d12
  seejee:
    ACK 7fd0860d12
  vincenzopalazzo:
    ACK 7fd0860d12

Tree-SHA512: 51c389787c369f431ca57071f03392438bff9fd41f128c63ce74ca30d2257213f8be225efcb5c1329ad80b714f44427d721215d4f848cc8e63060fa5bc8f1f2e
2024-01-14 11:05:36 -06:00
laanwj
cac2ae924a
Merge bitcoin/bitcoin#23607: rpc: Pass const char* to evhttp_connection_get_peer for new libevent
c62d763fc313585d79ad833c9d729f6acf2652aa Necessary improvements to make configure work without libevent installed (Perlover)
091ccc38c2e589b649648cbcc99aca4802f98775 The evhttp_connection_get_peer function from libevent changes the type of the second parameter. Fixing the problem. (Perlover)

Pull request description:

  The second parameter of evhttp_connection_get_peer in libevent already has type as `const char **`
  The compilation of bitcoind with the fresh libevent occurs errors

  Details: https://github.com/bitcoin/bitcoin/issues/23606

ACKs for top commit:
  laanwj:
    Code review ACK c62d763fc313585d79ad833c9d729f6acf2652aa
  luke-jr:
    tACK c62d763fc313585d79ad833c9d729f6acf2652aa

Tree-SHA512: d1c8062d90bd0d55c582dae2c3a7e5ee1b6c7ca872bf4aa7fe6f45a52ac4a8f59464215759d961f8efde0efbeeade31b08daf9387d7d50d7622baa1c06992d83
2024-01-13 19:32:29 -06:00
laanwj
187b3c49fc
Merge bitcoin/bitcoin#24048: build: Improve error message when pkg-config is not installed
18f304d988117f2675e7393adda9f960fbf3cb3a build: Improve error message when pkg-config is not installed (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin/bitcoin#24037.

  With this PR:
  ```
  # ./autogen.sh
  configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
  configure.ac:16: the top level
  autom4te: /usr/bin/m4 failed with exit status: 1
  aclocal: error: /usr/bin/autom4te failed with exit status: 1
  autoreconf: aclocal failed with exit status: 1
  ```

ACKs for top commit:
  laanwj:
    Tested ACK 18f304d988117f2675e7393adda9f960fbf3cb3a
  jarolrod:
    ACK 18f304d988117f2675e7393adda9f960fbf3cb3a

Tree-SHA512: ba845f44c966fea6cf7cee0db9cacc431072e2005ad065c8f2bbe3cffd8415c3af6ed443cccf9606df7de4df2ff3e72636afb5f3776d2a96af8572aab7018549
2024-01-13 19:32:29 -06:00
UdjinM6
f72650d2de
feat: Set client version for non-release binaries and version in guix based on git tags (#5653)
## Issue being fixed or feature implemented
Client version string is inconsistent. Building `v20.0.0-beta.8` tag
locally produces binaries that report `v20.0.0-beta.8` version but
binaries built in guix would report
`v20.0.0rc1-g3e732a952226a20505f907e4fd9b3fdbb14ea5ee` instead. Building
any commit after `v20.0.0-beta.8` locally would result in versions like
`v20.0.0rc1-8c94153d2497` which is close but it's still yet another
format. And both versions with `rc1` in their names are confusing cause
you'd expect them to mention `beta.8` instead maybe (or is it just me?
:D ).

## What was done?
Change it so that the version string would look like this:
on tag: ~`v20.0.0-beta.8-dev` or `v20.0.0-beta.8-gitarc`~
`v20.0.0-beta.8`
post-tag: ~`v20.0.0-beta.8-1-gb837e08164-gitarc`~
`v20.0.0-beta.8-1-gb837e08164`

post-tag format is
`recent tag`-`commits since that tag`-`g+12 chars of commit hash`-`dirty
(optional)` ~-`dev or gitarc`~

~`dev`/`gitarc` suffixes should help avoiding confusion with the release
versions and they also indicate the way non-release binaries were
built.~

Note that release binaries do not use any of this, they still use
`PACKAGE_VERSION` from `configure` like before.

Also, `CLIENT_VERSION_RC` is no longer used in this setup so it was
removed.

Few things aren't clear to me yet:
1. Version bump in `configure.ac` no longer affects the reported version
(unless it's an actual release). Are there any downsides I might be
missing?
2. Which tag should we use on `develop` once we bump version in
configure? `v21.0.0-init`? `v21.0.0-alpha1`?
3. How is it going to behave once `merge master back into develop` kind
of PR is merged? E.g. say `develop` branch is on `v21.0.0-alpha1` tag
and we merge v20.1.0 from `master` back into it. Will this bring
`v20.1.0` release tag into `develop`? Will it become the one that will
be used from that moment? If so we will probably need another tag on
`develop` every time such PR is merged e.g. `v21.0.0-alpha2` (or
whatever the next number is).

Don't think these are blockers but would like to hear thoughts from
others.

## How Has This Been Tested?
Built binaries locally, built them using guix at a specific tag and at
some commit on top of it.

## Breaking Changes
n/a

## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2024-01-11 21:43:42 -06:00
fanquake
feb636352a
Merge #15704: Move Win32 defines to configure.ac to ensure they are globally defined
1ccb9f30c040daf688f89f0d63e9f5e7b131d193 Move Win32 defines to configure.ac to ensure they are globally defined (Luke Dashjr)

Pull request description:

  #9245 no longer needs this, since the main `_WIN32_WINNT` got bumped by something else.

  So rather than just lose it, might as well get it merged in independently.

  I'm not aware of any practical effects, but it seems safer to use the same API versions everywhere.

ACKs for top commit:
  fanquake:
    ACK 1ccb9f30c040daf688f89f0d63e9f5e7b131d193 - checked that the binaries produced are the same.

Tree-SHA512: 273e9186579197be01b443b6968e26b9a8031d356fabc5b73aa967fcdb837df195b7ce0fc4e4529c85d9b86da6f2d7ff1bf56a3ff0cbbcd8cee8a9c2bf70a244
2024-01-10 19:22:58 -06:00
Kittywhiskers Van Gogh
d3edc5b42c
merge bitcoin#21629: fix configuring when building depends with NO_BDB=1 2024-01-10 12:11:19 -06:00
Kittywhiskers Van Gogh
18098c3045
merge bitcoin#21505: Remove unused header from the build system 2024-01-10 12:11:19 -06:00
Kittywhiskers Van Gogh
771dcfb56b
partial bitcoin#21205: actually stop configure if Boost isn't available
includes:
- c5da2749e2f7375e292fb0982e8e252ae1adbce3
2024-01-10 12:11:19 -06:00
Kittywhiskers Van Gogh
9084ede415
merge bitcoin#20527: Do not ignore Homebrew's SQLite on macOS 2024-01-10 12:11:18 -06:00
Kittywhiskers Van Gogh
0b3b104927
merge bitcoin#19015: Enable some commonly enabled compiler diagnostics 2024-01-10 12:11:18 -06:00
Kittywhiskers Van Gogh
9d227e82a0
merge bitcoin#19688: Add support for llvm-cov 2024-01-10 12:11:17 -06:00
Kittywhiskers Van Gogh
6e4c9b5585
partial bitcoin#18307: Require pkg-config for all of the hosts
excludes:
- a661449a2eeaf88efda36b6a84084dcbfe5b24eb

inapplicable:
- 6fd2118e777d11cbc81a45313d1a7d6400e34f3f
- 06cfc9cadf7c5dd43147e6525a348d5f2d299422

above two commits are inapplicable as tighter UniValue integration
got rid of that logic altogether, backported as dash#4823
2024-01-10 12:11:17 -06:00
fanquake
26abf94a45
Merge #19152: build: improve build OS configure output
0fef60c63d6d2f4df8e698936221e2330ef3a244 build: improved output of configure for build OS (sachinkm77)

Pull request description:

  The purpose of this fix is to improve output of the configure script by providing the build OS. This is done by leveraging the build_os set by the script config.sub / config.guess. #18966

ACKs for top commit:
  fanquake:
    ACK 0fef60c63d6d2f4df8e698936221e2330ef3a244 - thanks for following up.

Tree-SHA512: b9f49df901a9d37eb16c67c063bb3611602a84391aa54d097a52b740f474c2785c24bf405522d15d724fde25070d354bf20b885add2ee4405a71cbe9ebab5ff3
2024-01-09 08:13:05 -06:00
Wladimir J. van der Laan
8bb8f59d32
Merge #18887: build: enable -Werror=gnu
a30b0a24e97eae7f6d1428c5bf339a579872f28e build: enable -Werror=gnu (Vasil Dimov)

Pull request description:

  Stop the build if a warning is emitted due to `-Wgnu` and
  `--enable-werror` has been used. As usual - this would help notice such
  a warning that is about to be introduced in new code.

  This is a followup to
  https://github.com/bitcoin/bitcoin/pull/18088 build: ensure we aren't using GNU extensions

ACKs for top commit:
  practicalswift:
    ACK a30b0a24e97eae7f6d1428c5bf339a579872f28e
  Empact:
    ACK a30b0a24e9

Tree-SHA512: f81b71cf3ee4db88b6f664c571075e0d30800a604f067f44273f256695a1dea533779db2ac859dd0a4cd8b66289c3e45f4aff1cfadfa160a1c354237167b05e2
2024-01-06 19:30:13 -06:00
fanquake
62553fe226
Merge #18216: test, build: Enable -Werror=sign-compare
68537275bd91d1dc14a69609ae443f955bfdbd64 build: Enable -Werror=sign-compare (Ben Woosley)
eac6a3080d38cfd4eb7204ecd327df213958e51a refactor: Rework asmap Interpret to avoid ptrdiff_t (Ben Woosley)
df37377e30678ac9b8338ea920e50b7296da6bd5 test: Fix outstanding -Wsign-compare errors (Ben Woosley)

Pull request description:

  Disallowing sign-comparison mismatches can help to prevent the introduction of overflow and interpretation bugs.

  In this case, ~all~ most existing violations are in the tests, and most simply required annotating the literal as unsigned for comparison.

  This was previously prevented by violations in leveldb which were fixed upstream and merged in #17398. You can test that by building this branch against: 22d11187ee3c7abfe9d43c9eb68f102498cc2b9a vs 75fb37ce68289eb7e00e2ccdd2ef7f9271332545

ACKs for top commit:
  fjahr:
    re-ACK 68537275bd91d1dc14a69609ae443f955bfdbd64
  practicalswift:
    ACK 68537275bd91d1dc14a69609ae443f955bfdbd64

Tree-SHA512: 14b5daa38c496fb51548feb30fb4dd179e6f76a8d355f52bc8e2a18f2f9340f0bc98dcf36d8b3d6521045d013891c3103749a4eda88ceef00202a6a0cf93f73c
2024-01-06 19:30:13 -06:00
fanquake
7753645a30
Merge bitcoin/bitcoin#24633: Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets
5a157eb3703e1e65ed285f13a824562ab12aa3ff Bugfix: configure: Only avoid -isystem for exact /usr/include path (Luke Dashjr)
556ee6f2fa0e2da2bb12fe05a885431f61db2e47 Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets (Luke Dashjr)

Pull request description:

  The regex includes `[/ ]` which is supposed to match either a forward slash or a space, but m4 treats the brackets as special characters and effectively strips them out, leading to -isystem /usr/include paths except for in the typical scenario where it is the final parameter in the flag string.

ACKs for top commit:
  hebasto:
    ACK 5a157eb3703e1e65ed285f13a824562ab12aa3ff, tested on Ubuntu 22.04 with clang 14.0.
  vasild:
    ACK 5a157eb3703e1e65ed285f13a824562ab12aa3ff

Tree-SHA512: 5c8c282b647b7853b8fad1b5b473703c4a0635073d2685a8ac984151046e2c6a859e6972465419d27356dd29a47f21a2a3a6ad402ec434fe1f9882e5a35f0749
2024-01-01 17:48:19 -06:00
fanquake
22f9e1ffef
Merge bitcoin/bitcoin#24650: build: require libtool 2.4.2
061accfddd2d27ad584c826413c68857d2be9ced build: require libtool 2.4.2 (fanquake)

Pull request description:

  Every system we support has 2.4.6 available, except for OpenBSD, which
  [currently ships with 2.4.2](https://github.com/openbsd/ports/blob/master/devel/libtool/Makefile) (released 2011). For now, set our minimum
  required version to that.

  After a 7 year hitus, 2.4.7 has also very recently been released:
  https://savannah.gnu.org/forum/forum.php?forum_id=10139.

  Partially motivated by comments in https://github.com/bitcoin/bitcoin/pull/24615.

  See also: https://repology.org/project/libtool/versions

ACKs for top commit:
  achow101:
    ACK 061accfddd2d27ad584c826413c68857d2be9ced
  hebasto:
    ACK 061accfddd2d27ad584c826413c68857d2be9ced
  prusnak:
    ACK 061accfddd2d27ad584c826413c68857d2be9ced

Tree-SHA512: bc032022b8609b73253ff1c4fd480f4d09be761b8fec295f39319f9499ee2df116f55295da476be551c43ed88fbb0bfed7bb5a188b9979b34147fe39737ec76f
2024-01-01 17:48:18 -06:00
fanquake
cc7cb9ffda Merge bitcoin/bitcoin#24738: build: remove faketime unsetting and comments from configure
3d70c058684727cd036314014ec0a9208d3e9168 build: remove faketime unsetting and comments from configure.ac (fanquake)

Pull request description:

  We no-longer use [`faketime`](https://github.com/wolfcw/libfaketime) (it used to be required in gitian), so as far as I'm aware, there is no need for us to unset `FAKETIME` or mention it in our build docs.

ACKs for top commit:
  laanwj:
    Code review ACK 3d70c058684727cd036314014ec0a9208d3e9168
  prusnak:
    Approach ACK 3d70c05
  hebasto:
    ACK 3d70c058684727cd036314014ec0a9208d3e9168, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 9cf89d63b81119f3d2f02975a66ec0b93e861993fdb0e4f70538e3be6e0047dc09ce87ef2de40cbf877647a21706b39ddf07240c77765278d383d7a7878cc7eb
2023-12-06 12:40:58 -06:00
fanquake
b614894d1e
Merge bitcoin/bitcoin#22406: build: remove --enable-determinism configure option
e46287853f3a41c3f0772d3448d8df4ea01a156f build: remove --enable-determinism configure option (fanquake)

Pull request description:

  This was added by me a while back, with the intention of expanding what this did. That hasn't happened, and this hasn't gained much use. There's also been some discussion of some configure option fatigue, so just remove it for now. Note that `-Wl,--no-insert-timestamp` is also already used in the Guix build.

ACKs for top commit:
  MarcoFalke:
    review ACK e46287853f3a41c3f0772d3448d8df4ea01a156f
  jarolrod:
    Code Review ACK e46287853f3a41c3f0772d3448d8df4ea01a156f

Tree-SHA512: ac976f88203eca2a49e296a98693dbe53330e0cb0e273c5ff1fcded30daeb6070cc5beeae35cf9acfdc2279cd64c274d5aeb588aef077aa9bfde39bb23570491
2023-12-03 20:45:01 -06:00
fanquake
b048368764
Merge bitcoin/bitcoin#22238: build: improve detection of eBPF support
8f7704d0321a71c1691837a6bd3b4e05f84d3031 build: improve detection of eBPF support (fanquake)

Pull request description:

  Just checking for the `sys/sdt.h` header isn't enough, as systems like macOS have the header, but it doesn't actually have the `DTRACE_PROBE*` probes, which leads to [compile failures](https://github.com/bitcoin/bitcoin/pull/22006#issuecomment-859559004). The contents of `sys/sdt.h` in the macOS SDK is:
  ```bash
  #ifndef _SYS_SDT_H
  #define _SYS_SDT_H

  /*
   * This is a wrapper header that wraps the mach visible sdt.h header so that
   * the header file ends up visible where software expects it to be.  We also
   * do the C/C++ symbol wrapping here, since Mach headers are technically C
   * interfaces.
   *
   * Note:  The process of adding USDT probes to code is slightly different
   * than documented in the "Solaris Dynamic Tracing Guide".
   * The DTRACE_PROBE*() macros are not supported on Mac OS X -- instead see
   * "BUILDING CODE CONTAINING USDT PROBES" in the dtrace(1) manpage
   *
   */
  #include <sys/cdefs.h>
  __BEGIN_DECLS
  #include <mach/sdt.h>
  __END_DECLS

  #endif  /* _SYS_SDT_H */
  ```

  The `BUILDING CODE CONTAINING USDT PROBES` section from the dtrace manpage is available [here](https://gist.github.com/fanquake/e56c9866d53b326646d04ab43a8df9e2), and outlines the more involved process of using USDT probes on macOS.

ACKs for top commit:
  jb55:
    utACK 8f7704d0321a71c1691837a6bd3b4e05f84d3031
  practicalswift:
    cr ACK 8f7704d0321a71c1691837a6bd3b4e05f84d3031
  hebasto:
    ACK 8f7704d0321a71c1691837a6bd3b4e05f84d3031, tested on macOS Big Sur 11.4 (20F71) and on Linux Mint 20.1 (x86_64) with depends.

Tree-SHA512: 5f1351d0ac2e655fccb22a5454f415906404fdaa336fd89b54ef49ca50a442c44ab92d063cba3f161cb8ea0679c92ae3cd6cfbbcb19728cac21116247a017df5
2023-12-03 20:45:00 -06:00
fanquake
2e19dd24ff
Merge bitcoin/bitcoin#22258: build: Disable deprecated-copy warning only when external warnings are enabled
1111457d7433c2cca1d7e98946f6954e3a0280ef build: Disable deprecated-copy warning only when external warnings are enabled (MarcoFalke)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/issues/18967

  Alternative to https://github.com/bitcoin/bitcoin/pull/22240

ACKs for top commit:
  fanquake:
    tACK 1111457d7433c2cca1d7e98946f6954e3a0280ef

Tree-SHA512: 0fc826f26ebbeab662fa7eed2a5cc1630c6c4e612deb91734885fc8bae0352be657ec48ae94ff55a984ac36d27b95cea8d947cc5cf408231d56addecf79db83f
2023-12-03 20:45:00 -06:00
Wladimir J. van der Laan
8f212e047d
Merge #21250: build: make HAVE_O_CLOEXEC available outside LevelDB (bugfix)
9bac71350d98580cc7441957fc7c3fa2f4158553 build: make HAVE_O_CLOEXEC available outside LevelDB (bugfix) (Sebastian Falbesoner)
584fd91d2d294883e6896dbd64a2176528e94581 init: only use pipe2 if availabile, check in configure (Sebastian Falbesoner)

Pull request description:

  The result of the O_CLOEXEC availability check is currently only set in the Makefile and passed to LevelDB (see `LEVELDB_CPPFLAGS_INT` in `src/Makefile.leveldb.include`), but not defined to be used in our codebase. This means that code within the preprocessor conditional `#if HAVE_O_CLOEXEC` was actually never compiled. On the master branch this is currently used for pipe creation in `src/shutdown.cpp`, PR #21007 moves this part to a new module (I found the issue while testing that PR).

  The fix is similar to the one in #19803, which solved the same problem for HAVE_FDATASYNC.

  In the course of working on the PR it turned out that pipe2 is not available an all platforms, hence a configure check and a corresponding define HAVE_PIPE2 is introduced and used.

  The PR can be tested by anyone with a system that has pipe2 and O_CLOEXEC available by putting gibberish into the HAVE_O_CLOEXEC block: on master, everything should compile fine, on PR, the compiler should abort with an error. At least that's my naive way of testing preprocessor logic, happy to hear more sophisticated ways :-)

ACKs for top commit:
  laanwj:
    Code review ACK 9bac71350d98580cc7441957fc7c3fa2f4158553

Tree-SHA512: aec89faf6ba52b6f014c610ebef7b725d9e967207d58b42a4a71afc9f1268fcb673ecc85b33a2a3debba8105a304dd7edaba4208c5373fcef2ab83e48a170051
2023-12-03 20:44:56 -06:00
fanquake
26211cc22f Merge bitcoin/bitcoin#26896: build: Remove port-forwarding runtime setting options from configure
d51f0fa4b7b19281efe65aacf414845c661d0a13 doc: add release notes for 26896 (fanquake)
2b248798d96f794db08b7725730b5fb4e00b9b10 build: remove --enable-upnp-default from configure (fanquake)
02f5a5e7b5fd7ba35e407d4409202a0e0fed003c build: remove --enable-natpmp-default from configure (fanquake)
25a0e8ba0b31d8bd265df0589fe49241a60d0fc2 Remove configure-time setting of DEFAULT_UPNP (fanquake)
06562e5fa771dab275a9cab4914cd64d961a52bc Remove configure-time setting of DEFAULT_NATPMP (fanquake)

Pull request description:

  This PR removes the `--enable-upnp-default` and `--enable-natpmp-default` options from configure.

  It's odd to me that we maintain configure-time options for setting the default port-forwarding runtime state (but no other similar options), and I'm not sure what use-case it satisfies, that can't be achieved by multiple other means. I also doubt that we'll ever restart using these in release builds, or turning on any of this by default.

  I think the only scenario these options would be used is when you want to compile your own binaries (we don't use them in Guix), with port-forwarding on by default, but otherwise can't or don't want to use a `.conf` file, can't or don't want to pass command line options at runtime, and also don't want to modify the source code?

ACKs for top commit:
  hebasto:
    ACK d51f0fa4b7b19281efe65aacf414845c661d0a13, rebased and comments have been addressed since my recent [review](https://github.com/bitcoin/bitcoin/pull/26896#pullrequestreview-1273910740).
  TheCharlatan:
    ACK d51f0fa4b7b19281efe65aacf414845c661d0a13

Tree-SHA512: 481decd8bddd8b03b7319591e3acf189f7b6b96c9a9a8c5bc1a3f8ec00d0b8f9b52d2f5c28a298a2ec947cfe9611cfd184e393ccb2e4e21bfce86ca7d4de60d3
2023-12-03 20:01:26 -06:00
Kittywhiskers Van Gogh
a3f29982ad partial bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0
notes:
- excludes changes made to `SignSchnorr`, `XOnlyPubKey`, kernel context and absent {fuzz,bench} tests
2023-11-21 07:59:03 -06:00
Kittywhiskers Van Gogh
ac140f0299 partial bitcoin#24792: Update libsecp256k1 subtree to current master
excludes:
- d960d4fd3a767cf5695bed96c5f329056f77d0da
- 404c53062bb80853d5967187bdb7b5f7e749de7f
2023-11-21 07:59:03 -06:00
Kittywhiskers Van Gogh
7e6213b0ff partial bitcoin#23383: Update libsecp256k1 subtree to current master
excludes
- 314195c8be3bd7db0d5817c4fb3aa85c84363ce9
2023-11-21 07:59:03 -06:00
Kittywhiskers Van Gogh
fecccbf94d build: add --enable-module-schnorrsig --enable-experimental cfg flags
taken from changes made to `configure.ac` in 0664f5fe1f77f08d235aa3750b59428257b0b91d (bitcoin#19953)
2023-11-21 07:59:03 -06:00
PastaPastaPasta
4dff2e0631
chore: bump version to v20.1.0 non-release (#5696)
## Issue being fixed or feature implemented
Bump develop version to v20.1.0; v21 features should not yet be merged
into develop; when the time is come to begin merging v21 features into
develop, we can then bump version again.

## What was done?
Bump version

## How Has This Been Tested?


## Breaking Changes


## Checklist:
_Go over all the following points, and put an `x` in all the boxes that
apply._
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-11-14 09:23:00 -06:00
W. J. van der Laan
fb3d9a16bf Merge bitcoin/bitcoin#23082: build: improve gexauxval() detection, remove getauxval() weak linking
4446ef0a549d567a88d82b606aa8c47f115673f9 build: remove support for weak linking getauxval() (fanquake)
e56100c5b4daf2285dde9807bf654599aa19bd6b build: remove arm includes from getauxval() check (fanquake)

Pull request description:

  It was [pointed out in #23030](https://github.com/bitcoin/bitcoin/pull/23030#issuecomment-922893367) that we might be able to get rid of our weak linking of [`getauxval()`](https://man7.org/linux/man-pages/man3/getauxval.3.html) (`HAVE_WEAK_GETAUXVAL`) entirely, with only Android being a potential holdout:
  > I wonder if it's time to get rid of HAVE_WEAK_GETAUXVAL. I think it's confusing. Either we build against a C library that has this functionality, or not. We don't do this weak linking thing for any other symbols and recently got rid of the other glibc backwards compatibility stuff.
  > Unless there is still a current platform that really needs it (Android?), I'd prefer to remove it from the build system, it has caused enough issues.

  After looking at Android further, it would seem that given we are moving to using `std::filesystem`, which [requires NDK version 22 and later](https://github.com/android/ndk/wiki/Changelog-r22), and `getauxval` has been available in the since [API version 18](https://developer.android.com/ndk/guides/cpu-features#features_using_libcs_getauxval3), that shouldn't really be an issue. Support for API levels < 19 will be dropped with the NDK 24 release, and according to [one website](https://apilevels.com/), supporting API level 18+ will cover ~99% of devices. Note that in the CI we currently build with NDK version 22 and API level 28.

  The other change in this PR is removing the include of headers for ARM intrinsics, from the check for strong `getauxval()` support in configure, as they shouldn't be needed. Including these headers also meant that the check would basically only succeed when building for ARM. This would be an issue if we remove weak linking, as we wouldn't detect `getauxval()` as supported on other platforms. Note that we also use `getauxval()` in our RNG when it's available.

  I've checked that with these changes we detect support for strong `getauxval()` on Alpine (muslibc). On Linux, previously we'd be detecting support for weak getauxval(), now we detect strong support. Note that we already require glibc 2.17, and `getauxval()` was introduced in `2.16`.

  This is an alternative / supersedes #23030.

ACKs for top commit:
  laanwj:
    Code review and tested ACK 4446ef0a549d567a88d82b606aa8c47f115673f9

Tree-SHA512: 5f2a9e9cc2d63bddab73f0dcb169d4d6beda74622af82bc0439722f1189f81d052e2fc1eaf27056a7a606320d5ddc4c11075f0d051dd93d77c5e1c15337f354a
2023-10-31 08:40:25 -05:00
PastaPastaPasta
5e69a5654e
chore: bump version to rc.2 (#5656)
## Issue being fixed or feature implemented
Bump version

## What was done?


## How Has This Been Tested?
Na

## Breaking Changes
Na

## Checklist:
_Go over all the following points, and put an `x` in all the boxes that
apply._
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-10-30 10:19:50 -05:00
PastaPastaPasta
297b50ae6c
chore: bump rc to 1 (#5645)
## Issue being fixed or feature implemented
Bump version to rc.1

## What was done?
bump version

## How Has This Been Tested?


## Breaking Changes


## Checklist:
_Go over all the following points, and put an `x` in all the boxes that
apply._
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-10-23 12:39:23 -05:00
Kittywhiskers Van Gogh
e5445e5444 merge bitcoin#19866: eBPF Linux tracepoints 2023-09-04 20:50:27 -05:00
MarcoFalke
59c157faaa Merge #18504: build: Drop bitcoin-tx and bitcoin-wallet dependencies on libevent
01a3392b1b778fa4fcf568013326d6ea1de4fb3b Drop bitcoin-wallet dependency on libevent (Russell Yanofsky)
0660119ac372c2863d14060ac1bc9bc243771f94 Drop unintended bitcoin-tx dependency on libevent (Russell Yanofsky)

Pull request description:

  This fixes compile errors trying to build bitcoin-tx and bitcoin-wallet without libevent, which were reported by Luke Dashjr in https://github.com/bitcoin/bitcoin/issues/18465

  The fix avoiding `bitcoin-tx` dependency on libevent just adds a conditional build rule. This is implemented in the first commit (more details in commit description).

  The fix avoiding `bitcoin-wallet` dependency on libevent requires minor code changes, because `bitcoin-wallet` (unlike `bitcoin-tx`) links against code that calls `urlDecode` / `evhttp_uridecode`. This fix is implemented in the second commit (again details in the commit description).

ACKs for top commit:
  jonasschnelli:
    utACK 01a3392b1b778fa4fcf568013326d6ea1de4fb3b.

Tree-SHA512: d2245e912ab494cccceeb427a1eca8e55b01a0006ff93eebcfb5461ae7cecd1083ac2de443d9db036b18bdc6f0fb615546caaa20c585046f66d234937f74870a
2023-08-29 22:00:59 -05:00
Kittywhiskers Van Gogh
30b9d66789 merge bitcoin#21264: Two scripted diff renames 2023-08-29 21:55:45 -05:00
Kittywhiskers Van Gogh
dcd7babd80 merge bitcoin#20936: build fuzz tests by default 2023-08-29 21:55:45 -05:00
Wladimir J. van der Laan
2bacbcf1fd Merge #14501: Fix possible data race when committing block files
ef712298c3f8bc2afdad783f05080443b72b3f77 util: Check for file being NULL in DirectoryCommit (Luke Dashjr)
457490403853321d308c6ca6aaa90d6f8f29b4cf Fix possible data race when committing block files (Evan Klitzke)
220bb16cbee5b91d0bc0fcc6c71560d631295fa5 util: Introduce DirectoryCommit commit function to sync a directory (Evan Klitzke)
ce5cbaea63ad4ea78e533bdb14f47f414061ae7f util.h: Document FileCommit function (Evan Klitzke)
844d650eea3bd809884cc5dd996a388bdc58314e util: Prefer Mac-specific F_FULLSYNC over fdatasync in FileCommit (Evan Klitzke)
f6cec0bcaf560fa310853ad3fe17022602b63d5f util: Refactor FileCommit from an #if sequence nested in #else, to a sequence of #elif (Evan Klitzke)

Pull request description:

  Reviving #12696

ACKs for top commit:
  laanwj:
    Code review ACK ef712298c3f8bc2afdad783f05080443b72b3f77

Tree-SHA512: 07d650990ef4c18d645dee3f9a199a940683ad17557d79d93979a76c4e710d8d70e6eae01d1a5991494a24a7654eb7db868be0c34a31e70b2509945d95bc9cce
2023-08-29 21:40:46 -05:00
Konstantin Akimov
3443630a8c
ci: adds flag -Werror=reorder for arm target (#5540)
## Issue being fixed or feature implemented
The order of members in a class/struct definition and the order of their
initialization should match. This ensures that the code is more
error-proof in cases where the order of member initializations is
important, as they may depend on each other.


Instead manual checking of member initialization better let CI handle
it.
Last PR where it's noticed:
https://github.com/dashpay/dash/pull/5531#discussion_r1299404387

## What was done?
New flag "-Werror=reorder" for `configure.ac` and fixes existing code.

## How Has This Been Tested?
Build code with `--enable-werror`



## Breaking Changes
N/A

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
2023-08-22 23:19:48 +03:00
MarcoFalke
48b92ec762 Merge #20609: configure: output notice that test binary is disabled by fuzzing
904d875cf5aecc337daa6a2243a803033cf4eee3 configure: output notice that test binary is disabled by fuzzing (Andrew Poelstra)

Pull request description:

  I wasted a bit of time today running a stale `test_bitcoin` and not understanding why, until I remembered that I'd ./configured my working directory with --enable-fuzz.

Top commit has no ACKs.

Tree-SHA512: 6cbe30547332114ad3fe61c67e224f5a28aac4b1b58e0acecb29cb04f5a34f792c927797aa8000449aae076435bd45acf209b7323b0b48fa971705d6ed3e6529
2023-08-08 06:33:29 -05:00
Kittywhiskers Van Gogh
b92539f437 merge bitcoin#24132: Bump minimum Qt version to 5.11.3 2023-08-08 06:05:02 -05:00
Kittywhiskers Van Gogh
545387128c merge bitcoin#21286: Bump minimum Qt version to 5.9.5 2023-08-08 06:05:02 -05:00
Kittywhiskers Van Gogh
73195bf093 merge bitcoin#17874: make linker checks more robust 2023-08-08 06:05:02 -05:00
Kittywhiskers Van Gogh
5cb5a6edb0 merge bitcoin#22930: remove glibc back compat 2023-08-01 12:07:31 -05:00
Kittywhiskers Van Gogh
6243a71267 merge bitcoin#25389: use libtool 2.4.7 2023-06-29 12:31:03 -05:00
Kittywhiskers Van Gogh
b1dd417f26 merge bitcoin#23909: use a static .tiff for macOS .dmg over generating 2023-06-18 11:47:54 -05:00
Kittywhiskers Van Gogh
110dbf82e8 merge bitcoin#22392: use LIEF for ELF security & symbol checks 2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
24a6642b6f partial bitcoin#22381: Test security-check sanity before performing them (with macOS)
excludes:
- d6ef3543ae16847d5a91fa9271acee9bd2164b32
2023-06-07 14:42:02 +05:30
Kittywhiskers Van Gogh
994fb5739c merge bitcoin#18434: add a test-security target and run it in CI 2023-06-07 14:40:37 +05:30
Wladimir J. van der Laan
e479892050 Merge #18107: build: Add cov_fuzz target
faf7d4fa86b700ec272806cd2bd8666a92405619 build: Add cov_fuzz target (MarcoFalke)
fac71e364e4bbaeffc35e45aff8c8c2c6f2b5c67 build: link fuzz/test_runner.py for out-of-tree builds (MarcoFalke)
faf2c5aca01643eb560287e08f9c0a7ca0ac9c88 build: Remove unused USE_COVERAGE (MarcoFalke)

Pull request description:

  Only libFuzzer is supported right now, so clang is required. Thus, this needs a workaround such as https://github.com/bitcoin/bitcoin/issues/12602#issuecomment-562788247

  Can be tested with:

  ```
  mkdir build && cd build
  ../configure --enable-fuzz --with-sanitizers=fuzzer --enable-lcov --enable-lcov-branch-coverage CC=clang CXX=clang++
  make $MAKEJOBS
  make cov_fuzz

ACKs for top commit:
  practicalswift:
    ACK faf7d4fa86b700ec272806cd2bd8666a92405619

Tree-SHA512: 6828f8f81d95f6781713d0b09d7eba2ffdb50217e09ca839db61791a4ed70024859c7a0cb01d9eede79166d574dd57ece01f9d9fe2610d4a72a4ca4a4ce0b838
2023-05-31 12:01:04 -05:00
fanquake
8ae94ada7c Merge #18397: build: Fix libevent linking for bench_bitcoin binary
cd04286825c6512b46bf59ab7b3dfffb0e36d65b build: Fix typo in EVENT_CFLAGS variable (Hennadii Stepanov)
f709ad0c907d87d03002455967cc30ae7d704d80 build: Fix libevent linking for bench_bitcoin binary (Hennadii Stepanov)

Pull request description:

  This change fixes `libevent` linking error for the `bench_bitcoin` binary.

  This PR is an alternative to #18377.
  Fix #18373.

  Also fixed a typo in `EVENT_CFLAGS` variable noted by **brakmic**.

ACKs for top commit:
  fanquake:
    ACK cd04286825c6512b46bf59ab7b3dfffb0e36d65b

Tree-SHA512: a62f7457e86b11d3a55d603ea5d83f3a413792e2f28a0c72300e54d12591bd6f0acc1d76a4bd4b591e0223bc6d530e7a4b9a8b939fe2fdbf2dddfda5b1b537be
2023-05-31 12:01:04 -05:00
Kittywhiskers Van Gogh
0fcc90cd3a partial bitcoin#20963: Build binaries for 64-bit POWER
excludes changes to gitian-linux that would make POWER64
a target platform for builds
2023-05-31 11:06:40 -05:00
Kittywhiskers Van Gogh
458ed44d19 merge bitcoin#23744: Drop support for i686-linux-android host 2023-05-31 11:06:40 -05:00
Kittywhiskers Van Gogh
207f047b1e partial bitcoin#17227: Add Android packaging support
contains only changes made to configure.ac from ebfb10cb75adb704418d08197681c1e742e63bd5
2023-05-31 11:06:40 -05:00
UdjinM6
ae0da14174
build: fix gmp detection on macos when building with no depends (#5394)
## Issue being fixed or feature implemented
gmp can't be detected on macos when installed via `brew` atm

## What was done?
detect package prefix and adjust CPPFLAGS and LDFLAGS accordingly


## How Has This Been Tested?
`./configure`

before: `configure: error: libgmp headers missing`
after: passes

## Breaking Changes
n/a

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-05-26 13:41:15 -05:00
Kittywhiskers Van Gogh
0b9500f3e9 partial bitcoin#27483: Bump python minimum version to 3.8 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
7bd22afacb partial bitcoin#26226: Bump minimum python version to 3.7 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
4fb0a43052 merge bitcoin#23317: fix python detection 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
d6de466369 merge bitcoin#23182: add python3.10 alias to AC_PATH_PROGS call in configure 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
1bfb3328e6 merge bitcoin#19504: Bump minimum python version to 3.6 2023-05-11 09:18:48 -05:00
PastaPastaPasta
a80c251af6
chore: bump version to v20.0.0 (#5215) 2023-04-14 17:01:04 -05:00
fanquake
f08a10230f Merge #21051: Fix -Wmismatched-tags warnings
b6aadcd5b4350a6ebcd57e88e7a0853cedf7c2fb build: Add -Werror=mismatched-tags (Hennadii Stepanov)
1485124291368c4a2ca8ea09c18e813f1dbabf5c Fix -Wmismatched-tags warnings (Hennadii Stepanov)

Pull request description:

  Warnings were introduced in #20749:
  ```
  ./validation.h:43:1: warning: class 'CCheckpointData' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
  class CCheckpointData;
  ^
  ./chainparams.h:24:8: note: previous use is here
  struct CCheckpointData {
         ^
  ./validation.h:43:1: note: did you mean struct here?
  class CCheckpointData;
  ^~~~~
  struct
  1 warning generated.
  ```

  This change fixes AppVeyor build: https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/37547435

ACKs for top commit:
  glozow:
    utACK b6aadcd5b4 🚗
  practicalswift:
    cr ACK b6aadcd5b4350a6ebcd57e88e7a0853cedf7c2fb: patch looks correct

Tree-SHA512: 3ac887ebdbf9a1ae33c1fd5381b3b8d83388ad557ddeb55013acd42bb9752a5bd009e3a0eed52644a023a7a0dda1c159277981af82f58fb0abfe60b84e01bf29
2023-04-09 00:06:56 -05:00
Wladimir J. van der Laan
2699f44673 Merge #18882: build: fix -Wformat-security check when compiling with GCC
6cef3652d143a1dddad1254cab0953561d24c1fa build: fix -Wformat-security check when compiling with GCC (fanquake)

Pull request description:

  GCC expects `-Wformat` to be passed with [`-Wformat-security`](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html), which means
  when we test for it in configure it currently fails:

  ```bash
  checking whether C++ compiler accepts -Wformat-security... no
  ...
  configure:15907: checking whether C++ compiler accepts -Wformat-security
  configure:15926: g++ -std=c++11 -c -g -O2 -Werror -Wformat-security  conftest.cpp >&5
  cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]
  cc1plus: all warnings being treated as errors
  ```

  and never gets added to our CXX flags. Note that Clang does not have this requirement and the check is working correctly there.

  The change in this PR is the simple fix, however we might want to consider using something like `-Wformat=2` in future, which in GCC is equivalent to `-Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k.` and similar [in Clang](https://clang.llvm.org/docs/DiagnosticsReference.html#wformat-2).

ACKs for top commit:
  practicalswift:
    ACK 6cef3652d143a1dddad1254cab0953561d24c1fa
  laanwj:
    ACK 6cef3652d143a1dddad1254cab0953561d24c1fa

Tree-SHA512: f9230d42af39f85ea9d2f55dbbebd2bae4740fe59b0da2e092af3ac9ef7e6799d3a4cf83eb64574c63982e5f6b14e226d44c84fa0335255d65c9947d86a1ea38
2023-04-09 00:06:56 -05:00
Wladimir J. van der Laan
c49e573e47
Merge #18437: util: Detect posix_fallocate() instead of assuming
182dbdf0f4b6e6484b0d4588aaefacc75862a99c util: Detect posix_fallocate() instead of assuming (Vasil Dimov)

Pull request description:

  Don't assume that `posix_fallocate()` is available on Linux and not
  available on other operating systems. At least FreeBSD has it and we
  are not using it.

  Properly check whether `posix_fallocate()` is present and use it if it
  is.

ACKs for top commit:
  laanwj:
    ACK 182dbdf0f4b6e6484b0d4588aaefacc75862a99c

Tree-SHA512: f9ed4bd661f33ff6b2b1150591e860b3c1f44e12b87c35e870d06a7013c4e841ed2bf17b41ad6b18fe471b0b23a4b5e42cf1400637180888e0bc56c254fe0766
2023-03-03 23:07:18 +05:30
fanquake
afdb731442
Merge #18088: build: ensure we aren't using GNU extensions
0ae8f18dfe143051fec6ae10ea7df10142e3ff2f build: add -Wgnu to compile flags (fanquake)
3a0fd7726b8b916de6cce33bb67f48990575f923 Remove use of non-standard zero variadic macros (Ben Woosley)
49f6178c3e5e3ad54a419da9d8523207da17fc64 Drop unused LOG_TIME_MICROS helper (Ben Woosley)
5d4999951ee32e333b511245862628e80f83b703 prevector: Avoid unnamed struct, which is a GNU extension (DesWurstes)

Pull request description:

  Since we [started using](https://github.com/bitcoin/bitcoin/pull/7165) the `ax_cxx_compile_stdcxx.m4` macro we've been passing `[noext]` to indicate that we don't want to use an extended mode, i.e GNU extensions. Speaking to Cory he clarified that the intention was to "require only vanilla c++11 and turn _off_ extension support so they would fail to compile".

  However in the codebase we are currently making use of some GNU extensions. We should either remove there usage, or at least amend our CXX compiler checks. I'd prefer the former.

  #### anonymous structs
  ```bash
  ./prevector.h:153:9: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct]
          struct {
  ```

  This is fixed in b849212c1e.

  #### variadic macros

  ```bash
  ./undo.h:57:50: warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]
              ::Unserialize(s, VARINT(nVersionDummy));
  ```

  This is taken care of in #18087.

  The `LOG_TIME_*` macros introduced in #16805 make use of a [GNU extension](https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html).

  ```bash
  In file included from validation.cpp:22:
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
      BCLog::Timer<std::chrono::milliseconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, ## __VA_ARGS__)
                                                                                                    ^
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
  ./logging/timer.h:99:99: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
  ./logging/timer.h:101:92: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
      BCLog::Timer<std::chrono::seconds> PASTE2(logging_timer, __COUNTER__)(__func__, end_msg, ## __VA_ARGS__)
                                                                                             ^
  6 warnings generated.
  ```

  This is fixed in 081a0ab64eb442bc85c4d4a4d3bc2c8e97ac2a6d and 612e8e138b97fc5ad2f38847300132a8fc423c3f.

  #### prevention
  To ensure that usage doesn't creep back in we can add [`-Wgnu`](https://clang.llvm.org/docs/DiagnosticsReference.html#wgnu) to our compile time flags, which will make Clang warn whenever it encounters GNU extensions.

  This would close #14130.
  Also related to #17230, where it's suggested we use a GNU extension, the `gnu::pure` attribute.

ACKs for top commit:
  practicalswift:
    ACK 0ae8f18dfe143051fec6ae10ea7df10142e3ff2f -- diff looks correct
  MarcoFalke:
    ACK 0ae8f18dfe143051fec6ae10ea7df10142e3ff2f
  vasild:
    utACK 0ae8f18df
  dongcarl:
    ACK 0ae8f18dfe143051fec6ae10ea7df10142e3ff2f

Tree-SHA512: c517404681ef8edf04c785731d26105bac9f3c9c958605aa24cbe399c649e7c5ee0c4aa8e714fd2b2d335e2fbea4d571e09b0dec36678ef871f0a6683ba6bb7f
2023-03-03 23:07:16 +05:30
Kittywhiskers Van Gogh
a55cb7a635 merge bitcoin#20202: Make BDB support optional 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
4c7112b106 merge bitcoin#20156: Make sqlite support optional (compile-time) 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
f42288c984 partial bitcoin#19077: Add sqlite as an alternative wallet database and use it for new descriptor wallets 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
2b3491f875 merge bitcoin#18676: Check libevent minimum version in configure script 2023-01-18 19:02:39 -06:00
Kittywhiskers Van Gogh
9efa7c8284 merge bitcoin#22320: set minimum required Boost to 1.64.0 2023-01-18 19:02:39 -06:00
Kittywhiskers Van Gogh
4725eda5d1 merge bitcoin#19667: set minimum required Boost to 1.58.0 2023-01-18 19:02:39 -06:00
Kittywhiskers Van Gogh
07bd5977e5 partial bitcoin#23511: require glibc 2.18+ 2023-01-18 19:02:39 -06:00
Kittywhiskers Van Gogh
d37f30ce46 merge bitcoin#20476: Add test for ELF symbol-check 2023-01-18 19:02:39 -06:00
Kittywhiskers Van Gogh
29c885c9f7 merge bitcoin#20434: Parse ELF directly for symbol and security checks 2023-01-18 19:02:39 -06:00