556775408797d8e27154c3edaf139820b0979cce depends: build libevent with -D_GNU_SOURCE (fanquake)
Pull request description:
Currently, builds of libevent in depends, using CMake, fail on some systems, like Alpine, with the following:
```bash
/bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c: In function 'evmap_signal_add_':
/bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c:456:31: error: 'NSIG' undeclared (first use in this function)
456 | if (sig < 0 || sig >= NSIG)
```
From what I can tell the `GNU_SOURCE` "detection" in libevents CMake build system, never? really worked, primarily relies on looking for a deprecated define, and it's not clear what a nice fix is. For now, always build with `_GNU_SOURCE`, to match the autotools behaviour.
ACKs for top commit:
TheCharlatan:
ACK 556775408797d8e27154c3edaf139820b0979cce
Tree-SHA512: 4552b4a92867e8fa2af0ffa39b2be6c994bf739de7ce6a7c581590be486da81f7d93fca816854548c1e912347d33a35218c441b5058c3cbd3e82c74a9b7c78d9
d318c4ef56465ccad1a1d4d27c52216e0b69ad4e depends: bump libmultiprocess for CMake fixes (Cory Fields)
Pull request description:
Broken out of #30454 . Bumped [even further](4883197abc (r1684802528)) after https://github.com/chaincodelabs/libmultiprocess/pull/98 was merged upstream.
hebasto Presumably this approach works now with the CMake branch?
ACKs for top commit:
ryanofsky:
Code review ACK d318c4ef56465ccad1a1d4d27c52216e0b69ad4e.
Tree-SHA512: 4b5491f73c0063d09e8339829cd831b1f4c441dd7b55a22037c9337c80cce19bb00a3e5cf925efa77d6d4e89ab45482f40f5799bc14948f8cabcbad3c3549430
21bfee0720ba72935d4f9fc4c2a2887ae5b54092 depends: bump libmultiprocess to fix capnproto deprecation warnings (Ryan Ofsky)
Pull request description:
This incorporates PR chaincodelabs/libmultiprocess#88 and reverts the NO_WERROR CI workaround added in #28735
Upstream diff: 61d5a0e661...414542f81e
---
This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722).
ACKs for top commit:
maflcko:
lgtm ACK 21bfee0720ba72935d4f9fc4c2a2887ae5b54092
hebasto:
ACK 21bfee0720ba72935d4f9fc4c2a2887ae5b54092, I have reviewed the code and it looks OK. I've also skimmed through the related changes in the https://github.com/chaincodelabs/libmultiprocess repository.
Tree-SHA512: b5addb0deed694eeec62a0ae08b4715a811110201f39f3e6cadee8fc4e6231b0e66c844a98512072a1445bac122ab561dc1711e27fb4d7ac5c08ac46780a4acf
BACKPORT NOTICE: excludes ci/test/00_setup_env_i686_multiprocess.sh changes, however, these do not satisfy enough this to be partial to me
3333f14efac815ba3c885398a6795c7e8ce68d08 depends: Bump to capnproto-c++-1.0.1 (MarcoFalke)
Pull request description:
Reasons:
* Debian is starting to ship this version in Trixie (https://packages.debian.org/trixie/capnproto), which will likely become the version shipped with Ubuntu 24.04 LTS. So testing with this version will help to find any issues before real users start to use those distro packages.
* The feature is currently experimental, so bumping the version shouldn't cause any production issues.
* With multiprocess begin a priority project for 27.0, it seems better to do build system changes/bumps early, rather than later, to allow for more time testing them.
ACKs for top commit:
TheCharlatan:
Re-ACK 3333f14efac815ba3c885398a6795c7e8ce68d08
fanquake:
ACK 3333f14efac815ba3c885398a6795c7e8ce68d08 - the response from upstream is that [if we submit a PR, they can take a look](https://github.com/capnproto/capnproto/issues/1833#issuecomment-1792582206), so if anyone would like this to work for Windows, I'd suggest sending a patch.
ryanofsky:
Code review ACK 3333f14efac815ba3c885398a6795c7e8ce68d08
Tree-SHA512: 7d53ad1536f042ab43dbc7847126b826e7fc76694f173c348b835fd1067b8f3dd682c5bcb4887f09ee85bab69130721cd7f8fb96b2e82053d4e28bd5c38bdc5f
007ea322a6492d46f1565ef58a0c49f5b468ff20 depends: switch to building libqrencode with CMake (fanquake)
884330c0a57ce839d48606dc2de3928869b31b7d guix: make cmake-minimal a global requirement (fanquake)
Pull request description:
Switch to building libqrencode with CMake. Note that upstream (https://github.com/fukuchi/libqrencode) hasn't seen any activity for ~4 years, so the odds of getting anything upstream seems low, but I've made two minor changes to the source here, which I will PR in any case.
From an initial look I couldn't find any significant difference between the Autotools and CMake produced libs. As part of this change we move cmake-minimal in Guix into the global package set.
ACKs for top commit:
TheCharlatan:
ACK 007ea322a6492d46f1565ef58a0c49f5b468ff20
Tree-SHA512: c784f790ddea958082c8ae96d3744bdf99331a8799765f9d44f00861b8e2cfcab1a88a3d64af5b10e51a8d5938d55eb6a3d271790b565e50492a39d00dc0e30f
63c0c4ff10b2f6ed8510ef372a5b1f6a6494b179 depends: reuse _config_opts for CMake options (Cory Fields)
Pull request description:
Context: I'm [currently experimenting with building our depends with CMake when possible](https://github.com/theuni/bitcoin/commits/depends-cmake) as part of our future transition to CMake. Specifically zmq, libevent, libnatpmp, and miniupnpc all have existing CMake buildsystems. Building them with CMake will allow us to drop several deps that we currently have (autoconf, automake, pkg-config, etc) which would be unfortunate to carry over after the switch-over.
But that's not relevant for this PR. This is just a very simple change that makes the above work easier to experiment with as it [adds a needed feature for CMake packages](5733dc2000 (diff-e6ed342a25092e0a6d0308e0bfd826044578847132cc6726ac4afa2ca767b61aR20)). It's a no-op for the current builds.
---
From commit description:
This will allow us to use the existing machinery for filtering by arch, os, debug/release, etc.
For example, the following becomes possible for libevent when building with CMake:
`$(package)_config_opts_release=-DEVENT__DISABLE_DEBUG_MODE`
Now the define is only set when not building depends with DEBUG=1
ACKs for top commit:
hebasto:
ACK 63c0c4ff10b2f6ed8510ef372a5b1f6a6494b179
Tree-SHA512: 17d123219d2f98c017880196966ffebd5d09d3e2db8e443e227eb7e49da46e9d971fbe7fd2b99a324fc367e1bbe0ac3cd15b399bce98dd87fbb144d767e15fe7
8c935e625ea75d180144f0526d6a0d5fd58c1f29 depends: Fix CMake-generated `libevent*.pc` files (Hennadii Stepanov)
Pull request description:
Broken out of #30454. This is a backport of the merged upstream PR: https://github.com/libevent/libevent/pull/1622.
Note that after #29835 we might end up dropping pkg-config and using the installed CMake files directly, but that depends on whether or not enough distros actually ship those files.
Either way, having fixed up .pc files won't hurt.
ACKs for top commit:
hebasto:
ACK 8c935e625ea75d180144f0526d6a0d5fd58c1f29.
fanquake:
ACK 8c935e625ea75d180144f0526d6a0d5fd58c1f29
Tree-SHA512: 259c2ad78fb9e90370a7205dc71c40acda1a872f6509435133bc1c4c2c3de57366e80679aa083e13ed85e7966883dc470c0147ee171a2ed0171a18cd5ffc99b3
f59e9057e2aa596b54cf9e85bab35c3ead137547 depends: switch libevent to CMake (Cory Fields)
Pull request description:
Switches libevent in depends to be built with CMake.
ACKs for top commit:
TheCharlatan:
ACK f59e9057e2aa596b54cf9e85bab35c3ead137547
willcl-ark:
ACK f59e9057e2aa596b54cf9e85bab35c3ead137547
Tree-SHA512: 875bf9bc57653c78775a1f8192a2c964fea8f4490d733ff796d9efb00e786f0ca9a7c1a3fd610cda032273c4f2ae06394585b03567d5f241ab073c83a47cf927
371910a7682ecdaf86b3e65753667746add1ecd2 depends: Fix CMake-generated `libzmq.pc` file (Hennadii Stepanov)
Pull request description:
This is a backport of: https://github.com/zeromq/libzmq/pull/4706.
Similar to https://github.com/bitcoin/bitcoin/pull/30488.
Addresses https://github.com/bitcoin/bitcoin/pull/29723#issuecomment-2239864170:
> Looking at the mingw .pc generated by this PR:
>
> ```
> Libs: -L${libdir} -lzmq
> Libs.private:
> Requires.private:
> ```
>
> It looks like we'll need to take [zeromq/libzmq#4706](https://github.com/zeromq/libzmq/pull/4706) as well for CMake. That can be done as a follow-up though, as it's not yet merged upstream.
ACKs for top commit:
fanquake:
ACK 371910a7682ecdaf86b3e65753667746add1ecd2
Tree-SHA512: 6f9c2e32f83c0e629e32fd3e4c86712af00ffeaf0906bf85e5c2df889302707b9df102e8031249d1bae036eb4fc019c2a5124655682fbc5652d9337cb21c5f2c
0388ad0d65b6c9ee802ca641eb01d69fcdd5605d depends: switch zmq to CMake (Cory Fields)
fefb3bbe5b538f8faa59de191914ad0c22c3ade6 depends: add zeromq no librt patch (fanquake)
a522ef15424110f76172b3c0603fa08f7291c9fc depends: add zeromq cmake minimum patch (fanquake)
cbbc229adf4c12ad4bd7edde71425b8ef217edfc depends: add zeromq windows usage patch (fanquake)
2de68d6d388b9a33c57234d3161f6ffc4c2a0246 depends: add zeromq builtin sha1 patch (fanquake)
0c8605253ae887dac316264cb969b752027d277a depends: add zeromq mktemp macos patch (fanquake)
Pull request description:
This picks up a change, which is a switch to building zeromq with CMake. It includes a number of patches, some which have already been upstreamed (see each patch for details).
ACKs for top commit:
hebasto:
ACK 0388ad0d65b6c9ee802ca641eb01d69fcdd5605d.
Tree-SHA512: 5567e432b4e4e0446c41d502bd61810a80b329dea2399b5d9d9f6e79acc450d1c6ba861c8238ba895de98338cfc5dc44ad2bf86ee8c222ecb3fbf47d6eb60da4
986d7fed057b995a720787cbbd21e1c41763fb83 depends: zeromq 4.3.5 (fanquake)
Pull request description:
First new point release of zeromq in two and a half years. Mostly bug fixes; the project also completed a relicense to the "Mozilla Public License".
See https://github.com/zeromq/libzmq/releases/tag/v4.3.5.
ACKs for top commit:
hebasto:
ACK 986d7fed057b995a720787cbbd21e1c41763fb83, I have reviewed the code and it looks OK.
TheCharlatan:
ACK 986d7fed057b995a720787cbbd21e1c41763fb83
Tree-SHA512: cdd6abfbbe10873c1ca267fed648c2e6ff17a4aff50c414924006e63fa39d501e803f8893a5cd966a2078b5c077f2578e482483e6723ea6f5760f16211d40998
1914e470e327091c625f627b4447beb336f7fe5a build: copy config.{guess,sub} post autogen in zmq package (fanquake)
Pull request description:
Otherwise our config.guess and config.sub will be copied over. This problem has been masked by the fact that modern systems ship with versions that recognise all the triplets we use (namely arm64-apple-darwin). However building on ubuntu 20.04 surfaces the issue.
Fixes#26420.
ACKs for top commit:
hebasto:
ACK 1914e470e327091c625f627b4447beb336f7fe5a, tested on Ubuntu 18.04.
Tree-SHA512: dff64c3c62d9f8fc205e5a4dffe8befd58838418d073a15dfe304a0f64b182dfffd9dcf98b53df44bfab905c12a62d03cd5c0f91fa7c4b246ac21ae5f20540fd
e037c4fe0914d8fa9149ce7532c0d70f738e79e9 depends: always configure with --with-pic (fanquake)
Pull request description:
We currently do this sporadically. Not only amongst packages, but across OS's, i.e sometimes it's done for BSDs/Android, and sometimes not.
Configure with `--with-pic` globally instead. I think this generally makes more sense, and should not have any downsides.
See related discussion in https://github.com/bitcoin/bitcoin/pull/28846#discussion_r1399123100.
ACKs for top commit:
hebasto:
ACK e037c4fe0914d8fa9149ce7532c0d70f738e79e9.
Tree-SHA512: efc743ff92f9f99f3ac16514e98363ad395c6f956cd4be7e785b5c573685baf7fcd68c51d6a705ee8761fc676eb045b7e61676595be0eb0f70f34e99174cddc0
5fb8f0f80fc41cc636da56864195244d8fd9116e depends: Do not override CFLAGS when building SQLite with DEBUG=1 (Hennadii Stepanov)
2b0dd88f1ce9084324dc54db578fade9c926fd71 depends: Ensure definitions are passed when building SQLite with DEBUG=1 (Hennadii Stepanov)
Pull request description:
The `--enable-debug` configure option for the SQLite package does two things:
```autoconf
#-----------------------------------------------------------------------
# --enable-debug
#
AC_ARG_ENABLE(debug, [AS_HELP_STRING(
[--enable-debug], [build with debugging features enabled [default=no]])],
[], [])
AC_MSG_CHECKING([Build type])
if test x"$enable_debug" = "xyes"; then
BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_DEBUG -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE"
CFLAGS="-g -O0"
AC_MSG_RESULT([debug])
else
AC_MSG_RESULT([release])
fi
#-----------------------------------------------------------------------
```
It adds three preprocessor definitions and overrides `CFLAGS` with `"-g -O0"`. The latter breaks the user's ability to provide sanitizer and LTO flags.
This PR might be especially useful for OSS-Fuzz where `DEBUG=1` has been used since https://github.com/google/oss-fuzz/pull/10503.
Also it makes a workaround for building SQLite for 32-bit unneeded. For details, please refer to https://github.com/hebasto/oss-fuzz/tree/240120-sqlite.
Changes in https://github.com/bitcoin/bitcoin/pull/29282 might not be strictly required now. However, I consider them an improvement.
ACKs for top commit:
fanquake:
ACK 5fb8f0f80fc41cc636da56864195244d8fd9116e - downstream is also green, so i'll fixup the PR there.
Tree-SHA512: 8593d8a0237ebb270d5da763fb65ed642ab8ed0d44e57704a34154621f49e3d5c58b462cc0070251fa1ba556c58a3c7d3620530d6839dc6dc9e0887010330eca
56a03f1834a7437e3357923a1e45e512c9b2e6fc depends: ensure we are appending to sqlite cflags (fanquake)
Pull request description:
Otherwise we'll just override other flags passed in (i.e msan).
Should fix https://cirrus-ci.com/task/6598922274078720?logs=ci#L3661.
ACKs for top commit:
achow101:
ACK 56a03f1834a7437e3357923a1e45e512c9b2e6fc
TheCharlatan:
ACK 56a03f1834a7437e3357923a1e45e512c9b2e6fc
Tree-SHA512: 5890018cfc5deaef18b0f01a3a0396f803e97f9a9785bf6873ef48bc13b74b644315f0f29cf11d3522964a6396f74e1f080bb4e412bc302956a651fed28b27df
dee690257c7948510a0661e23c9e398a13e20659 build: pass --enable-debug to sqlite when DEBUG=1 (fanquake)
807b61fcca6d301286ae43d00f88d986a985ea38 build: use more recommended sqlite3 compile options (fanquake)
Pull request description:
https://www.sqlite.org/compile.html
[SQLITE_DQS](https://www.sqlite.org/compile.html#dqs)
> This setting disables the double-quoted string literal misfeature.
[SQLITE_DEFAULT_MEMSTATUS](https://www.sqlite.org/compile.html#default_memstatus)
> This setting causes the sqlite3_status() interfaces that track
> memory usage to be disabled.
> This helps the sqlite3_malloc() routines run much faster, and since
> SQLite uses sqlite3_malloc() internally, this helps to make the
> entire library faster.
[SQLITE_OMIT_DEPRECATED](https://www.sqlite.org/compile.html#omit_deprecated)
> Omitting deprecated interfaces and features will not help SQLite
> to run any faster.
> It will reduce the library footprint, however. And it is the
> right thing to do.
[SQLITE_OMIT_SHARED_CACHE](https://www.sqlite.org/compile.html#omit_shared_cache)
> Omitting the possibility of using shared cache allows many
> conditionals in performance-critical sections of the code to be
> eliminated. This can give a noticeable improvement in performance.
Also: https://www.sqlite.org/sharedcache.html
> Shared-cache mode is an obsolete feature.
> The use of shared-cache mode is discouraged.
> Most use cases for shared-cache are better served by WAL mode.
> Applications that build their own copy of SQLite from source code
> are encouraged to use the -DSQLITE_OMIT_SHARED_CACHE compile-time
> option, as the resulting binary will be both smaller and faster.
[SQLITE_OMIT_JSON](https://www.sqlite.org/compile.html#omit_json)
> Starting with sqlite 3.38.0 the JSON extension became opt-out rather
than opt-in, so we disable it here.
--disable-rtree
> An R-Tree is a special index that is designed for doing range queries.
> R-Trees are most commonly used in geospatial systems...
https://www.sqlite.org/rtree.html
--disable-fts4 --disable-fts5
> FTS5 is an SQLite virtual table module that provides full-text
> search functionality to database applications.
DSQLITE_LIKE_DOESNT_MATCH_BLOBS
> simplifies the implementation of the LIKE optimization and allows
> queries that use the LIKE optimization to run faster.
DSQLITE_OMIT_DECLTYPE
> By omitting the (seldom-needed) ability to return the declared type of
> columns from the result set of query, prepared statements can be made
> to consume less memory.
DSQLITE_OMIT_PROGRESS_CALLBACK
> By omitting this interface, a single conditional is removed from the
> inner loop of the bytecode engine, helping SQL statements to run slightly
> faster.
DSQLITE_OMIT_AUTOINIT
> with the SQLITE_OMIT_AUTOINIT option, the automatic initialization is omitted.
> This helps many API calls to run a little faster
> it also means that the application must call sqlite3_initialize()
manually.
On my Linux box this results in a `libsqlite3.a` that shrinks from ~1.7mb to ~1.3mb.
On macOS, `libsqlite3.a` shrinks from ~2.2mb to ~1.3mb.
Guix Build:
```bash
04626ec7b64086103bfb5537397d7953d0699b31da1b1bc100003c7d30991fdf guix-build-dee690257c79/output/aarch64-linux-gnu/SHA256SUMS.part
a77c72052266788e890a0d3d89cc6eee9dd72db6a1b6fdc8aab882b35a315284 guix-build-dee690257c79/output/aarch64-linux-gnu/bitcoin-dee690257c79-aarch64-linux-gnu-debug.tar.gz
86d782f185ee0fae8e8733ab8a511de2ca2500f02eb3d4aaa20d65b4434dcd77 guix-build-dee690257c79/output/aarch64-linux-gnu/bitcoin-dee690257c79-aarch64-linux-gnu.tar.gz
d81874ecd378470b01a429f2a4be07fcb4824b56ace146226b77088cc3c41baa guix-build-dee690257c79/output/arm-linux-gnueabihf/SHA256SUMS.part
8f24076800e5a19ac9005af8c6e4987b32e0a857a83af84931958505228ef58d guix-build-dee690257c79/output/arm-linux-gnueabihf/bitcoin-dee690257c79-arm-linux-gnueabihf-debug.tar.gz
b913f2b0d8f0e32a176bc0e9330106cf1973afe6e8ee955f3eeb89918ab9d565 guix-build-dee690257c79/output/arm-linux-gnueabihf/bitcoin-dee690257c79-arm-linux-gnueabihf.tar.gz
034b47d8a60a19391e0e18f6fcc8fb3a87be78a9707e3ac3e7ee45eb37687bb7 guix-build-dee690257c79/output/arm64-apple-darwin/SHA256SUMS.part
9efc5c0ceac05f6efce03fcde0cbe8b79bae43fe0d98aecb817908e76f5c39b7 guix-build-dee690257c79/output/arm64-apple-darwin/bitcoin-dee690257c79-arm64-apple-darwin-unsigned.dmg
a549cdcbd311d9b025971b13987290f6cd2b93e16c8389e8a7a2ccd3608326ed guix-build-dee690257c79/output/arm64-apple-darwin/bitcoin-dee690257c79-arm64-apple-darwin-unsigned.tar.gz
3dd9e26a41596151022aa4288d778dc335a2b38bd391e3f65c0575dd6eb47b54 guix-build-dee690257c79/output/arm64-apple-darwin/bitcoin-dee690257c79-arm64-apple-darwin.tar.gz
a71685a3ff62fbf456fc1d3c0f78ab7ab1d5a4a094c1f43d3829730d65a3ec51 guix-build-dee690257c79/output/dist-archive/bitcoin-dee690257c79.tar.gz
d5c74167b2260b7de72fdbac77eedacbbb929214e279e07f41c3236ea20116b6 guix-build-dee690257c79/output/powerpc64-linux-gnu/SHA256SUMS.part
03c043daa971f70886805c9e4174acd600e5cda03ae0e827043c4df81a6a6426 guix-build-dee690257c79/output/powerpc64-linux-gnu/bitcoin-dee690257c79-powerpc64-linux-gnu-debug.tar.gz
3884423f67d48f671a90169962f9568dcbd8df582cd269df29a4399dc9c70e99 guix-build-dee690257c79/output/powerpc64-linux-gnu/bitcoin-dee690257c79-powerpc64-linux-gnu.tar.gz
cee2847d4feeadebfdf4d37110faafa250824c68cfefc3bfa289ae8b09599a20 guix-build-dee690257c79/output/powerpc64le-linux-gnu/SHA256SUMS.part
ca9f1085184b50e7bd377b68a58afd42ac4055ffe214eede8c6ca7291e00b45a guix-build-dee690257c79/output/powerpc64le-linux-gnu/bitcoin-dee690257c79-powerpc64le-linux-gnu-debug.tar.gz
b9cadff5b30244f6cb4f277e1ac610841332cb0d732637fe438fd51c88adf5a4 guix-build-dee690257c79/output/powerpc64le-linux-gnu/bitcoin-dee690257c79-powerpc64le-linux-gnu.tar.gz
db6e45d9fc8868e5cb25fa3d0789247db10a6bab2a6f3866a27d641ae00bd03b guix-build-dee690257c79/output/riscv64-linux-gnu/SHA256SUMS.part
751e90c0aefa249f175c0c1707dc5eee3637e2b9657a9ee1b2068479e9830ff0 guix-build-dee690257c79/output/riscv64-linux-gnu/bitcoin-dee690257c79-riscv64-linux-gnu-debug.tar.gz
8dd87bb24f1fbdba67fb6b72ab5fc93532452eada8c2942463100b8ed8118ae3 guix-build-dee690257c79/output/riscv64-linux-gnu/bitcoin-dee690257c79-riscv64-linux-gnu.tar.gz
b53fe650f431e394a5af6bd809401551e3c36e4f7d90c31f39f51c5fe236efaf guix-build-dee690257c79/output/x86_64-apple-darwin/SHA256SUMS.part
b35b4ae345a625e42b8315acd9b75bb651f60265f67ec6f7d78a41c8d21c635e guix-build-dee690257c79/output/x86_64-apple-darwin/bitcoin-dee690257c79-x86_64-apple-darwin-unsigned.dmg
6748e4c64ae069632624cbec20de7f03eca1a7578fcef96607f3e8cb0ac4106e guix-build-dee690257c79/output/x86_64-apple-darwin/bitcoin-dee690257c79-x86_64-apple-darwin-unsigned.tar.gz
6415cbecfa18002a1e4865b996268558b4f26121118fd73b0ef4ca44967f34c7 guix-build-dee690257c79/output/x86_64-apple-darwin/bitcoin-dee690257c79-x86_64-apple-darwin.tar.gz
f0a8d8837e80e42b5d77c3efc9d746c11ffc9909aece16dcba0a10726e1be7e0 guix-build-dee690257c79/output/x86_64-linux-gnu/SHA256SUMS.part
418f4607159387ee17657120beda1c741fa6060e4457b304b857aa6c33859e6a guix-build-dee690257c79/output/x86_64-linux-gnu/bitcoin-dee690257c79-x86_64-linux-gnu-debug.tar.gz
d384fe8f2d6515c256a371ad84ae76ac9727ffd49887c0e22bb5ada4cd890092 guix-build-dee690257c79/output/x86_64-linux-gnu/bitcoin-dee690257c79-x86_64-linux-gnu.tar.gz
3f441eb2d68ddd530b32f56a16ff639b27dcc58b5ba395e40f4c2be805f6cd8b guix-build-dee690257c79/output/x86_64-w64-mingw32/SHA256SUMS.part
d3d22479adc554ced965c4bde79f4c919e6b216acfca598fac4ebfc3b0e2d39d guix-build-dee690257c79/output/x86_64-w64-mingw32/bitcoin-dee690257c79-win64-debug.zip
89de153f5d839df6cd1266f8b3cb3ad455b2f6c43cee7644889da1e3efc7b2f1 guix-build-dee690257c79/output/x86_64-w64-mingw32/bitcoin-dee690257c79-win64-setup-unsigned.exe
ba30708b9551b3794e4d2726aff27775dd4f1b347ea71b3fe1b00e39e8b7a594 guix-build-dee690257c79/output/x86_64-w64-mingw32/bitcoin-dee690257c79-win64-unsigned.tar.gz
ab6a2b7a3e899fc58030a44b555e449d64aa69b5215d761bc550946b14f93515 guix-build-dee690257c79/output/x86_64-w64-mingw32/bitcoin-dee690257c79-win64.zip
```
ACKs for top commit:
Sjors:
tACK dee690257c7948510a0661e23c9e398a13e20659
achow101:
ACK dee690257c7948510a0661e23c9e398a13e20659
hebasto:
ACK dee690257c7948510a0661e23c9e398a13e20659, I have reviewed the code and it looks OK.
Tree-SHA512: e0605f049404905db94ea61473b2b68df008ceb86b9a09d8562ca3acc1f3a3be3893149fc62d189a6fbf24cfc76c393f2d1a1215292e9ae5dc4afc199e876821
eb1c3adf38cb71c3e6f298a61871738c4919b4a1 depends: qrencode 4.1.1 (fanquake)
Pull request description:
Upgrade to the latest qrencode, and disable some warnings that cause compile failures with newer compilers (clang-15+).
I haven't tested this (from a GUI perspective) at all. This is just "good enough" to keep things compiling, and uses some similar work-arounds as we have with other older packages, i.e bdb.
Note that upstream, libqrencode is effectively unmaintained. No code changes for > 2 years. No responses to issues/PRs. Seems like the author has mostly dropped off of GitHub as well.
This fixes part of #27299.
ACKs for top commit:
TheCharlatan:
Code review ACK eb1c3adf38cb71c3e6f298a61871738c4919b4a1
Tree-SHA512: 898eaac3e9915dfcdc0a011b736fff685a3b46990bd27f6038ef4d3e7cb6a276206438ea50d45908a051ce55c9b0779347d4be1d35271b67f76f409a7dc21fed
f8b8458276983f8fc1e2a47c4d00c1e30633067d depends: fix compiling bdb with clang-16 on aarch64 (fanquake)
Pull request description:
Compiling bdb with clang-16 on aarch64 (hardware) currently fails:
```bash
make -C depends/ bdb CC=clang CXX=clang++
...
checking for mutexes... UNIX/fcntl
configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM.
configure: error: Unable to find a mutex implementation
```
Looking at config.log we've got:
```bash
configure:18704: checking for mutexes
configure:18815: clang -o conftest -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security -I/bitcoin/depends/aarch64-unknown-linux-gnu/include -D_GNU_SOURCE -D_REENTRANT -L/bitcoin/depends/aarch64-unknown-linux-gnu/lib conftest.c -lpthread >&5
conftest.c:45:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
main() {
^
int
conftest.c:50:2: warning: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
exit (
^
conftest.c:50:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
1 warning and 1 error generated.
```
Clang-16 changed `-Wimplicit-function-declaration` and `-Wimplicit-int`
warnings into errors, see:
https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes.
> The -Wimplicit-function-declaration and -Wimplicit-int warnings now
> default to an error in C99, C11, and C17. As of C2x, support for implicit
> function declarations and implicit int has been removed, and the
> warning options will have no effect. Specifying -Wimplicit-int in
> C89 mode will now issue warnings instead of being a noop.
ACKs for top commit:
hebasto:
ACK f8b8458276983f8fc1e2a47c4d00c1e30633067d, tested on Ubuntu Lunar (`aarch64`) with:
Tree-SHA512: 5ca078b1c00915446e9f0f2ecaa4342295a2097996554345753315d1c81c23000c57be14e1ac5506a87820f5114aba748456f2c2b6426b0810504d62d761a787
0e02f725482dd30b9f03903074a481af1164411d depends: define `__BSD_VISIBLE` for FreeBSD bdb build (fanquake)
Pull request description:
Required for additional definitions (`IPC_R` & friends), to be available, when compiling under C11, which would otherwise cause compile fails.
See: https://github.com/MarcoFalke/btc_nightly/pull/4.
ACKs for top commit:
hebasto:
ACK 0e02f725482dd30b9f03903074a481af1164411d, tested on FreeBSD 13.1:
Tree-SHA512: 885d4aa341d9668da360cf6dfafb97ce816803c54e76c0a06e448db39a723666d42cd14b3e713d17ecbe33163f5af69924567cf449d679a2db95b36357005d43
f4cb0fbfe1 fix: no need to relay quorum commitment in case of block undo (Konstantin Akimov)
0431a33919 fix: follow-up changes for bitcoin#14193. (Konstantin Akimov)
86b76d19b6 Merge bitcoin/bitcoin#21812: ci: Enable D_GLIBCXX_DEBUG for multiprocess task (fanquake)
334496ea7e Merge bitcoin/bitcoin#21775: p2p: Limit m_block_inv_mutex (MarcoFalke)
23b83109ea Merge bitcoin/bitcoin#21750: net: remove unnecessary check of CNode::cs_vSend (MarcoFalke)
b34514191f Merge bitcoin/bitcoin#21738: test: Use clang-12 for ASAN, Add missing suppression (fanquake)
3411577473 Merge bitcoin/bitcoin#19160: multiprocess: Add basic spawn and IPC support (W. J. van der Laan)
970048d917 fix: missing changes from bitcoin#19267 - run multiprocess on CI (Konstantin Akimov)
f2b7ee73db fix: follow-up bitcoin#15402 - removed dead code (Konstantin Akimov)
274068cdbc fix: follow-up bitcoin/bitcoin#21732 - minor missing typo (MarcoFalke)
e9450a8b36 Merge #21669: test: Remove spurious double lock tsan suppressions by bumping to clang-12 (MarcoFalke)
ef92c3065c Merge #21663: ci: Fix macOS brew install command (W. J. van der Laan)
Pull request description:
## Issue being fixed or feature implemented
Just regular backports from v22
## What was done?
See commits for backports.
Also there're 2 bugs are fixed which became visible after backporting bitcoin#21775 - both are related to possible deadlocks in net_processing
## How Has This Been Tested?
Run unit and functional tests. Enabled multiprocess builds on CI
## 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 f4cb0fbfe1
PastaPastaPasta:
utACK f4cb0fbfe1
Tree-SHA512: 3204c2aa243fa4834ccf4ff4672d183cf9b35f87b857df8543572cd685729e15fca39f85b27194233e57cbc1746e36b556efab95ce20d0aa0a7d4476a9f3c6c0
84934bf70e11fe4cda1cfda60113a54895d4fdd5 multiprocess: Add echoipc RPC method and test (Russell Yanofsky)
7d76cf667eff512043a28d4407cc89f58796c42b multiprocess: Add comments and documentation (Russell Yanofsky)
ddf7ecc8dfc64cf121099fb047e1ac871de94f4c multiprocess: Add bitcoin-node process spawning support (Russell Yanofsky)
10afdf0280fa93bfffb0a7665c60dc155cd84514 multiprocess: Add Ipc interface implementation (Russell Yanofsky)
745c9cebd50fea1664efef571dc1ee1bddc96102 multiprocess: Add Ipc and Init interface definitions (Russell Yanofsky)
5d62d7f6cd48bbc4e9f37ecc369f38d5e1e0036c Update libmultiprocess library (Russell Yanofsky)
Pull request description:
This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10).
---
This PR adds basic process spawning and IPC method call support to `bitcoin-node` executables built with `--enable-multiprocess`[*].
These changes are used in https://github.com/bitcoin/bitcoin/pull/10102 to let node, gui, and wallet functionality run in different processes, and extended in https://github.com/bitcoin/bitcoin/pull/19460 and https://github.com/bitcoin/bitcoin/pull/19461 after that to allow gui and wallet processes to be started and stopped independently and connect to the node over a socket.
These changes can also be used to implement new functionality outside the `bitcoin-node` process like external indexes or pluggable transports (https://github.com/bitcoin/bitcoin/pull/18988). The `Ipc::spawnProcess` and `Ipc::serveProcess` methods added here are entry points for spawning a child process and serving a parent process, and being able to make bidirectional, multithreaded method calls between the processes. A simple example of this is implemented in commit "Add echoipc RPC method and test."
Changes in this PR aside from the echo test were originally part of #10102, but have been split and moved here for easier review, and so they can be used for other applications like external plugins.
Additional notes about this PR can be found at https://bitcoincore.reviews/19160
[*] Note: the `--enable-multiprocess` feature is still experimental, and not enabled by default, and not yet supported on windows. More information can be found in [doc/multiprocess.md](https://github.com/bitcoin/bitcoin/blob/master/doc/multiprocess.md)
ACKs for top commit:
fjahr:
re-ACK 84934bf70e11fe4cda1cfda60113a54895d4fdd5
ariard:
ACK 84934bf. Changes since last ACK fixes the silent merge conflict about `EnsureAnyNodeContext()`. Rebuilt and checked again debug command `echoipc`.
Tree-SHA512: 52a948b5e18a26d7d7a09b83003eaae9b1ed2981978c36c959fe9a55abf70ae6a627c4ff913a3428be17400a3dace30c58b5057fa75c319662c3be98f19810c6
8f1ff487b3df6f3e4cb53f88045a32ea4fbc0839 libxcb: use a patch instead of sed (fanquake)
Pull request description:
To remove the unneeded pthread-stubs requirement.
Should almost be enough to close#16838.
seds dead (mostly). The usage left in `qt.mk` are for substituting runtime values.
ACKs for top commit:
hebasto:
ACK 8f1ff487b3df6f3e4cb53f88045a32ea4fbc0839.
Tree-SHA512: 2b6ebbe98a838d8e08e54737292b02176ff4c85a541ae1ec0c590c75e33ba92289628b88ca3144f2e214f4327515f7fd22c39687312f44183b759815c092b24f
Old version doesn't support debug information for ELF produced by modern compilers
It appears like an error:
> unrecognized DWARF version in .debug_info at 6
> no debug info in ELF executable
which causes:
> No debug information available for stacktrace. You should add debug information and then run
And backtraces are not shown on linux even if debug infos here.
With this fixes output as expected:
```
std::terminate() called due to unhandled exception
Exception: type=char const*, what="HEHE"
0#: (0x5D7C19364C3F) bitcoind.cpp:114 - AppInit
1#: (0x5D7C19364C3F) bitcoind.cpp:273 - main
2#: (0x7B0B19C28150) libc_start_call_main.h:74 - __libc_start_call_main
3#: (0x7B0B19C28209) libc-start.c:128 - call_init
4#: (0x7B0B19C28209) libc-start.c:347 - __libc_start_main_impl
5#: (0x5D7C193734D5) <unknown-file> - ???
```
8047bb6feaa9ee5d6c1edb7640baaf228450bc6b build: Update `qt` package up to 5.15.11 (Hennadii Stepanov)
Pull request description:
In the light of https://github.com/bitcoin/bitcoin/pull/28622, we probably have to patch Qt. It seems reasonable to update it up to the latest available version before doing that.
ACKs for top commit:
TheCharlatan:
ACK 8047bb6feaa9ee5d6c1edb7640baaf228450bc6b
Tree-SHA512: b4d7df2ff059b8f58c3202d913237c0d39a962748658f1ce853884dca095fbda5f56d4d68f73a1bc8da2f295e96a20927306e148b41a9f4afc42c8edb11c3729
173ef8980d921c9c0e46257747ab1165965e3ced build: Small libxcb.mk improvements (Hennadii Stepanov)
5129b36573cb07d8bcbac493506c46e26d7239eb build: Clean remnants of QTBUG-34748 fix (Hennadii Stepanov)
Pull request description:
Hope, this PR will make [transit](https://github.com/bitcoin/bitcoin/pull/21376) to Qt 5.12.10 neater.
A fix for [QTBUG-34748](https://bugreports.qt.io/browse/QTBUG-34748) was introduced in #5915 (v0.11.0, Qt 5.2.1).
[QTBUG-34748](https://bugreports.qt.io/browse/QTBUG-34748) was [fixed](b19b080894) in Qt 5.3.0.
The separated [`fix-xcb-include-order.patch`](bb44d9e754/depends/patches/qt/fix-xcb-include-order.patch), provided by #5915, was dropped in #12971 while bumping Qt to 5.9.4 (5.9.6). But `libxcb.mk` remained unchanged.
This PR reverts #5915 for `libxcb.mk` as well.
ACKs for top commit:
practicalswift:
cr ACK 173ef8980d921c9c0e46257747ab1165965e3ced: patch looks correct
fanquake:
ACK 173ef8980d921c9c0e46257747ab1165965e3ced
Tree-SHA512: 9815a7e532ff4aa08f9623ded8d5708eca1c9c73ac7a2684419a18c125da7627b44ac3191f2e7978946942c8d0580e73b1a93df624986fb2a13791a68ce1e025
8b8edc25c13a3e613770bf38b21a2556192e6315 build: Specify native binaries explicitly when building `capnp` package (Hennadii Stepanov)
a413595c37f51557f9506e0a279cd80fc9a6fb36 build: Fix `capnp` package build for Android (Hennadii Stepanov)
Pull request description:
On master (e3c08eb620a2f317fc09fdf20969fa26f02afb91):
```
$ make -C depends capnp MULTIPROCESS=1 HOST=aarch64-linux-android ANDROID_SDK=$ANDROID_HOME ANDROID_NDK=$ANDROID_HOME/ndk/23.2.8568313 ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=$ANDROID_HOME/ndk/23.2.8568313/toolchains/llvm/prebuilt/linux-x86_64/bin
...
ld: error: unable to find library -lkj
...
```
This PR fixes this error, and also improves configuring according to the docs.
ACKs for top commit:
ryanofsky:
Code review ACK 8b8edc25c13a3e613770bf38b21a2556192e6315. I'd be a little curious to know what causes the error and how `--disable-shared` fixes it, but these changes all look good
Tree-SHA512: 1b07b75f2a83932d8dc1f007e42a67d8327bd5fe4566f554dab4599e2a1e04b0144648790a1fd2ab1c295dba728586035aa0ebdbe5cf49df048ec87736895aaf
e838a9847580527b8321d65e57b1c53cc2af6bf4 depends: re-enable using -flto when building expat (fanquake)
304452558c7f6f5e32ba13d8f05325790c8a4f5f depends: expat 2.4.8 (fanquake)
Pull request description:
Currently, when building the expat package in depends, using `-flto` (`LTO=1`), the configure check can fail, because it cannot determine the system endianess:
```bash
configure:18718: result: unknown
configure:18733: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help
```
Fix that by defining `_DEFAULT_SOURCE`, which in turn defines `__USE_MISC` (`features.h`):
```c
#if defined _DEFAULT_SOURCE
# define __USE_MISC1
#endif
```
which exposes additional definitions in `endian.h`:
```c
#include <features.h>
/* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER. */
#include <bits/endian.h>
#ifdef __USE_MISC
# define LITTLE_ENDIAN__LITTLE_ENDIAN
# define BIG_ENDIAN__BIG_ENDIAN
# define PDP_ENDIAN__PDP_ENDIAN
# define BYTE_ORDER__BYTE_ORDER
#endif
```
and gives us a working configure.
You could test building this change with Guix + LTO with [this branch](https://github.com/fanquake/bitcoin/tree/lto_in_guix). Note that that build may fail for other reasons (on x86_64), unrelated to this change.
Some related upstream discussion:
https://bugs.gentoo.org/757681https://forums.gentoo.org/viewtopic-t-1013786.html
ACKs for top commit:
hebasto:
re-ACK e838a9847580527b8321d65e57b1c53cc2af6bf4, only [suggested](https://github.com/bitcoin/bitcoin/pull/25697#discussion_r929735675) changes since my recent [review](https://github.com/bitcoin/bitcoin/pull/25697#pullrequestreview-1050657421).
jarolrod:
code review ACK e838a9847580527b8321d65e57b1c53cc2af6bf4
Tree-SHA512: 9dbf64c9bd1fd995a4d1addc011ffeff83d50df736030012346c97605e63aed4b5bac390a81abe646c1be28ad6fd600f64560dcb26bbc2edf5d513ca3b180bfa