Commit Graph

832 Commits

Author SHA1 Message Date
fanquake
58a9601dff
build: globally define NOMINMAX
Define (and document) `NOMINMAX` once, rather than across multiple
source files.

Defining this prevents the definition of min/max macros when using
mingw-w64, which may conflict with unprefixed std::min/max usage. While
that might not be the case for us, we'd always prefer to use the standard
library in any case.

For example:
73cadc06c6/mingw-w64-headers/include/ntdef.h (L289-L300)
2022-06-20 12:22:05 +01:00
laanwj
faf25b09d9
Merge bitcoin/bitcoin#25282: Bugfix: configure: Define default for use_libevent
f0f5cd79b5 Bugfix: configure: Define default for use_libevent (Luke Dashjr)

Pull request description:

  Another trivial fix like #25051 - I think this is the only other one missing.

ACKs for top commit:
  laanwj:
    Code review ACK f0f5cd79b5

Tree-SHA512: 888c2e6d032ef1de5af635e2a9b2b8ab560c86bd10a6cee54aa9aa62ae43f03c19889bb6a2b64cf8982d4cd514f97ca3ed743c71ed0651e9295a4b1726955b9b
2022-06-16 18:19:49 +02:00
fanquake
4a81ef4510
doc: update configure ar doc to mention libtool 2.4.7 2022-06-16 11:36:38 +01:00
fanquake
491bb14c0c
build: test for timingsafe_bcmp
Code introduced in #15649 added usage of `timingsafe_bcmp()`, 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.
2022-06-10 12:39:08 +01:00
MacroFake
2e079c86ae
Merge bitcoin/bitcoin#24395: build: use BOOST_MULTI_INDEX_ENABLE_SAFE_MODE when debugging
06e18e0b53 build: use BOOST_MULTI_INDEX_ENABLE_SAFE_MODE when debugging (fanquake)

Pull request description:

  Use of this macro enables precondition checks for iterators and functions of the library. It's use is recommended in debug builds. See https://www.boost.org/doc/libs/1_78_0/libs/multi_index/doc/tutorial/debug.html for more info.

  There is also a `BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING` macro:
  > When this mode is in effect, all public functions of Boost.MultiIndex will perform post-execution tests aimed at ensuring that the basic internal invariants of the data structures managed are preserved.

ACKs for top commit:
  laanwj:
    Concept and code review ACK 06e18e0b53

Tree-SHA512: 7ee489eccda81c7dbca9210af6d3007d5b2c704b645139d2714c077af157789dd9478c29d0d212e210e96686ea83713aaf3d458e879122b3cde64f3e3e3789d2
2022-06-08 17:20:15 +02:00
Luke Dashjr
f0f5cd79b5 Bugfix: configure: Define default for use_libevent 2022-06-05 21:48:22 +00:00
fanquake
a7973bf8f4
Revert "build: more robustly check for fcf-protection support"
We no-longer support Clang 7 (#24164).

This reverts commit e9189a750b.
2022-05-31 06:41:16 +01:00
Jon Atack
247d17033f build: add DEBUG_LOCKCONTENTION to --enable-debug configuration 2022-05-20 12:48:07 +02:00
fanquake
06e18e0b53
build: use BOOST_MULTI_INDEX_ENABLE_SAFE_MODE when debugging
Use of this macro enables precondition checks for iterators and
functions of the library. It's use is recommended in debug builds.

See:
https://www.boost.org/doc/libs/1_78_0/libs/multi_index/doc/tutorial/debug.html.
2022-05-19 09:43:43 +01:00
MacroFake
fafae678f6
build: Enable RPC_DOC_CHECK on --enable-debug 2022-05-19 07:54:57 +02:00
laanwj
51527ec1ec
Merge bitcoin/bitcoin#25051: Bugfix: configure: Define defaults for enable_arm_{crc,shani}
7fd0860d12 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
2022-05-11 20:24:27 +02:00
Hennadii Stepanov
a0e2a3133a
build: Drop redundant checks for ranlib and strip tools
These checks are handled by the `LT_INIT` macro.
2022-05-05 10:40:54 +02:00
fanquake
1ad5d5088d
Merge bitcoin/bitcoin#24866: build: No longer need to hack the PATH variable in config.site
efa3a807a6 build: No longer need to hack the `PATH` variable in `config.site` (Hennadii Stepanov)
f3af4f7a18 build: Let the depends build system define a path to `dsymutil` tool (Hennadii Stepanov)
b0a8ddabe5 build: Pass missed darwin-specific tools via `config.site` (Hennadii Stepanov)
f87594da14 build: No need to provide defaults for darwin-specific tools (Hennadii Stepanov)
80cd99322f scripted-diff: Rename INSTALLNAMETOOL -> INSTALL_NAME_TOOL (Hennadii Stepanov)
a4fd440741 build: Pass missed `strip` tool via `config.site` (Hennadii Stepanov)

Pull request description:

  This PR adds lacking definitions of absolute paths to some tools in the depends build system.

  This improvement makes possible to keep the `PATH` variable untouched during configuration.

  Also see https://github.com/bitcoin/bitcoin/pull/24566#discussion_r851125442.

  #### Guix builds on `x86_64`:
  ```
  $ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  93fa58bf2a1f5c15c5a547c014036ac79761e5c9622bd5099408ce570b39f02f  guix-build-efa3a807a677/output/aarch64-linux-gnu/SHA256SUMS.part
  ef5f53348404ba973dceaf088a4d47dfd0f1fa3d3bf75bdd723b043431de005d  guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu-debug.tar.gz
  6688b2295d564b32ea676c0540c43cdc5211322eddc87e0967b764284e847368  guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu.tar.gz
  4abb3428be477aa7360611689fd28950f30dbbac6a95c454095367d8df11ad72  guix-build-efa3a807a677/output/arm-linux-gnueabihf/SHA256SUMS.part
  8dd33389170e83812821d5dd68741db96af1376035ba40af0215a7ae95dcf7fc  guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf-debug.tar.gz
  544e97eb88b2a44c8ceb9660399eb5d49d75e07ff59fc03a701a595bacea0491  guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf.tar.gz
  219faf1131bdcffffd5979eafd2beabc4a300081f8b1df184852b7183dfbc0e8  guix-build-efa3a807a677/output/arm64-apple-darwin/SHA256SUMS.part
  602a417bfa7971fb26d0fe9921d2348fd0d01a5bcf0af93f8a9d50112076e0eb  guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.dmg
  0dcb197420844da8da3f528a1d986628f7b63adb1e83353d63e8a84da59abc42  guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.tar.gz
  10efdd33418234a8288c27a614f50e9ff45efbd681fa1c0e173142b6d267cdb8  guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin.tar.gz
  e5ef02adeb9bcb4675972b0dc233a904006b0940d721049eeb94b14cda34872e  guix-build-efa3a807a677/output/dist-archive/bitcoin-efa3a807a677.tar.gz
  a75d2a49b7a8ab1c849e1badff5049a417519f0154b65335a8717d01b8b6ed62  guix-build-efa3a807a677/output/powerpc64-linux-gnu/SHA256SUMS.part
  aef63d196487dd0bc597fd53633ac889149f1a126c651ea55f3bec11a092c460  guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu-debug.tar.gz
  ddc7913eed26270be271a8712bf351d562d57c746810ea3b7b4101aea8cb6d89  guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu.tar.gz
  83bbf4b1af07a2cf7d6014de7c885f0998dd38afacdb5242f5f56505ee704f17  guix-build-efa3a807a677/output/powerpc64le-linux-gnu/SHA256SUMS.part
  c9d5d95de98ed987b63a78d4f6e082cb36d5ec3ba71d130601e03d3ebfbd208d  guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu-debug.tar.gz
  88ed6ec82dd4c1c656fe80b4c49f91a4c15c2ab798dbbe16a3d57393f17d6f3a  guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu.tar.gz
  7b8e7b3b1e68a2ea0e37c058b284da11e9721ef4d1bc2761ed003b2061358d5f  guix-build-efa3a807a677/output/riscv64-linux-gnu/SHA256SUMS.part
  a5de4bedf2b4bc5ab25db21b942076897cabe8a40ce9b0637488af6b4d90693a  guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu-debug.tar.gz
  53023994202887778a001ce00daf7cdc135b9e6c3be034f31645ab4ba5f078c6  guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu.tar.gz
  c6664a61b81dfa080c466d2252a6db70165acbea6cfad51ada16970e9c08bb6f  guix-build-efa3a807a677/output/x86_64-apple-darwin/SHA256SUMS.part
  a528569ae4bf5e19401311649086a2d8e3fa5251b44550e623722968dfb111ea  guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.dmg
  9b0384cce7605b546ed581074955f2b9c33cf0817453842036e6224b423b814b  guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.tar.gz
  ebdbd2f3a6406233f27ee48be0ab014991fedba3c0831f79f4a4873f7abf3d7a  guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin.tar.gz
  05a8f71fe67f7193e71ea8bbe6f8df2e651b8ac7da3075ba25aacdd3515f7757  guix-build-efa3a807a677/output/x86_64-linux-gnu/SHA256SUMS.part
  30a17a1e3d795ea390cd1e0f3ef74c989b5768ae7415740fcca46befe4cb7206  guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu-debug.tar.gz
  66db846f3fd739089afa5c339659dbf5efb50572f2d29f8288bf24be9e8f1dd0  guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu.tar.gz
  bd3c44890823badcf6d296fa674de14275684be7593f4ab21c0316873ddd8652  guix-build-efa3a807a677/output/x86_64-w64-mingw32/SHA256SUMS.part
  6ce3ee21212ff2a95e085073a48194476ade2d5ff94cc1c8ec58a8ae7db8f1fa  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-debug.zip
  5e697c05537cfb2ce2ed95fef25e261e2cfa83a31fd548a98118580c4bbff2e4  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-setup-unsigned.exe
  4cc2bcff98845c792c0ed12a2ea407b25fb85b2d4250d88dca94ed68f42e714d  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-unsigned.tar.gz
  9d5d72271dc6b820e63b30c5c3f9015309777793100b4e2b6ab0c8ea0f7b4aed  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64.zip
  ```

ACKs for top commit:
  laanwj:
    Tested ACK efa3a807a6. I get the same build output as in OP:
  vincenzopalazzo:
    Re ACK efa3a807a6

Tree-SHA512: 6d35c11fc307221d61ad250bbdcdc09dbc49adbe43f7a94acb56190ae9f005d23fc22941ea59e3eb62811f8974e39d3617e0c47071232d4b1b0bc2e2e2782e88
2022-05-05 09:36:26 +01:00
Luke Dashjr
7fd0860d12 Bugfix: configure: Define defaults for enable_arm_{crc,shani} 2022-05-02 02:31:32 +00:00
laanwj
8730bd3fc8
Merge bitcoin/bitcoin#24958: build: Fix macOS Apple M1 build with miniupnpc and libnatpmp. Again :)
165903406e build: Fix `AC_CHECK_HEADERS` and `AC_CHECK_LIB` for `libnatpmp` package (Hennadii Stepanov)
65cddf604c build: Fix `AC_CHECK_HEADERS` and `AC_CHECK_LIB` for `miniupnpc` package (Hennadii Stepanov)
bbbcb96638 build, refactor: Fix indentation (Hennadii Stepanov)

Pull request description:

  Apparently, bitcoin/bitcoin#24391 broke the [ability](https://github.com/bitcoin/bitcoin/pull/22397) of the `configure` script to pick up Homebrew's `miniupnpc` and `libnatpmp` packages on macOS Apple M1.

  This PR fixes it.

ACKs for top commit:
  promag:
    Tested ACK 165903406e
  jarolrod:
    tACK 165903406e

Tree-SHA512: 93988f59f425890d60582b93d4ac5b2ad03011a5c6dbb44678a3ca591da7518c1c741bc1045b2c763bbe887947f32293b38d55fd7a96f09d2092ad34baa1db21
2022-04-28 19:26:46 +02:00
fanquake
dd17c42a16
Merge bitcoin/bitcoin#24322: [kernel 1/n] Introduce initial libbitcoinkernel
035fa1f07a build: Remove LIBTOOL_APP_LDFLAGS for bitcoin-chainstate (Cory Fields)
3f0595095d docs: Add libbitcoinkernel_la_SOURCES explanation (Carl Dong)
94ad45deb2 ci: Build libbitcoinkernel (Carl Dong)
26b2e7ffb3 build: Extract the libbitcoinkernel library (Carl Dong)
1df44dd20c b-cs: Define G_TRANSLATION_FUN in bitcoinkernel.cpp (Carl Dong)
83a0bb7cc9 build: Separate lib_LTLIBRARIES initialization (Carl Dong)
c1e16cb31f build: Create .la library for bitcoincrypto (Carl Dong)
8bdfe057c7 build: Create .la library for leveldb (Carl Dong)
05d1525b6d build: Create .la library for crc32c (Carl Dong)
64caf94479 build: Remove vestigial LIBLEVELDB_SSE42 (Carl Dong)
1392e8e2d8 build: Don't add unrelated libs to LIBTEST_* (Carl Dong)

Pull request description:

  Part of: #24303

  This PR introduces a `libbitcoinkernel` static library linking in the minimal list of files necessary to use our consensus engine as-is. `bitcoin-chainstate` introduced in #24304 now will link against `libbitcoinkernel`.

  Most of the changes are related to the build system.

  Please read the commit messages for more details.

ACKs for top commit:
  theuni:
    This may be my favorite PR ever. It's a privilege to ACK 035fa1f07a.

Tree-SHA512: b755edc3471c7c1098847e9b16ab182a6abb7582563d9da516de376a770ac7543c6fdb24238ddd4d3d2d458f905a0c0614b8667aab182aa7e6b80c1cca7090bc
2022-04-28 15:14:32 +01:00
MacroFake
9446de160f
Merge bitcoin/bitcoin#24831: tidy: add include-what-you-use
9b0a13a289 tidy: Add include-what-you-use (fanquake)
74cd038e30 refactor: fix includes in src/init (fanquake)
c79ad935f0 refactor: fix includes in src/compat (fanquake)

Pull request description:

  We recently added a [`clang-tidy` job](https://github.com/bitcoin/bitcoin/blob/master/ci/test/00_setup_env_native_tidy.sh) to the CI, which generates a compilation database. We can leverage that now existing database to begin running [include-what-you-use](https://include-what-you-use.org/) over the codebase.

  This PR demonstrates using a mapping_file to indicate fixups / includes that may differ from IWYU suggestions. In this case, I've added some fixups for glibc includes that I've [upstreamed changes for](https://github.com/include-what-you-use/include-what-you-use/pull/1026):
  ```bash
  # Fixups / upstreamed changes
  [
    { include: [ "<bits/termios-c_lflag.h>", private, "<termios.h>", public ] },
    { include: [ "<bits/termios-struct.h>", private, "<termios.h>", public ] },
    { include: [ "<bits/termios-tcflow.h>", private, "<termios.h>", public ] },
  ]
  ```

  The include "fixing" commits of this PR:
  * Adds missing includes.
  * Swaps C headers for their C++ counterparts.
  * Removes the pointless / unmaintainable `//for abc, xyz` comments. When using IWYU, if anyone wants to see / generate those comments, to see why something is included, it is trivial to do so (IWYU outputs them by default). i.e:
  ```cpp
  // The full include-list for compat/stdin.cpp:
  #include <compat/stdin.h>
  #include <poll.h>                  // for poll, pollfd, POLLIN
  #include <termios.h>               // for tcgetattr, tcsetattr
  #include <unistd.h>                // for isatty, STDIN_FILENO
  ```

  TODO:
  - [ ] Qt mapping_file. There is one in the IWYU repo, but it's for Qt 5.11. Needs testing.
  - [ ] Boost mapping_file. There is one in the IWYU repo, but it's for Boost 1.75. Needs testing.

  I'm not suggesting we turn this on the for entire codebase, or immediately go-nuts refactoring all includes. However I think our dependency includes are now slim enough, and our CI infrastructure in place such that we can start doing this in some capacity, and just automate away include fixups / refactorings etc.

ACKs for top commit:
  MarcoFalke:
    review ACK 9b0a13a289
  jonatack:
    ACK 9b0a13a289 reviewed changes and run CI output in https://cirrus-ci.com/task/4750910332076032

Tree-SHA512: 00beab5a5f2a6fc179abf08321a15391ecccaa91ab56f3c50c511e7b29a0d7c95d8bb43eac2c31489711086f6f77319d43d803cf8ea458e7cd234a780d9ae69e
2022-04-28 10:06:26 +02:00
Carl Dong
26b2e7ffb3 build: Extract the libbitcoinkernel library
I strongly recommend reviewing with the following git-diff flags:
  --patience --color-moved=dimmed-zebra

Extract out a libbitcoinkernel library linking in all files necessary
for using our consensus engine as-is. Link bitcoin-chainstate against
it.

See previous commit "build: Add example bitcoin-chainstate executable"
for more context.

We explicitly specify -fvisibility=default, which effectively overrides
the effects of --enable-reduced-exports since libbitcoinkernel requires
default symbol visibility

When compiling for mingw-w64, specify -static in both:

- ..._la_CXXFLAGS so that libtool will avoid building two versions of
  each object (one PIC, one non-PIC). We just need the one that is
  suitable for static linking.
- ..._la_LDFLAGS so that libtool will create a static library.

If we don't specify this, then libtool will prefer the non-static PIC
version of the object, which is built with -DDLL_EXPORT -DPIC for
mingw-w64 targets. This can cause symbol resolution problems when we
link this library against an executable that does specify -all-static,
since that will be built without the -DDLL_EXPORT flag.

Unfortunately, this means that for mingw-w64 we can only build a static
version of the library for now. This will be fixed.

However, on other targets, the shared library creation works fine.

-----

Note to users: You need to either specify:

  --enable-experimental-util-chainstate

or,

  --with-experimental-kernel-lib

To build the libbitcionkernel library. See the configure help for more
details.

build shared libbitcoinkernel where we can
2022-04-27 17:36:39 -04:00
fanquake
9c96f1008b
tidy: enable modernize-use-nullptr 2022-04-26 10:43:33 +01:00
Hennadii Stepanov
165903406e
build: Fix AC_CHECK_HEADERS and AC_CHECK_LIB for libnatpmp package 2022-04-24 15:55:04 +02:00
Hennadii Stepanov
65cddf604c
build: Fix AC_CHECK_HEADERS and AC_CHECK_LIB for miniupnpc package 2022-04-24 15:54:29 +02:00
Hennadii Stepanov
bbbcb96638
build, refactor: Fix indentation 2022-04-24 15:52:23 +02:00
Hennadii Stepanov
80cd99322f
scripted-diff: Rename INSTALLNAMETOOL -> INSTALL_NAME_TOOL
This change makes naming of `install_name_tool` consistent across
the whole build system.

-BEGIN VERIFY SCRIPT-
sed --in-place --expression='s/INSTALLNAMETOOL/INSTALL_NAME_TOOL/g' $(git grep --files-with-matches 'INSTALLNAMETOOL')
-END VERIFY SCRIPT-
2022-04-21 10:08:45 +02:00
fanquake
bfbce6cbfe
Merge bitcoin/bitcoin#24031: build: don't compress macOS DMG
1dd8cbfbc6 build: don't compress macOS DMG (fanquake)

Pull request description:

  Skip compressing the macOS DMG, and drop related build steps and dependencies. Uncompressed the DMG increases from ~16mb to ~30mb, which compared to other software a user may download, (Firefox 125mb, VLC 52mb, Open Office 176mb), is still relatively small. When contrasted against the 100's of GB of blockchain data a node will download, an additional 15mb to get the release binary, isn't much additional overhead. Note that if / when we build with LTO enabled for releases, this size will shrink back down significantly again.

  `native_libdmg-hfsplus` is not maintained, and I doubt the DMG creation feature will ever be fixed. If at some point `xorrisofs` supports compressing dmgs, we could enable that.

  Guix Build on x86_64:
  ```bash
  25b7c8bb7bc8ea014d43cebb844a842d2ac8d5a343039a820d24b649c9e6bc8a  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/SHA256SUMS.part
  16beb5c52c9bf51b5ce9ef5a0d17c0038238a833383586a1b14acbca78533e4b  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin-unsigned.dmg
  d8f89a61a7448d6334dbb3639386a7b6340542393933f35421a9e6dfc724e455  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin-unsigned.tar.gz
  11617dc261ef602433f5bb29956a40a9085dbc783f519f75fbe06e80970148d0  guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin.tar.gz
  aa8550d4a394d3161d14ec5e6012ed07354135afb022e905a1946785b4665664  guix-build-1dd8cbfbc631/output/dist-archive/bitcoin-1dd8cbfbc631.tar.gz
  2b837f2f971a9738d0b7b8497f7ded740ef5e67c8baa7f30ca33e6b7d826eec8  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/SHA256SUMS.part
  db972b2c06dbde5525a3f9e6ceb9c20a8120bc9a6f15e1d852a4bfac09d88569  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin-unsigned.dmg
  50fe990c3f9923ee92195125faf6517396e7c1b017a8f4f7d52e991ebce52f0c  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin-unsigned.tar.gz
  1d9022b0ae46ead41046c40f82291ce363760660a3cd6e6ef6a5b1128b90faef  guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin.tar.gz
  ```

  Guix Build on arm64:
  ```bash
  ```

ACKs for top commit:
  Sjors:
    re-tACK 1dd8cbfbc6 on Intel macOS
  laanwj:
    Build system changes code review ACK 1dd8cbfbc6, I don't know anything about MacOS application formats and their internals so do not have an opinion on the contents of this change.
  jarolrod:
    ACK 1dd8cbfbc6

Tree-SHA512: 04c5bf78f26a9877777093ec4c50c457107bef59d720839ea5e7d7e4f7961dfee9f86b40cf791524a9e60e9e77403a797e9fcdae3849b60b759f9f66cc31b6ab
2022-04-21 08:54:13 +01:00
fanquake
9b0a13a289
tidy: Add include-what-you-use 2022-04-20 14:14:52 +01:00
fanquake
7626e547b8
Merge bitcoin/bitcoin#24337: build: Do not define PROVIDE_FUZZ_MAIN_FUNCTION macro unconditionally
c9c4e6cadd build: Do not define `PROVIDE_FUZZ_MAIN_FUNCTION` macro unconditionally (Hennadii Stepanov)

Pull request description:

  No need to define the `PROVIDE_FUZZ_MAIN_FUNCTION` macro when the build system has been configured with the `--disable-fuzz-binary` option.

  See https://github.com/bitcoin/bitcoin/pull/24336#pullrequestreview-881368272.

ACKs for top commit:
  MarcoFalke:
    Approach ACK c9c4e6cadd did not review or test 🐤
  fanquake:
    ACK c9c4e6cadd Checked that `PROVIDE_FUZZ_MAIN_FUNCTION` isn't defined when configuring with `--disable-fuzz-binary`.

Tree-SHA512: 54fbf02ba9f5ecc61b176b8ea7d05e308788d4de3f97ed40913e731300d9dc0edfdfcbf8e0a6e74cf1b2e2ae63f6208a34e03b9c8d203d070c457c4a7d9b5f2c
2022-04-11 14:29:07 +01:00
fanquake
1dd8cbfbc6
build: don't compress macOS DMG 2022-04-11 10:34:30 +01:00
fanquake
747cdf1d65
Merge bitcoin/bitcoin#24792: Update libsecp256k1 subtree to current master
404c53062b key: use secp256k1_schnorrsig_sign32 over deprecated secp256k1_schnorrsig_sign (fanquake)
ee30bf7c01 build: remove some no-longer-needed var unexporting from configure (fanquake)
2656629767 build: remove --enable-experimental from libsecp256k1 configure (fanquake)
d960d4fd3a build: fix MSVC build after subtree update (dhruv)
afb7a6fe06 Squashed 'src/secp256k1/' changes from 0559fc6e41..8746600eec (fanquake)

Pull request description:

  The motivation for this bump is some small build cleanups, including [dropping the `--enable-experimental`](80cf4eea5f) flag from the libsecp configure  invocation, as well as some [now-redundant](https://github.com/bitcoin-core/secp256k1/pull/1090) `pkg-config` variable exporting from our own configure. We also get the benefit of a slightly more efficient libsecp configure due to https://github.com/bitcoin-core/secp256k1/pull/1088.

  This also includes a change in our code to migrate from using the [now deprecated](99e6568fc6) `secp256k1_schnorrsig_sign` to `secp256k1_schnorrsig_sign32`.

  Guix Build (on x86_64):
  ```bash
  b9f6ad90c75f7edd7c4444c6c3401d8b6ab29a8da22ae22ddaedd94688227b5d  guix-build-404c53062bb8/output/aarch64-linux-gnu/SHA256SUMS.part
  250d47ae299d8385d5590518fa2adaabde76e2566fd27e12bf36b62663d13e13  guix-build-404c53062bb8/output/aarch64-linux-gnu/bitcoin-404c53062bb8-aarch64-linux-gnu-debug.tar.gz
  48d610dc6f5169f925f782571dac2f082695f89008beadad4adef4c1b583a612  guix-build-404c53062bb8/output/aarch64-linux-gnu/bitcoin-404c53062bb8-aarch64-linux-gnu.tar.gz
  8f04ee26e4079719e3935bd0e4287cc11a2a16875bf01e2a63d67492a1fa5367  guix-build-404c53062bb8/output/arm-linux-gnueabihf/SHA256SUMS.part
  7d7d7fcfb032bda92e53abd8d608257f0ef17b1e3e52a1414260b896786fb2dc  guix-build-404c53062bb8/output/arm-linux-gnueabihf/bitcoin-404c53062bb8-arm-linux-gnueabihf-debug.tar.gz
  30bae2ff3d044f4e39f992a68f6b296b7be2aea350bca4a0415c739a32c20bd9  guix-build-404c53062bb8/output/arm-linux-gnueabihf/bitcoin-404c53062bb8-arm-linux-gnueabihf.tar.gz
  5f550fb0b950250eeffce3480ec6403530b0880570a5860ef6c32a3e92eac92f  guix-build-404c53062bb8/output/arm64-apple-darwin/SHA256SUMS.part
  c10664d13aeec8c860bf72be833c738973ae18e4d28cdf08b2f9bee960ebff1d  guix-build-404c53062bb8/output/arm64-apple-darwin/bitcoin-404c53062bb8-arm64-apple-darwin-unsigned.dmg
  becab75b11cf4ca6f559f8eef835f3574629f6eb932ac716ed4f8c044a85831f  guix-build-404c53062bb8/output/arm64-apple-darwin/bitcoin-404c53062bb8-arm64-apple-darwin-unsigned.tar.gz
  bc86433652fe3552f6a13088191364ae7514c9fe3a244da86a6db096bb4922fc  guix-build-404c53062bb8/output/arm64-apple-darwin/bitcoin-404c53062bb8-arm64-apple-darwin.tar.gz
  1f585cb9a1356343df4b2726ecfe2598c9903304afb047c047c2cef318555dd3  guix-build-404c53062bb8/output/dist-archive/bitcoin-404c53062bb8.tar.gz
  9ede534ba2c6cecb550473eead195627327e826ebb0118e23d60ab482d40e241  guix-build-404c53062bb8/output/powerpc64-linux-gnu/SHA256SUMS.part
  77ddb7d7d639b1dd4508468a8ef27e45b35c8b2f8624584a70e6b64798a4ea7a  guix-build-404c53062bb8/output/powerpc64-linux-gnu/bitcoin-404c53062bb8-powerpc64-linux-gnu-debug.tar.gz
  36178c1f1c12942ff05275daa3570f8b45419ee8d9f391d750afb405219986f0  guix-build-404c53062bb8/output/powerpc64-linux-gnu/bitcoin-404c53062bb8-powerpc64-linux-gnu.tar.gz
  8a15a4da7a9a5e00c49d9aeedf3c6fc666c0d230be1369eac7caf4571d5905e0  guix-build-404c53062bb8/output/powerpc64le-linux-gnu/SHA256SUMS.part
  400c58113f2d07c87e03c8528b292c6aca808a2bccae4b041cad3a26a05b6aad  guix-build-404c53062bb8/output/powerpc64le-linux-gnu/bitcoin-404c53062bb8-powerpc64le-linux-gnu-debug.tar.gz
  3b9f9d8614ac3a27416e53354b2b0a64d364f91493e9d0f41583a6f492546824  guix-build-404c53062bb8/output/powerpc64le-linux-gnu/bitcoin-404c53062bb8-powerpc64le-linux-gnu.tar.gz
  98506b23ee08ad8af958f816da2e4518d661e88d5c6308de1f5e3b2fc787b86c  guix-build-404c53062bb8/output/riscv64-linux-gnu/SHA256SUMS.part
  c701a7b77cea4fdc2588b511f1b2c71b89c83bfba19fdb2ac113a5a4b14ac392  guix-build-404c53062bb8/output/riscv64-linux-gnu/bitcoin-404c53062bb8-riscv64-linux-gnu-debug.tar.gz
  34d58e6392cd58b3c76e30cd8600c0dbefba7e9c6d5df78c3ef23e81c4e4d26a  guix-build-404c53062bb8/output/riscv64-linux-gnu/bitcoin-404c53062bb8-riscv64-linux-gnu.tar.gz
  92fa30e9c6d81dd1e1514b65d3e1abe68ded897237cd99f66aa760d445109c04  guix-build-404c53062bb8/output/x86_64-apple-darwin/SHA256SUMS.part
  bee180b02f178ae9980ef159f65913a71cbd037c4aff5f2906af5f174a677da3  guix-build-404c53062bb8/output/x86_64-apple-darwin/bitcoin-404c53062bb8-x86_64-apple-darwin-unsigned.dmg
  ad7d18d779ab7a7944817d1f368d0a6bdd174bf1211b0f90180c8ccf04ec4062  guix-build-404c53062bb8/output/x86_64-apple-darwin/bitcoin-404c53062bb8-x86_64-apple-darwin-unsigned.tar.gz
  7489d1d5d48ad95cf58bb11b5fdeccadac6fa758784fb498529fca2330abe069  guix-build-404c53062bb8/output/x86_64-apple-darwin/bitcoin-404c53062bb8-x86_64-apple-darwin.tar.gz
  74660fb0ebce2a08b03980a57bffcad62e078dc967a74d2395660ff51c019640  guix-build-404c53062bb8/output/x86_64-linux-gnu/SHA256SUMS.part
  cd377fa6b46276c2f8a32e199e6f9adf6aa67315688656709d6dc0744d54a837  guix-build-404c53062bb8/output/x86_64-linux-gnu/bitcoin-404c53062bb8-x86_64-linux-gnu-debug.tar.gz
  919c521950369d8ad46db2d15b00abb488abfb080d157a41b2db429122a428ed  guix-build-404c53062bb8/output/x86_64-linux-gnu/bitcoin-404c53062bb8-x86_64-linux-gnu.tar.gz
  2debca995d432965a8786b6ff74aed42e9e2f1cb0fecbe2d9fc5b850c192fcff  guix-build-404c53062bb8/output/x86_64-w64-mingw32/SHA256SUMS.part
  e33169f684fb031ec18ed39812617d3eb263257f6c7564b8f4c974ad05fe672c  guix-build-404c53062bb8/output/x86_64-w64-mingw32/bitcoin-404c53062bb8-win64-debug.zip
  029d0a4180cb908d517fcf689dcf46d42fbf383e11dc609711617066ae039ab0  guix-build-404c53062bb8/output/x86_64-w64-mingw32/bitcoin-404c53062bb8-win64-setup-unsigned.exe
  7e349c688cac66436562c4805f420b0536db5a3b3abf54d0e8c7752f59874a5c  guix-build-404c53062bb8/output/x86_64-w64-mingw32/bitcoin-404c53062bb8-win64-unsigned.tar.gz
  1bff98e82e95c93d6060227408502f5e2d8597d526b912cb6dc0a90ae3094a8f  guix-build-404c53062bb8/output/x86_64-w64-mingw32/bitcoin-404c53062bb8-win64.zip
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 404c53062b, I checked the changes to our tree thoroughly but didn't review all upstream secp256k1 changes in detail.
  gruve-p:
    ACK 404c53062b
  real-or-random:
    utACK 404c53062b I reviewed the diff to Core, I'm with updating to libsecp256k1 master, but I haven't verified that the libsecp256k1 tree here has been updated correctly

Tree-SHA512: e6a6db93ea60ed500df5065178784a915da94adfa7bd45fdbd7b19d701154987ff38c1df7f318119e6c2cb98e28e1ea2eb725bef93d4088403e14537ebffb032
2022-04-09 20:18:54 +01:00
fanquake
ee30bf7c01
build: remove some no-longer-needed var unexporting from configure 2022-04-07 22:24:44 +01:00
fanquake
2656629767
build: remove --enable-experimental from libsecp256k1 configure 2022-04-07 22:24:43 +01:00
fanquake
eaf712c801
lint: codespell 2.1.0 2022-04-07 12:49:51 +01:00
fanquake
d906329c28
Merge bitcoin/bitcoin#24681: build: Bump libevent minimum version up to 2.1.8
e40779a4fe refactor: Remove outdated libevent logging code (Fabian Jahr)
0598f36852 refactor: account for requiring libevent 2.1.8+ (fanquake)
aaf72d62c1 build: Bump libevent minimum version up to 2.1.8 (Hennadii Stepanov)

Pull request description:

  Required to support new functionality in bitcoin/bitcoin#19420.

  `libevent` availability: https://repology.org/project/libevent/versions

ACKs for top commit:
  laanwj:
    Code review ACK e40779a4fe
  fanquake:
    ACK e40779a4fe

Tree-SHA512: ccb14ea2f591484a3df5bc4a19f4f5400ef6b1cfb7dc45dd99f96cb948748215ed3b5debc34869763c91b8c7a26993fdb9b870950c0743c4d01038ab27c5e4e2
2022-04-06 13:19:36 +01:00
laanwj
6c9460edae
Merge bitcoin/bitcoin#24358: test: USDT tracepoint interface tests
76c60d7b31 test: validation:block_connected tracepoint test (0xb10c)
260e28ece8 test: utxocache:* tracepoint tests (0xb10c)
34b27bac68 test: net:in/out_message tracepoint tests (0xb10c)
c934087b62 test: checks for tracepoint tests (0xb10c)

Pull request description:

  This adds functional tests for the USDT tracepoints added in https://github.com/bitcoin/bitcoin/pull/22006 and https://github.com/bitcoin/bitcoin/pull/22902. This partially fixes #23296. The tests **are probably skipped** on most systems as these tests require:
  - a Linux system with a kernel that supports BPF (and available kernel headers)
  - that Bitcoin Core is compiled with tracepoints for USDT support (default when compiled with depends)
  - [bcc](https://github.com/iovisor/bcc) installed
  - the tests are run with a privileged user that is able to e.g. do BPF syscalls and load BPF maps

  The tests are not yet run in our CI as the CirrusCI containers lack the required permissions (see https://github.com/bitcoin/bitcoin/issues/23296#issuecomment-1024920845). Running the tests in a VM in the CI could work, but I haven't experimented with this yet. The priority was to get the actual tests done first to ensure the tracepoints work as intended for the v23.0 release. Running the tracepoint tests in the CI is planned as the next step to finish #23296.

  The tests can, however, be run against e.g. release candidates by hand. Additionally, they provide a starting point for tests for future tracepoints. PRs adding new tracepoint should include tests. This makes reviewing these PRs easier.

  The tests require privileges to execute BPF sycalls (`CAP_SYS_ADMIN` before Linux kernel 5.8 and `CAP_BPF` and `CAP_PERFMON` on 5.8+) and permissions to `/sys/kernel/debug/tracing/`. It's currently recommended to run the tests in a virtual machine (or on a VPS) where it's sensible to use the `root` user to gain these privileges. Never run python scripts you haven't carefully reviewed with `root` permissions! It's unclear if a non-root user can even gain the required privileges. This needs more experimenting.

  The goal here is to test the tracepoint interface to make sure the [documented interface](https://github.com/bitcoin/bitcoin/blob/master/doc/tracing.md#tracepoint-documentation) does not break by accident. The tracepoints expose implementation details. This means we also need to rely on implementation details of Bitcoin Core in these functional tests to trigger the tracepoints. An example is the test of the `utxocache:flush` tracepoint: On Bitcoin Core shutdown, the UTXO cache is flushed twice. The corresponding tracepoint test expects two flushes, too - if not, the test fails. Changing implementation details could cause these tests to fail and the tracepoint API to break. However, we purposefully treat the tracepoints only as [**semi-stable**](https://github.com/bitcoin/bitcoin/blob/master/doc/tracing.md#semi-stable-api). The tracepoints should not block refactors or changes to other internals.

ACKs for top commit:
  jb55:
    tACK 76c60d7b31
  laanwj:
    Tested ACK 76c60d7b31

Tree-SHA512: 9a63d945c68102e59d751bd8d2805ddd7b37185408fa831d28a9cb6641b701961389b55f216c475df7d4771154e735625067ee957fc74f454ad7a7921255364c
2022-04-06 13:07:26 +02:00
fanquake
372f1a3c25
Merge bitcoin/bitcoin#24753: ci: Add clang-tidy task
fab24f8c35 ci: Add clang-tidy task (MarcoFalke)

Pull request description:

  Fixes #24747

ACKs for top commit:
  fanquake:
    ACK fab24f8c35
  vincenzopalazzo:
    Code Review ACK fab24f8c35

Tree-SHA512: 87a5d67a23d540cea09925a6c186303c1249d4ca244b95940c5214860bf7a849fa12cc4fcf1bb9270b1004407124b3487902969d8ae9d2b14dae1fdfb57cc7e8
2022-04-06 10:10:41 +01:00
Hennadii Stepanov
c9c4e6cadd
build: Do not define PROVIDE_FUZZ_MAIN_FUNCTION macro unconditionally 2022-04-06 08:54:48 +02:00
fanquake
0baf6aded5
Merge bitcoin/bitcoin#24391: build: stop overriding user autoconf flags
7b00595d33 build: stop overriding user CXXFLAGS (fanquake)
3e2ef23c3e build: stop overriding user LDFLAGS (fanquake)
35c3fd43c3 build: stop overriding user CPPFLAGS (fanquake)
bc7cc57607 doc: explain why we clear CXXFLAGS with enable-debug (fanquake)

Pull request description:

  Historically our build system has hijacked `CXXFLAGS` and friends, and this has always been a source of complaints from users and developers. With this PR, we move away from using `CXXFLAGS`, `CPPFLAGS` and `LDFLAGS`, and instead use `CORE_*FLAGS` variables for our flags / options, leaving autoconfs `FLAG` vars to the user.

  Note that there are currently two cases where we will at least clear `CXXFLAGS` (if not alreaddy overridden by the user), when doing debugging or when coverage is enabled, to avoid Autoconfs `-g -O2` CXXFLAG default.

ACKs for top commit:
  hebasto:
    ACK 7b00595d33

Tree-SHA512: bda936a7aa8f98a1bf1552306845cb4bbab54e19a7a0b9ce3210e10fef70db146e9fe42a0cc8c50b2908506771b5b96f39c334e41323b70ec878e4010373096c
2022-04-05 09:33:58 +01:00
MarcoFalke
fab24f8c35
ci: Add clang-tidy task 2022-04-04 11:57:06 +02:00
MarcoFalke
62efdfb3be
Merge bitcoin/bitcoin#24558: build: explicitly disable Boost multi_index serialization
0d01272cd8 build: don't use Boost multi_index serialization (fanquake)

Pull request description:

  We don't use the serialization or archiving facilities of multi_index.
  So globally disable support, which gives a minor improvement in build
  time, i.e less preprocessing work, given we don't link any Boost libs.

  See: https://www.boost.org/doc/libs/1_78_0/libs/multi_index/doc/tutorial/creation.html

  > Serialization capabilities are automatically provided by just linking with the appropriate Boost.Serialization library module: it is not necessary to explicitly include any header from Boost.Serialization, apart from those declaring the type of archive used in the process. If not used, however, serialization support can be disabled by globally defining the macro BOOST_MULTI_INDEX_DISABLE_SERIALIZATION. Disabling serialization for Boost.MultiIndex can yield a small improvement in build times, and may be necessary in those defective compilers that fail to correctly process Boost.Serialization headers.

ACKs for top commit:
  MarcoFalke:
    cr ACK 0d01272cd8

Tree-SHA512: 87c664a2f142dc6b8f8598341f9829be3fda8cf614d73cc9a894c8033ee40c6daa9b50f4049ecb1f1e3aaf342568d9a5f5c65af1e04c36ee3a9cb46eca95767b
2022-04-04 09:54:48 +02:00
fanquake
7b00595d33
build: stop overriding user CXXFLAGS
Let users have the final say in regards to CXXFLAGS.
2022-04-03 19:36:17 +01:00
fanquake
3e2ef23c3e
build: stop overriding user LDFLAGS
Let the user have the final say in regards to LDFLAGS.
2022-04-03 19:36:17 +01:00
fanquake
35c3fd43c3
build: stop overriding user CPPFLAGS
Let the user have the final say in regards to CPPFLAGS
2022-04-03 19:36:11 +01:00
fanquake
bc7cc57607
doc: explain why we clear CXXFLAGS with enable-debug 2022-04-02 18:49:43 +01:00
fanquake
0d01272cd8
build: don't use Boost multi_index serialization
We don't use the serialilzation or archiving facilities of multi_index.
So globally disable support, which gives a minor improvement in build
time, i.e less preprocessing work.

See: https://www.boost.org/doc/libs/1_78_0/libs/multi_index/doc/tutorial/creation.html
2022-04-02 15:46:40 +01:00
fanquake
3d70c05868
build: remove faketime unsetting and comments from configure.ac 2022-04-01 11:52:27 +01:00
MarcoFalke
f4fba57829
Merge bitcoin/bitcoin#24704: compat: remove strnlen back-compat code
d4ba2b2cbc compat: remove strnlen back-compat code (fanquake)

Pull request description:

  This was needed for mingw (not mingw-w64), and some older versions of
  macOS, which we no-longer support.

ACKs for top commit:
  hebasto:
    ACK d4ba2b2cbc

Tree-SHA512: d1beb9df58464feea3076091361d7d46e4a8901e347644a5fa6f24e052ca24ee0c7c0dd3f2a3d682b0204bf50430fa89eac62121691ea08af6dcf6b907bdec87
2022-03-30 08:19:09 +02:00
laanwj
9e32adbb5c
Merge bitcoin/bitcoin#24523: build: Fix Boost.Process test for Boost 1.78
532c64a726 build: Fix Boost.Process test for Boost 1.78 (Hennadii Stepanov)

Pull request description:

  Rebased #24415 with Luke's suggestion.

  Fixes #24413.

ACKs for top commit:
  hebasto:
    ACK 532c64a726, tested on Mac mini (M1, 2020) + macOS Monterey 12.3 (21E230).

Tree-SHA512: 74f779695f6bbc45a2b7341a1402f747cc0d433d74825c7196cb9f156db0c0299895365f01665bd0bff12a8ebb5ea33a29b9a52f5eac0007ec35d1dca6544705
2022-03-29 13:36:45 +02:00
fanquake
d4ba2b2cbc
compat: remove strnlen back-compat code
This was needed for mingw (not mingw-w64), and some older versions of
macOS, which we no-longer support.
2022-03-29 10:15:33 +01:00
fanquake
7c72eabb57
Merge bitcoin/bitcoin#24633: Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets
5a157eb370 Bugfix: configure: Only avoid -isystem for exact /usr/include path (Luke Dashjr)
556ee6f2fa 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 5a157eb370, tested on Ubuntu 22.04 with clang 14.0.
  vasild:
    ACK 5a157eb370

Tree-SHA512: 5c8c282b647b7853b8fad1b5b473703c4a0635073d2685a8ac984151046e2c6a859e6972465419d27356dd29a47f21a2a3a6ad402ec434fe1f9882e5a35f0749
2022-03-29 10:03:53 +01:00
Hennadii Stepanov
aaf72d62c1
build: Bump libevent minimum version up to 2.1.8
Required to support new functionality.
2022-03-26 09:04:19 +01:00
fanquake
213e98ca82
Merge bitcoin/bitcoin#24169: build: Add --enable-c++20 option
999982b06c build: Add --enable-c++20 option (MarcoFalke)
fae679065e Add CSerializedNetMsg::Copy() helper (MarcoFalke)
fabb7c4ba6 Make fs.h C++20 compliant (MarcoFalke)
fae2220f4e scheduler: Capture ‘this’ explicitly in lambda (MarcoFalke)

Pull request description:

  This is for CI and devs only and doesn't change that C++17 is the standard we are currently using. The option `--enable-c++20` allows CI to check that the C++17 code in the repo is  also valid C++20. (There are some cases where valid C++17 doesn't compile under C++20).

  Also, it allows developers to easily play with C++20 in the codebase.

ACKs for top commit:
  ryanofsky:
    Code review ACK 999982b06c. Since last review was rebased, and enum-conversion change was dropped, and CSerializedNetMsg copy workaround was added
  fanquake:
    utACK 999982b06c

Tree-SHA512: afc95ba03ea2b937017fc8e2b1449379cd2b6f7093c430d2e344c665a00c51e402d6651cbcbd0be8118ea1e54c3a86e67d2021d19ba1d4da67168e9fcb6b6f83
2022-03-24 13:01:01 +00:00
MarcoFalke
999982b06c
build: Add --enable-c++20 option 2022-03-24 11:37:42 +01:00
fanquake
061accfddd
build: require libtool 2.4.2
Every system we support has 2.4.6 available, except for OpenBSD, which
currently ships with 2.4.2 (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 #24615.

See also: https://repology.org/project/libtool/versions
2022-03-23 13:33:43 +00:00
Luke Dashjr
5a157eb370 Bugfix: configure: Only avoid -isystem for exact /usr/include path 2022-03-22 14:13:13 +00:00
Luke Dashjr
556ee6f2fa Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets
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.
2022-03-21 23:54:50 +00:00
Hennadii Stepanov
532c64a726 build: Fix Boost.Process test for Boost 1.78 2022-03-21 16:52:27 +00:00
Hennadii Stepanov
1d4157a42b
build: Fix Boost.Process detection on macOS arm64
Could be tested as follows:
```
% brew install boost@1.76
% ./autogen.sh
% ./configure --with-boost='/opt/homebrew/opt/boost@1.76'
```
2022-03-10 13:07:42 +01:00
fanquake
c9ed9927bb
Merge bitcoin/bitcoin#24132: build: Bump minimum Qt version to 5.11.3
956f7322f6 build: Bump minimum Qt version to 5.11.3 (Hennadii Stepanov)
e22d10b936 ci: Switch from bionic to buster (Hennadii Stepanov)

Pull request description:

  The current minimum Qt version is 5.9.5 which has been set in bitcoin/bitcoin#21286.

  Distro support:
  - centos 7 -- unsupported since bitcoin/bitcoin#23511
  - centos 8 -- [5.15.2](http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/qt5-qtbase-5.15.2-3.el8.x86_64.rpm)
  - buster -- [5.11.3](https://packages.debian.org/buster/libqt5core5a)
  - bullseye  -- [5.15.2](https://packages.debian.org/bullseye/libqt5core5a)
  - _bionic_ -- [5.9.5](https://packages.ubuntu.com/bionic/libqt5core5a)
  - focal -- [5.12.8](https://packages.ubuntu.com/focal/libqt5core5a)

  As another Ubuntu LTS is coming soon, it seems unreasonable to stick to Qt 5.9 which support [ended](https://www.qt.io/blog/2017/06/07/renewed-qt-support-services) on 2020-05-31. Anyway, it's still possible to build Bitcoin Core GUI with depends on bionic system.

  Bumping the minimum Qt version allows to make code safer and more reliable, e.g.:
  - functor-parameter overload of [`QMetaObject::invokeMethod`](https://doc.qt.io/qt-5/qmetaobject.html#invokeMethod-4)
  - fixed https://bugreports.qt.io/browse/QTBUG-10907

  An example of the patch using the functor-overload of `QMetaObject::invokeMethod`:
  ```diff
  --- a/src/qt/walletmodel.cpp
  +++ b/src/qt/walletmodel.cpp
  @@ -349,7 +349,7 @@ bool WalletModel::changePassphrase(const SecureString &oldPass, const SecureStri
   static void NotifyUnload(WalletModel* walletModel)
   {
       qDebug() << "NotifyUnload";
  -    bool invoked = QMetaObject::invokeMethod(walletModel, "unload");
  +    bool invoked = QMetaObject::invokeMethod(walletModel, &WalletModel::unload);
       assert(invoked);
   }

  ```
  It uses the same new syntax as signal-slot connection with compile-time check. Also see bitcoin/bitcoin#16348.

  This PR is intended to be merged early [after](https://github.com/bitcoin/bitcoin/issues/22969) branching `23.x` off.

ACKs for top commit:
  MarcoFalke:
    cr ACK 956f7322f6
  fanquake:
    ACK 956f7322f6

Tree-SHA512: 3d652bcdcd990ce785ad412ed70234d4f27743895e535a53ed44b35d4afc3052e066c4c84f417e30bc53d0a3dd9ebed62444c57b7c765cb1e9aa687fbf866877
2022-03-07 14:53:23 +00:00
MarcoFalke
619f8a27ad
Merge bitcoin/bitcoin#24304: [kernel 0/n] Introduce bitcoin-chainstate
2c03cec2ff ci: Build bitcoin-chainstate (Carl Dong)
095aa6ca37 build: Add example bitcoin-chainstate executable (Carl Dong)

Pull request description:

  Part of: #24303

  This PR introduces an example/demo `bitcoin-chainstate` executable using said library which can print out information about a datadir and take in new blocks on stdin.

  Please read the commit messages for more details.

  -----

  #### You may ask: WTF?! Why is `index/*.cpp`, etc. being linked in?

  This PR is meant only to capture the state of dependencies in our consensus engine as of right now. There are many things to decouple from consensus, which will be done in subsequent PRs. Listing the files out right now in `bitcoin_chainstate_SOURCES` is purely to give us a clear picture of the task at hand, it is **not** to say that these dependencies _belongs_ there in any way.

  ### TODO

  1. Clean up `bitcoin-chainstate.cpp`
     It is quite ugly, with a lot of comments I've left for myself, I should clean it up to the best of my abilities (the ugliness of our init/shutdown might be the upper bound on cleanliness here...)

ACKs for top commit:
  ajtowns:
    ACK 2c03cec2ff
  ryanofsky:
    Code review ACK 2c03cec2ff. Just rebase, comments, formatting change since last review
  MarcoFalke:
    re-ACK 2c03cec2ff 🏔

Tree-SHA512: 86e7fb5718caa577df8abc8288c754f4a590650d974df9d2f6476c87ed25c70f923c4db651c6963f33498fc7a3a31f6692b9a75cbc996bf4888c5dac2f34a13b
2022-03-03 19:31:36 +00:00
laanwj
e0cb7b371f
build: Bump version to 23.99
On the master branch, bump to 23.99 (pre-24.0).

Tree-SHA512: 1e3b0cee8a2b5080170b59a4c445a3c1b69b99152e8eec7eba7080ab447cc6f9c6bd8f69df2b18ee9416de44a6ed88009a200ad26e89275f6230339330d12314
2022-03-03 18:56:45 +01:00
laanwj
25290071c4
Merge bitcoin/bitcoin#24397: build: Fix Boost.Process check for Boost 1.73 and older
774323e378 ci: Force `--enable-external-signer` to prevent future regressions (Hennadii Stepanov)
69978858a4 build: Fix Boost.Process check for Boost 1.73 and older (Hennadii Stepanov)
2199ef79cb build: Fix a non-portable use of `test` (Hennadii Stepanov)
d436c488d4 build, refactor: Replace tabs with spaces (Hennadii Stepanov)

Pull request description:

  On master (5f44c5c428) Boost.Process check false fails without the `-lpthread` flag.

  ```
  $ grep -C 2 pthread_detach config.log
  /usr/bin/ld: /tmp/cczCQfQv.o: in function `boost::asio::detail::posix_global_impl<boost::asio::system_context>::~posix_global_impl()':
  conftest.cpp:(.text._ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED2Ev[_ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED5Ev]+0xa3): undefined reference to `pthread_join'
  /usr/bin/ld: conftest.cpp:(.text._ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED2Ev[_ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED5Ev]+0xc4): undefined reference to `pthread_detach'
  collect2: error: ld returned 1 exit status
  configure:26674: $? = 1
  ```

  Not required for Boost 1.74+.

ACKs for top commit:
  laanwj:
    Code review ACK 774323e378, is a bugfix/workaround, seems fine to merge last minute for 23.0.

Tree-SHA512: 2a9d4b67fd8910e107af972d8c223286b7c933bc310616f86c8b6d8c903438916980fc76bd7e37f2698f6ce5361dc706cbf2933d1ac2c081bcabe1b83ca7d6b6
2022-02-28 14:06:16 +01:00
fanquake
80e78b6a04
build: pass win32-dll to LT_INIT()
This is the recommended way to support building PE DLLs with modern mingw 
toolchains and libtool. I made a similar change upstream in the secp256k1 
repo: https://github.com/bitcoin-core/secp256k1/pull/1022. Note that we already
pass `-no-undefined` to our libtool LDFLAGS.

> This option should be used if the package has been ported to build clean
> dlls on win32 platforms.
> If this macro is not used, libtool will assume that the package libraries
> are not dll clean and will build only static libraries on win32 hosts.

See:
https://www.gnu.org/software/libtool/manual/libtool.html#LT_005fINIT
https://www.gnu.org/software/gnulib/manual/html_node/Libtool-and-Windows.html
https://autotools.io/libtool/windows.html
https://github.com/bitcoin-core/secp256k1/issues/923
2022-02-22 15:37:13 +00:00
Hennadii Stepanov
69978858a4
build: Fix Boost.Process check for Boost 1.73 and older 2022-02-22 13:00:42 +02:00
Hennadii Stepanov
2199ef79cb
build: Fix a non-portable use of test 2022-02-20 17:38:57 +02:00
Hennadii Stepanov
d436c488d4
build, refactor: Replace tabs with spaces 2022-02-20 17:38:57 +02:00
0xb10c
c934087b62
test: checks for tracepoint tests
For testing the USDT tracepoint API in the functional tests we
require:
 - that we are on a Linux system*
 - that Bitcoin Core is compiled with tracepoints
 - that bcc and the the Python bcc module [0] is installed
 - that we run the tests with the required permissions**
otherwise we skip the tests.

*:  We currently only support tracepoints on Linux. Tracepoints are
    not compiled on other platforms.
**: Currently, we check for root permissions via getuid == 0. It's
    unclear if it's even possible to run the tests a non-root user
    with e.g. CAP_BPF, CAP_PERFMON, and access to /sys/kernel/debug/
    tracing/. Anyone running these tests as root should carefully
    review them first and then run them in a disposable VM.

[0]: https://github.com/iovisor/bcc/blob/master/INSTALL.md
2022-02-20 14:59:08 +01:00
MarcoFalke
566df80624
Merge bitcoin/bitcoin#24336: Print enable_fuzz_binary in configure
faef344f84 Print enable_fuzz_binary in configure (MarcoFalke)

Pull request description:

  A *disabled* `enable_fuzz` on current master does *not* mean the the fuzz binary is not compiled. This is confusion, so fix it.

  * `enable_fuzz` toggles compilation flags for fuzzing and disables all other target. There is no need to print this in the configure result, because the compilation flags are already printed. Also, all other targets are already printed as `no`.
  * `enable_fuzz_binary` does what it says it does and is currently not printed. So print it.

ACKs for top commit:
  hebasto:
    ACK faef344f84, tested on Linux Mint 20.2 (x86_64):

Tree-SHA512: 9b02b05c4b9c5fc92cf3487497392690303c36eace5e217f18b4349f059b5a23a7c0e0d030fb6fa7bbad83e927576a5e81c00099164f9ed8e185c0969dc17689
2022-02-15 09:30:16 +01:00
fanquake
988058defb
Merge bitcoin/bitcoin#24254: build: Add Boost.Process usage check
abc057c603 build: Add Boost.Process usage check (Hennadii Stepanov)

Pull request description:

  This PR adds a check that Boost.Process can be used without linking any libraries (header-only).
  Disable the functionality if that is not the case.

  Fixes bitcoin/bitcoin#24314.

ACKs for top commit:
  fanquake:
    ACK abc057c603

Tree-SHA512: ed2a32b1f751ec6f88cc7220766edd4cdab93c1d0515c892aa3094ee8d5b13ef569830d6e7a7a00c0197b117585dc526d00d943cc99a1f8c8a66ac4e20fe2061
2022-02-14 20:21:10 +00:00
laanwj
c23bf06492
Merge bitcoin/bitcoin#24115: ARMv8 SHA2 Intrinsics
aaa1d03d3a Add optimized sha256d64_arm_shani::Transform_2way (Pieter Wuille)
fe0629852a Implement sha256_arm_shani::Transform (Pavol Rusnak)
48a72fa81f Add sha256_arm_shani to build system (Pavol Rusnak)
c2b7934250 Rename SHANI to X86_SHANI to allow future implementation of ARM_SHANI (Pavol Rusnak)

Pull request description:

  This PR adds support for ARMv8 SHA2 Intrinsics.

  Fixes https://github.com/bitcoin/bitcoin/issues/13401 and https://github.com/bitcoin/bitcoin/issues/17414

  * Integration part was done by me.
  * The original SHA2 NI code comes from https://github.com/noloader/SHA-Intrinsics/blob/master/sha256-arm.c
  * Minor optimizations from https://github.com/rollmeister/bitcoin-armv8/blob/master/src/crypto/sha256.cpp are applied too.
  * The 2-way transform added by @sipa

ACKs for top commit:
  laanwj:
    Code review and lightly tested ACK aaa1d03d3a

Tree-SHA512: 9689d6390c004269cb1ee79ed05430d7d35a6efef2554a2b6732f7258a11e7e959b3306c04b4e8637a9623fb4c12d1c1b3592da0ff0dc6d737932db302509669
2022-02-14 21:12:39 +01:00
Carl Dong
095aa6ca37 build: Add example bitcoin-chainstate executable
The bitcoin-chainstate executable serves to surface the dependencies
required by a program wishing to use Bitcoin Core's consensus engine as
it is right now.

More broadly, the _SOURCES list serves as a guiding "North Star" for the
libbitcoinkernel project: as we decouple more and more modules of the
codebase from our consensus engine, this _SOURCES list will grow shorter
and shorter. One day, only what is critical to our consensus engine will
remain. Right now, it's "the minimal list of files to link in to even
use our consensus engine".

[META] In a future commit the libbitcoinkernel library will be extracted
       from bitcoin-chainstate, and the libbitcoinkernel library's
       _SOURCES list will be the list that we aim to shrink.
2022-02-14 14:53:46 -05:00
Hennadii Stepanov
abc057c603
build: Add Boost.Process usage check
Check that Boost.Process can be used without linking any libraries
(header-only). Disable the functionality if that is not the case.
2022-02-14 19:34:00 +02:00
MarcoFalke
faef344f84
Print enable_fuzz_binary in configure 2022-02-14 10:17:12 +01:00
fanquake
2037a3b6c1
build: header-only Boost 2022-02-13 20:59:07 +00:00
fanquake
39e66e938f
build: use header-only Boost unit test 2022-02-13 20:59:02 +00:00
laanwj
a7e80449c0
Merge bitcoin/bitcoin#24238: random: use arc4random on OpenBSD
0c49e52b22 build: remove unneeded getentropy detection (HAVE_GETENTROPY) (Sebastian Falbesoner)
5cd15ffdce random: use arc4random on OpenBSD (Sebastian Falbesoner)

Pull request description:

  Inspired by a discussion on obtaining randomness on various OSes in a secp256k1 PR (https://github.com/bitcoin-core/secp256k1/pull/748#discussion_r524605472, see also https://bitcoincore.reviews/libsecp256k1-748), I think it makes sense to follow best practices and use `arc4random_buf` rather than `getentropy` on OpenBSD in our random module.

  The [getentropy(2) man page](https://man.openbsd.org/getentropy.2) states:
  ```
  getentropy() is not intended for regular code; please use the
  arc4random(3) family of functions instead.
  ```

  The [arc4random(3) man page](https://man.openbsd.org/arc4random.3) states:

  ```
  Use of these functions is encouraged for almost all random number
  consumption because the other interfaces are deficient in either quality,
  portability, standardization, or availability.
  ```
  On the linked PR discussion worries about using RC4 internally has been expressed (see https://security.stackexchange.com/questions/85601/is-arc4random-secure-enough/172905#172905), but this would only affect users of OpenBSD <5.5, using a version that was released more than 8 years ago.

ACKs for top commit:
  laanwj:
    Tested ACK 0c49e52b22

Tree-SHA512: b5ed3d0718962c5a3839db9a28f93d08a0ac93094cc664f83bc4cf1cfad25049e6240b7b81fe06b71e6a3a0ca24a2c337eab088abec5470ad014e10c04fdb216
2022-02-10 10:00:51 +01:00
Hennadii Stepanov
956f7322f6
build: Bump minimum Qt version to 5.11.3 2022-02-05 23:53:46 +02:00
fanquake
07269321f3
build: remove Boost::system usage 2022-02-03 18:35:52 +08:00
Kiminuo
b87f9c5edf
build: remove boost::filesystem usage 2022-02-03 18:35:52 +08:00
fanquake
ffc89d1f21
build: add support for std::filesystem
Add a macro to check if linking with -lstdc++fs or -lc++fs is required.
2022-02-03 18:35:41 +08:00
Sebastian Falbesoner
0c49e52b22 build: remove unneeded getentropy detection (HAVE_GETENTROPY) 2022-02-02 17:22:42 +01:00
Pavol Rusnak
48a72fa81f
Add sha256_arm_shani to build system
Also rename AArch64 intrinsics to ARMv8 intrinsics
as these are not necessarily limited to 64-bit
2022-01-28 09:43:56 +01:00
Pavol Rusnak
c2b7934250
Rename SHANI to X86_SHANI to allow future implementation of ARM_SHANI 2022-01-28 09:43:55 +01:00
fanquake
e2ab9f83f8
build: disable external signer on Windows 2022-01-15 10:02:04 +08:00
laanwj
767ee2e3a1
Merge bitcoin/bitcoin#23607: rpc: Pass const char* to evhttp_connection_get_peer for new libevent
c62d763fc3 Necessary improvements to make configure work without libevent installed (Perlover)
091ccc38c2 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 c62d763fc3
  luke-jr:
    tACK c62d763fc3

Tree-SHA512: d1c8062d90bd0d55c582dae2c3a7e5ee1b6c7ca872bf4aa7fe6f45a52ac4a8f59464215759d961f8efde0efbeeade31b08daf9387d7d50d7622baa1c06992d83
2022-01-13 18:35:25 +01:00
Luke Dashjr
98868633d1 Bugfix: configure: bitcoin-{cli,tx,util} don't need UPnP, NAT-PMP, or ZMQ 2022-01-12 22:20:13 +00:00
Hennadii Stepanov
18f304d988
build: Improve error message when pkg-config is not installed 2022-01-12 17:38:35 +02:00
fanquake
542e405a85
Merge bitcoin/bitcoin#23724: build: add systemtap's sys/sdt.h as depends for GUIX builds with USDT tracepoints
6200fbf54f build: rename --enable-ebpf to --enable-usdt (0xb10c)
e158a2a7aa build: add systemtap's sys/sdt.h as depends (0xb10c)

Pull request description:

  There has been light conceptual agreement on including the Userspace, Statically Defined Tracing tracepoints in Bitcoin Core release builds. This, for example, enables user to hook into production deployments, if they need to. Binaries don't have to be switched out. This is possible because we don't do [expensive computations](https://github.com/bitcoin/bitcoin/blob/master/doc/tracing.md#no-expensive-computations-for-tracepoints) only needed for the tracepoints. The tracepoints are NOPs when not used.

  Systemtap's `sys/sdt.h` header is required to build Bitcoin Core with USDT support. The header file defines the `DTRACE_PROBE` macros used in [`src/util/trace.h`](https://github.com/bitcoin/bitcoin/blob/master/src/util/trace.h). This PR adds Systemtap 4.5 (May 2021) as dependency. GUIX builds for Linux hosts now include the tracepoints.

  Closes https://github.com/bitcoin/bitcoin/issues/23297.

ACKs for top commit:
  fanquake:
    ACK 6200fbf54f - tested enabling / disabling and with/without SDT from depends. We can follow up with #23819, #23907 and #23296, and if any serious issues arise before feature freeze, it is easy for us to flip depends such that USDT becomes opt-in, rather than opt-out, and thus, releases would be tracepoint free.

Tree-SHA512: 0263f44892bf8450e8a593e4de7a498243687f8d81269e1c3283fa8354922c7cf93fddef4b92cf5192d33798424aa5812e03e68ef8de31af078a32dd34021382
2022-01-10 10:59:52 +08:00
0xb10c
6200fbf54f
build: rename --enable-ebpf to --enable-usdt
eBPF is a Linux kernel technology used to "extend the capabilities
of the kernel without requiring to change kernel source code or
load kernel modules". While Userspace, Statically Defined Tracing
(USDT) uses eBPF under the hood, --enable-usdt better resembles that
support for USDT is enabled, and tracepoints will be included in the
binary.
2022-01-06 11:03:55 +01:00
fanquake
3e5dd94c42
Merge bitcoin/bitcoin#23909: build: use a static .tiff for macOS .dmg rather than generating
e09773d20a build: use a static .tiff for macOS .dmg over generating (fanquake)

Pull request description:

  For demonstration, after [discussion in #23778](https://github.com/bitcoin/bitcoin/pull/23778#issuecomment-1003005503), and the question as to why we can't just have a `background.tiff` that we copy into the macOS DMG, and do away with the somewhat convoluted image generation steps.

  From my understanding, the only reason we have this image generation as part of our build system is so that forks of Core can adapt the imagery for their own branding via `PACKAGE_NAME`. It don't think it provides much value to us, and could just have a static .tiff that we copy into the dmg (replacing the .svg that currently lives in macdeploy/).

  Doing this would eliminate the following build dependencies:

  For native macOS:
  * `sed` (usage in Makefile.am)
  * `librsvg` (rsvg-convert)
  * `tiffutil`

  Linux macOS cross-compile:
  * `sed` (usage in Makefille.am)
  * `librsvg`
  * `tiffcp`
  * `convert` (imagemagick)
  * `font-tuffy`

  Guix Build:
  ```bash
  bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  c98d67796863f4b1bab0ad600d46bd74e744d94072cbd4bc856a6aeaba3bb329  guix-build-e09773d20a92/output/dist-archive/bitcoin-e09773d20a92.tar.gz
  3336f90bab312798cb7665e2b4ae24d1a270fb240647d5fed8dbfcd83e3ed37e  guix-build-e09773d20a92/output/x86_64-apple-darwin/SHA256SUMS.part
  8fd680c7ee158c64bad212385df7b0b302c6c2143d4e672b4b0eb5da41f9256d  guix-build-e09773d20a92/output/x86_64-apple-darwin/bitcoin-e09773d20a92-osx-unsigned.dmg
  34f54177c2f0700e8cfaf5d85d91e404807cd9d411e22006cdff82653e5f4af2  guix-build-e09773d20a92/output/x86_64-apple-darwin/bitcoin-e09773d20a92-osx-unsigned.tar.gz
  da6b8f54ef755d40330c8eac4f5bd0329637e827be9ee61318600d5d0bdcc3dc  guix-build-e09773d20a92/output/x86_64-apple-darwin/bitcoin-e09773d20a92-osx64.tar.gz
  ```

  ![dmg](https://user-images.githubusercontent.com/863730/147847717-8121c2d2-cdd4-4781-8397-3bf2893d52cc.png)

ACKs for top commit:
  hebasto:
    ACK e09773d20a
  jarolrod:
    ACK e09773d20a
  Zero-1729:
    ACK e09773d20a

Tree-SHA512: 0ad06699a5451daa8cfaaa46759eb7bd85254a72e23f857f70d433a2ffb1a4bf6dd464d9c4ac9f8c20aab045f4e2b61c6dcdcbcceef96ce515b1a0c501665b1f
2022-01-05 10:25:03 +08:00
fanquake
4eedabaf6f
Merge bitcoin/bitcoin#23947: build: use host_os instead of TARGET_OS in configure output
1bf3809dd1 build: use host_os instead of TARGET_OS in configure output (fanquake)

Pull request description:

  `TARGET_OS` was convenient, as a readable host name for most of our
  targeted platforms, however unless we add more code to configure to
  detect more hosts, it's easier just use `host_os` (it's also more
  informative).

  i.e FreeBSD master
  ```bash
    target os       =
    build os        = freebsd13.0
  ```

  this PR:
  ```bash
    target os       = freebsd13.0
    build os        = freebsd13.0
  ```

ACKs for top commit:
  hebasto:
    ACK 1bf3809dd1

Tree-SHA512: 606d92f60ce3f2f6ab1f54e29b5c179048c62ba51336b272c081b1e009128dd83705b181cfe30991c7a51d9c63e8ba2076bfed9e6112e7d1a74a7f947c5754f5
2022-01-04 15:33:25 +08:00
fanquake
1bf3809dd1
build: use host_os instead of TARGET_OS in configure output
TARGET_OS was conveninent, as a readable host name for most of our
targetted platforms, however unless we add more code to configure to
detect more hosts, it's easier just use host_os (it's also more
informative).

i.e FreeBSD master
```bash
  target os       =
  build os        = freebsd13.0
```

this PR:
```bash
  target os       = freebsd13.0
  build os        = freebsd13.0
```
2022-01-03 13:06:55 +08:00
Kuro
a1b532d1a5 doc: Update license year range to 2022 2022-01-03 04:48:41 +08:00
fanquake
e09773d20a
build: use a static .tiff for macOS .dmg over generating
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2022-01-02 15:38:19 +08:00
Hennadii Stepanov
c236f2e228
build: Drop redundant AC_SUBST macros
Variables that are declared with AC_ARG_VAR macro are substituted via
AC_SUBST macro.
PKG_CHECK_MODULES macro already has AC_ARG_VAR(${PACKAGE}_CFLAGS) and
AC_ARG_VAR(${PACKAGE}_LIBS).
2021-12-29 23:14:45 +02:00
Hennadii Stepanov
9049812106
build: Drop redundant check of PKG_CHECK_MODULES presence 2021-12-29 23:14:14 +02:00
fanquake
c06cda3e48
Merge bitcoin/bitcoin#23383: Update libsecp256k1 subtree to current master
314195c8be Remove unnecessary cast in CKey::SignSchnorr (Pieter Wuille)
a1f76cdb22 Remove --disable-openssl-tests for libsecp256k1 configure (Pieter Wuille)
86dbc4d075 Squashed 'src/secp256k1/' changes from be8d9c262f..0559fc6e41 (Pieter Wuille)

Pull request description:

  The motivation for this bump is getting rid of a cast in `CKey::SignSchnorr`; the `aux_rand` argument isn't modified by the `secp256k1_schnorrsig_sign` function, but was marked as non-`const` anyway. This is fixed now (bitcoin-core/secp256k1#966), and the cast is removed in this PR.

  There are a few other relevant changes:
  * (bitcoin-core/secp256k1#956): replaces a runtime-computed table with a precomputed one; this adds arouns 1 MiB to the binary size, but is a step towards significantly simplifying the API. If 1 MiB is too much, it can be reduced by 2 or 4 (or more) for a slight verification performance reduction.
  * (bitcoin-core/secp256k1#983): removes (test/bench only) OpenSSL support entirely, removing the need to pass `--disable-openssl-tests` (see #23314).
  * (bitcoin-core/secp256k1#810): mild performance increase for 64-bit non-x86 platforms.
  * (bitcoin-core/secp256k1#1002): Make aux_rnd32==NULL behave identical to 0x0000..00 (which impacts BIP341/BIP342 signing in Bitcoin Core, making it more strictly BIP340 compliant, though not in a manner that affects security).

ACKs for top commit:
  fanquake:
    ACK 314195c8be - this includes a nice simplification to the lilbsecp build system (and thus our build system), and fixes issues like #22854. Did a Guix build on x86 (above), as well as a build on arm64 (except for the arm64 host):

Tree-SHA512: 0e048390fc148fbbdf5b98d9cce8c71067564e7d69d97b68347808a9bc45a04f4fc653c392c880d79d5d8b9cf282195520955581ac4f1595f6a948080cf5949d
2021-12-18 14:47:44 +08:00
W. J. van der Laan
fee16b15fa
Merge bitcoin/bitcoin#23744: build, qt: Drop support for i686-linux-android host
66a20a54a2 build, qt: Drop support for `i686-linux-android` host (Hennadii Stepanov)

Pull request description:

  There are no reasons to keep support for `i686-linux-android` host, which is actually broken in master (50c502f54a), and this fact has been unnoticed for months :)

  https://github.com/bitcoin/bitcoin/pull/23675#issuecomment-986206434:
  > I'm surprised `i686-linux-android` ABI is still supported. I would love to drop it...

  https://github.com/bitcoin/bitcoin/pull/23675#issuecomment-991340132
  > What is `i686-linux-android`? 32-bit x86 android? is that really a thing?

ACKs for top commit:
  prusnak:
    utACK 66a20a54a2

Tree-SHA512: 211f794de2fc569f0ade2a4da805b8bfd4ce2ab0930c5d427acc4f5d015fcdc4911f02fc64f6401197f7641aed79944a9594be80c817547be3269cdd721cf79b
2021-12-15 21:56:01 +01:00
Pieter Wuille
a1f76cdb22 Remove --disable-openssl-tests for libsecp256k1 configure 2021-12-15 09:20:12 -05:00
fanquake
e9440aeb5c
build: use __SIZEOF_INT128__ for checking __int128 availability
We already use this in the blockfilter code, so not sure we need to maintain two
different ways of testing for the same functionality. Consolidate on testing
for __SIZEOF_INT128__, which we already use, is supported by the compilers we
care about, and is also used by libsecp256k1.
2021-12-13 21:25:05 +08:00
Hennadii Stepanov
66a20a54a2
build, qt: Drop support for i686-linux-android host 2021-12-11 08:15:25 +02:00
Perlover
c62d763fc3 Necessary improvements to make configure work without libevent installed 2021-12-07 17:02:04 +01:00