Commit Graph

434 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
d3d7a0562a
merge bitcoin#24031: don't compress macOS DMG 2024-11-06 19:22:01 +00:00
fanquake
fbc0bce2e6
Merge bitcoin/bitcoin#29665: build, depends: Fix libmultiprocess cross-compilation
2de2ea2ff63b97eacb23234932c6e1f1f65e4494 build, depends: Fix `libmultiprocess` cross-compilation (Hennadii Stepanov)

Pull request description:

  On the master branch @ 3b12fc7bcd94cf214984911f68612feb468d5404, the following command fails:
  ```
  $ make -C depends libmultiprocess HOST=arm64-apple-darwin MULTIPROCESS=1
  ...
  [100%] Linking CXX executable mpgen
  ...
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  ...
  ```

  This PR prevents building all default targets that include `mpgen`, which expectedly fails to link when cross-compiling.

ACKs for top commit:
  ryanofsky:
    Code review ACK 2de2ea2ff63b97eacb23234932c6e1f1f65e4494
  fanquake:
    ACK 2de2ea2ff63b97eacb23234932c6e1f1f65e4494 - I checked that this fixes the macOS cross-compilation issue. I'm assuming these packages are also likely to change further in the (near) future, given the changes going in upstream: https://github.com/chaincodelabs/libmultiprocess/pulls?q=is%3Apr+is%3Aclosed.

Tree-SHA512: 563551afbe483c923b52c6171f9d73bcc30bc4febd821b5abfe8aadb2ac601b94c2d10a73746ace3710d9f0afa4798eb090e77ccb1ae66a819495912802d91c9
2024-10-29 13:01:24 -05:00
fanquake
59a214590f
Merge bitcoin/bitcoin#29747: depends: fix mingw-w64 Qt DEBUG=1 build
b7e7e727abd86104ee58beb648a94e2f453d1f6d depends: fix mingw-w64 Qt DEBUG=1 build (fanquake)

Pull request description:

  The issue is that compilation is done with `x86_64-w64-mingw32-g++-posix`, but then linking is done with `x86_64-w64-mingw32-g++`.

  I'm guessing this has been broken since #24131 (01d1845a80ae48d741deea695ddce95d940ab0d8), but have not checked.

  Fixes #29734.
  Unblocks #29527 (`DEBUG=1` builds can be tested).

ACKs for top commit:
  hebasto:
    ACK b7e7e727abd86104ee58beb648a94e2f453d1f6d, tested on Ubuntu 22.04 with the [installed](https://github.com/bitcoin/bitcoin/issues/29734#issuecomment-2022852344) `g++-mingw-w64-x86-64` package.
  TheCharlatan:
    ACK b7e7e727abd86104ee58beb648a94e2f453d1f6d

Tree-SHA512: 9e24e84046c0489c20971bb9c68d1a643c233837193c184f61bff79dfc8d7397a5c5526ac1a205ad423920f2589559cd01cb104ceb7f89515bb6421510d82ca9
2024-10-29 13:01:24 -05:00
pasta
565f2db930
Merge #6362: backport: trivial 2024 10 25 pr1
b6544791b4 Merge bitcoin/bitcoin#30705: test: Avoid intermittent block download timeout in p2p_ibd_stalling (merge-script)
745a819683 Merge bitcoin/bitcoin#30690: devtools, utxo-snapshot: Fix block height out of range in script (Ava Chow)
01b570e9e2 Merge bitcoin/bitcoin#29999: guix: fix suggested fake date for openssl-1.1.1l (Ava Chow)
432f352719 Merge bitcoin/bitcoin#30580: doc: Add note about distro's `g++-mingw-w64-x86-64-posix` version (merge-script)
1bd090e7fb Merge bitcoin/bitcoin#30597: doc: Drop no longer needed workaround for WSL (merge-script)
8a12237745 Merge bitcoin/bitcoin#30630: doc: Update ccache website link (merge-script)
f66547f84e Merge bitcoin/bitcoin#30588: depends: fix ZMQ CMake getcachesize check (merge-script)
ddaec964c0 Merge bitcoin/bitcoin#30565: depends: Fix `zeromq` build on OpenBSD (merge-script)
e4e5605ef8 Merge bitcoin/bitcoin#30552: test: fix constructor of msg_tx (merge-script)
df3c2392ca Merge bitcoin/bitcoin#26950: cleanse: switch to SecureZeroMemory for Windows cross-compile (merge-script)
57945ce337 Merge bitcoin/bitcoin#30506: depends: Cleanup postprocess commands after switching to CMake (merge-script)
e016ffada1 Merge bitcoin/bitcoin#29878: depends: build expat with CMake (merge-script)
62dcd43b58 Merge bitcoin/bitcoin#29880: depends: build FreeType with CMake (merge-script)
745addf6a7 Merge bitcoin/bitcoin#30245: net: Allow -proxy=[::1] on nodes with IPV6 lo only (Ava Chow)
4e144be0dd Merge bitcoin-core/gui#795: Keep focus on "Hide" while ModalOverlay is visible (Hennadii Stepanov)
69c04b2c48 Merge bitcoin/bitcoin#30372: util: Use SteadyClock in RandAddSeedPerfmon (merge-script)
ebed8af1d0 Merge bitcoin/bitcoin#30336: depends: update doc in Qt pwd patch (merge-script)
9793fb1a87 Merge bitcoin/bitcoin#30340: test: Added coverage to Block not found error using gettxoutsetinfo (Ava Chow)
479cb8bcb8 Merge bitcoin/bitcoin#30312: contrib: add R(UN)PATH check to ELF symbol-check (merge-script)
ca83773854 Merge bitcoin/bitcoin#30283: upnp: fix build with miniupnpc 2.2.8 (merge-script)
63e139d11b Merge bitcoin/bitcoin#30185: guix: show `*_FLAGS` variables in pre-build output (merge-script)
3be0d3e5cd Merge bitcoin/bitcoin#30097: crypto: disable asan for sha256_sse4 with clang and -O0 (merge-script)
3070c3e388 Merge bitcoin/bitcoin#30078: depends: set AR & RANLIB for CMake (merge-script)

Pull request description:

  ## Issue being fixed or feature implemented
  Trivial backports

  ## What was done?

  ## How Has This Been Tested?
  built locally

  ## Breaking Changes

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK b6544791b4
  kwvg:
    utACK b6544791b4

Tree-SHA512: 10b5af4e92c83fa9d6764b20bf066bba8e4c600402966fd5c1d6dad07b0549d8a42151a33f21e2f8263336c12a810a6f3fc2828d90bc98153e09c165d9e5b043
2024-10-27 14:15:08 -05:00
merge-script
f66547f84e
Merge bitcoin/bitcoin#30588: depends: fix ZMQ CMake getcachesize check
a0a9a11642752578fb1f5142c3fb26cb39d1548a depends: fix ZMQ CMake getcachesize check (fanquake)

Pull request description:

  Fixes #30587.

ACKs for top commit:
  maflcko:
    ACK a0a9a11642752578fb1f5142c3fb26cb39d1548a
  hebasto:
    ACK a0a9a11642752578fb1f5142c3fb26cb39d1548a. On Ubuntu (s390x), I was able to reproduce https://github.com/bitcoin/bitcoin/issues/30587. With this PR building `zeromq` succeeds.
  TheCharlatan:
    ACK a0a9a11642752578fb1f5142c3fb26cb39d1548a

Tree-SHA512: 70ca50ebe8e36d5a10a2354a1fbed49f5f802ae5115e09686bccca7e5d1da35168e84a6cab40dd2c83f8918889cdfdcbd5d1cbe25273b844c8ddd21865ea6c51
2024-10-26 19:14:07 -05:00
merge-script
ddaec964c0
Merge bitcoin/bitcoin#30565: depends: Fix zeromq build on OpenBSD
89b1d5c818a33440c0c497aa78721fb9b0af35a5 depends: Fix `zeromq` build on OpenBSD (Hennadii Stepanov)

Pull request description:

  On the master branch @ 66e82dc90c598c9c42ff980693ef5367a845e1d0, the `zeromq` package fails to build on OpenBSD 7.5:
  ```
  [ 19%] Building CXX object CMakeFiles/objects.dir/src/io_thread.cpp.o
  /home/hebasto/bitcoin/depends/work/build/amd64-unknown-openbsd7.5/zeromq/4.3.5-df5b1b9f936/src/io_thread.cpp:14:22: error: static_cast from 'std::nullptr_t' to 'poller_t::handle_t' (aka 'int') is not allowed
      _mailbox_handle (static_cast<poller_t::handle_t> (NULL))
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  ```

  This [regression](https://github.com/bitcoin/bitcoin/pull/29723#issuecomment-2261513105) was overlooked by me in https://github.com/bitcoin/bitcoin/pull/29723.

  This PR fixes the issue by backporting an upstream commit from https://github.com/zeromq/libzmq/pull/4659.

ACKs for top commit:
  theStack:
    tACK 89b1d5c818a33440c0c497aa78721fb9b0af35a5

Tree-SHA512: 48d22ea99dfd44c5adf858c74e64082390da27b8ccad8c0d5a91d4dabfa3d12267cef98e4bb8c088e4cd0ec477c242cb1d47aace5c88cd86f796715bba957ed8
2024-10-26 19:14:07 -05:00
merge-script
57945ce337
Merge bitcoin/bitcoin#30506: depends: Cleanup postprocess commands after switching to CMake
a0314c151679a348d842b68c5ecb7a556700811c depends: cleanup after qrencode build (fanquake)
745bf0fa7e9afc3989e9c60d7ef09e96ae172277 depends: cleanup after miniupnpc build (fanquake)
06d4aab77af4e75f0e8fd96a93e108f92210d878 depends: Cleanup postprocess commands after switching to CMake (Hennadii Stepanov)

Pull request description:

  I overlooked this while reviewing https://github.com/bitcoin/bitcoin/pull/29723, https://github.com/bitcoin/bitcoin/pull/29835, and https://github.com/bitcoin/bitcoin/pull/29880.

ACKs for top commit:
  fanquake:
    ACK a0314c151679a348d842b68c5ecb7a556700811c

Tree-SHA512: debeffa7027e6213cc25c0652660ff0f36f51e63f688041d1d6cd6323e2c6cb02936fa0ecea86455b8c9874d6ea665684085189cfa523ca084792c57b0fb7c4e
2024-10-26 19:14:07 -05:00
merge-script
e016ffada1
Merge bitcoin/bitcoin#29878: depends: build expat with CMake
a517029646ac86f9d72fcea204ff45db41702e37 depends: switch to building expat with CMake (fanquake)

Pull request description:

  Switch to building Expat with CMake, instead of Autotools.

ACKs for top commit:
  hebasto:
    re-ACK a517029646ac86f9d72fcea204ff45db41702e37.

Tree-SHA512: ca040545dd83fb81a8b209aa24cae6e22eaeff04f44bdabc4454adf6ea63d34f4ae27bd5980c65db2d2542e23eb2712102719023c262ab63a933c90b5999c11e
2024-10-26 19:14:06 -05:00
merge-script
62dcd43b58
Merge bitcoin/bitcoin#29880: depends: build FreeType with CMake
ff4f3deb7b8adfcc90fb745440ce4be1176552ca depends: use CMake to build FreeType (fanquake)

Pull request description:

  Switches Freetype to be built with CMake.

ACKs for top commit:
  theuni:
    ACK ff4f3deb7b8adfcc90fb745440ce4be1176552ca
  hebasto:
    ACK ff4f3deb7b8adfcc90fb745440ce4be1176552ca, I've verified the actual compile options, they look sane.

Tree-SHA512: e9e4348975998539fde88a84d110d53dbac50ae9cc3fa692d15e09313d6fdb6acb3bb23533786a645fc836091075b4487d6de42ef78ba3a44de46d06360aef4f
2024-10-26 19:14:06 -05:00
fanquake
5ce92ca9ea
Merge bitcoin/bitcoin#29527: depends: add -g to DEBUG=1 flags
84fbf9b2841a9ba1ebd1421b9ff9fe444bb1abd9 depends: remove -g from sqlite debug flags (fanquake)
eef51afc6a29c693a68400930ef8011be41b7401 depends: add -g to DEBUG=1 flags (fanquake)

Pull request description:

  Add `-g` to the base DEBUG=1 flags in depends.
  Avoids the need to specify it per-package.
  More alignment with `--enable-debug` behaviour in configure.

  We also want to align the optimization flags, currently -O1 vs -O0, however that can be it's own PR.

ACKs for top commit:
  theuni:
    ACK 84fbf9b2841a9ba1ebd1421b9ff9fe444bb1abd9

Tree-SHA512: 1ee98ba0c13e4b80bb87632658b4f53ce49c73e0e7712990c30da60deca4a349a744232f2d78f243dee9a07f5b9b70f9c2c4ae34082c34ae51b37b054fac61fd
2024-10-25 15:37:15 -05:00
pasta
e12afdf175
Merge #6350: backport: trivial 2024 10 23 pr7
37389c7d38 Merge bitcoin/bitcoin#28781: depends: latest config.guess & config.sub (fanquake)
3239f1525d Merge bitcoin/bitcoin#28479: build: use _LIBCPP_ENABLE_DEBUG_MODE over ENABLE_ASSERTIONS (fanquake)
45cc44bcf9 Merge bitcoin/bitcoin#27628: build: Fix shared lib linking for darwin with lld (fanquake)
b8ddcd937c Merge bitcoin/bitcoin#27575: Introduce platform-agnostic `ALWAYS_INLINE` macro (fanquake)
71c6d7f6ca Merge bitcoin/bitcoin#26653: test, init: perturb file to ensure failure instead of only deleting them (fanquake)
417f71a587 Merge bitcoin/bitcoin#27422: test: add coverage to rpc_scantxoutset.py (fanquake)
898dcbdc4f Merge bitcoin/bitcoin#27559: doc: clarify processing of mempool-msgs when NODE_BLOOM (glozow)
a4e429cb5a Merge bitcoin/bitcoin#26953: contrib: add ELF OS ABI check to symbol-check.py (fanquake)
deb7de26dd Merge bitcoin/bitcoin#26604: test: add coverage for `-bantime` (fanquake)
f725ed509a Merge bitcoin/bitcoin#26314: test: perturb anchors.dat to test error during initialization (fanquake)
3306f96d80 Merge bitcoin/bitcoin#25937: test: add coverage for rpc error when trying to rescan beyond pruned data (fanquake)
712dcaf86b Merge bitcoin/bitcoin#27516: test: simplify uint256 (de)serialization routines (fanquake)
90d65f25e1 Merge bitcoin/bitcoin#27508: build: use latest config.{guess,sub} in depends (fanquake)
df7be026e4 Merge bitcoin/bitcoin#27506: test: prevent intermittent failures (fanquake)
9b58b2d97b Merge bitcoin/bitcoin#27447: depends: Remove `_LIBCPP_DEBUG` from depends DEBUG mode (fanquake)
07770b77a1 Merge bitcoin/bitcoin#26741: doc: FreeBSD DataDirectoryGroupReadable Setting (fanquake)
5645362f11 Merge bitcoin/bitcoin#27362: test: remove `GetRNGState` lsan suppression (fanquake)
671e8e6851 Merge bitcoin/bitcoin#27368: refactor: Drop no longer used `CNetMsgMaker` instances (fanquake)
a11690bf62 Merge bitcoin/bitcoin#27301: depends: make fontconfig build under clang-16 (fanquake)
0a94b3f27b Merge bitcoin/bitcoin#27328: depends: fix osx build with clang 16 (fanquake)

Pull request description:

  ## Issue being fixed or feature implemented
  Batch of trivial backports

  ## What was done?
  See commits

  ## How Has This Been Tested?
  built locally; large combined merge passed tests locally

  ## Breaking Changes
  Should be none

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

ACKs for top commit:
  UdjinM6:
    utACK 37389c7d38
  kwvg:
    utACK 37389c7d38

Tree-SHA512: 1ea075a58361f57e037febcf003d380ab845b6c8e1c62d9fcf8954d46cd006046d1951f15a41a5deb9ab7af734df9dafcf89f33d115d78246752f7e2cd13f4ee
2024-10-25 12:58:26 -05:00
pasta
e43d75bca2
Merge #6352: backport: trivial 2024 10 23 pr9
168e5e4a50 Merge bitcoin/bitcoin#28877: bench: Update nanobench to 4.3.11 (fanquake)
417c86b949 Merge bitcoin/bitcoin#28105: doc: Clarify that -fstack-reuse=all bugs exist on all versions of GCC (fanquake)
a620cccd81 Merge bitcoin/bitcoin#26970: test: fix immediate tx relay in wallet_groups.py (merge-script)
f115d9c27f Merge bitcoin/bitcoin#27061: doc: Document affected gcc versions for -fstack-reuse=none workaround (fanquake)
6889a8db29 Merge bitcoin/bitcoin#27056: doc: use arch agnostic clang path in fuzzing doc (macOS) (MarcoFalke)
97858384ec Merge bitcoin/bitcoin#21995: build: Make dependency package archive timestamps deterministic (fanquake)
c4760bb32e Merge bitcoin/bitcoin#27030: Update nanobench to version v4.3.10 (fanquake)
a7e3c2c916 Merge bitcoin-core/gui#705: doc: Fix comment about how wallet txs are sorted (Hennadii Stepanov)
44e6c9e902 Merge bitcoin/bitcoin#27004: test: Use std::unique_ptr over manual delete in coins_tests (fanquake)
2ab1989a39 Merge bitcoin/bitcoin#27010: refactor: use `Hash` helpers for double-SHA256 calculations (MarcoFalke)
c681aaad30 Merge bitcoin/bitcoin#22811: build: Fix depends build system when working with subtargets (fanquake)
d1b7386374 Merge bitcoin/bitcoin#26930: fuzz: Actually use mocked mempool in tx_pool target (MarcoFalke)
cd53a195a6 Merge bitcoin/bitcoin#26873: doc: add databases/py-sqlite3 to FreeBSD test suite deps (fanquake)
8cc5f11a2f Merge bitcoin/bitcoin#26506: refactor: rpc: use convenience fn to auto parse non-string parameters (MarcoFalke)
662302c42b Merge bitcoin/bitcoin#26805: tests: Use unique port for ZMQ tests to allow for multiple test instances (MarcoFalke)
66a3981a7a Merge bitcoin/bitcoin#24279: build: Make `$(package)_*_env` available to all `$(package)_*_cmds` (fanquake)
3261092f85 Merge bitcoin/bitcoin#26520: doc: test: update/fix TestShell example instructions (fanquake)
5f78859562 Merge bitcoin/bitcoin#25248: refactor: Add LIFETIMEBOUND / -Wdangling-gsl to Assert() (fanquake)
459425776c Merge bitcoin/bitcoin#26229: test: Use proper Boost macros instead of assertions (MacroFake)
3be81a2d4c Merge bitcoin/bitcoin#25915: test: Fix wallet_balance intermittent issue (Andrew Chow)
da1d3f2654 Merge bitcoin/bitcoin#25663: tracing: do not use `coin` after move in `CCoinsViewCache::AddCoin` (MacroFake)

Pull request description:

  ## Issue being fixed or feature implemented
  Batch of trivial backports

  ## What was done?
  See commits

  ## How Has This Been Tested?
  built locally; large combined merge passed tests locally

  ## Breaking Changes
  Should be none

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

ACKs for top commit:
  UdjinM6:
    utACK 168e5e4a50

Tree-SHA512: 3099e09bc500a86bffafea0db136e3213f69b69e7af74304c171780e56ff1ff4c973a228962cf80aec62158ded19365d6f8506ef202a15751a43851574f082e2
2024-10-25 12:56:23 -05:00
pasta
7997ad5a08
Merge #6354: backport: trivial 2024 10 23 pr6
d573e4ff86 Merge bitcoin/bitcoin#28084: doc: update windows `-fstack-clash-protection` doc (fanquake)
e3bbd1a46e Merge bitcoin-core/gui#740: Show own outputs on PSBT signing window (Hennadii Stepanov)
70cbd3f8a2 Merge bitcoin/bitcoin#28044: test: indexes, fix on error infinite loop (Ryan Ofsky)
551109105a Merge bitcoin/bitcoin#28036: test: Restore unlimited timeout in IndexWaitSynced (fanquake)
2767a13268 Merge bitcoin/bitcoin#28021: docs: fixup honggfuzz fuzz patch (fanquake)
af944b7c8d Merge bitcoin/bitcoin#28013: doc: Fix verify-binaries link in contrib README (fanquake)
79a20f96a5 Merge bitcoin/bitcoin#27929: Added static_assert to check that base_blob is using whole bytes. (fanquake)
ece625c754 Merge bitcoin/bitcoin#27914: feerate: For GetFeePerK() return nSatoshisPerK instead of round trip through GetFee (fanquake)
ba5f4c0332 Merge bitcoin/bitcoin#27906: doc: test: update TestShell instructions (fanquake)
fbc6c6e644 Merge bitcoin/bitcoin#27875: build: make sure we can overwrite config.{guess,sub} before doing so (fanquake)
e2fcd1d947 Merge bitcoin/bitcoin#27225: doc: document json rpc endpoints (fanquake)
324db8bb31 Merge bitcoin/bitcoin#27603: test: added coverage to mining_basic.py (glozow)
a21b4b16f7 Merge bitcoin/bitcoin#27802: Update .style.yapf (fanquake)
ee6b7d66f1 Merge bitcoin/bitcoin#27721: depends: remove redundant stdlib option (fanquake)
f27778abe7 Merge bitcoin/bitcoin#27561: test: Explicitly specify directory where to search tests for (fanquake)
105442f8cb Merge bitcoin/bitcoin#26422: build: Use newest `config.{guess,sub}` available (fanquake)
bef9631e99 Merge bitcoin/bitcoin#27661: doc, test: Document steps to reproduce TSan warning for `libdb` (fanquake)
277766fcef Merge bitcoin/bitcoin#27493: depends: no-longer nuke libc++abi.so* in native_clang package (fanquake)

Pull request description:

  ## Issue being fixed or feature implemented
  Batch of trivial backports

  ## What was done?
  See commits

  ## How Has This Been Tested?
  built locally; large combined merge passed tests locally

  ## Breaking Changes
  Should be none

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK d573e4ff86
  knst:
    utACK d573e4ff86

Tree-SHA512: c94f55888de1758457a617253ddd13013141398438a32343ee10ee170d76b7e091ef4479e96f7983cb7661ceb99984a60a668ee142a9aea52b8c5305738398cc
2024-10-25 09:58:33 -05:00
fanquake
66a3981a7a
Merge bitcoin/bitcoin#24279: build: Make $(package)_*_env available to all $(package)_*_cmds
affbf58a1e52a8e60c830be6a9e0347e0ff4c28e build: Move environment variables into `$(package)_config_env` (Hennadii Stepanov)
d44fcd3c976572883bbf7f386bc88e2610dc1a58 build: Make $(package)_*_env available to all $(package)_*_cmds (Hennadii Stepanov)

Pull request description:

  On master (1e7564eca8a688f39c75540877ec3bdfdde766b1) the depends build system, which is based on pure GNU Make, works, but it lacks robustness, and in some corner cases it fails. For example, see bitcoin/bitcoin#22552.

  Another [bug](https://github.com/bitcoin/bitcoin/issues/22719) in the depends build system has already become a problem at least two times in the past (https://github.com/bitcoin/bitcoin/pull/16883#issuecomment-683817472 and https://github.com/bitcoin/bitcoin/pull/24134). Each time the problem was solved with other means.

  The initial [solution](https://github.com/bitcoin/bitcoin/pull/19882) had some discussion. Also it was discussed on the IRC meeting in #bitcoin-core-builds channel. This PR, actually, is a resurrection of it, as the bug silently struck pretty [recently](https://github.com/bitcoin/bitcoin/pull/24134).

  The bug is well described in bitcoin/bitcoin#22719.

  Here is another, a bit simpler description, which requires only basic shell (bash, dash etc) experience.
  After creating targets by this code:1e7564eca8/depends/funcs.mk (L280) a "draft" line of recipe like `$($(1)_config_env) $(call $(1)_config_cmds, $(1))` becomes a shell command sequence `VAR1=foo VAR2=bar command1 && command2` which is supposed to be executed in a [new sub-shell](https://www.gnu.org/software/make/manual/html_node/Execution.html#Execution).

  Please note that `VAR1=foo VAR2=bar` part is visible for the first `command1` only (for details see shell docs). Example:
  ```sh
  $ VAR1="foo" VAR2="bar" echo "begin" && printenv VAR1 && printenv VAR2 && echo "end"
  begin
  $ echo $?
  1
  ```

  Using the `export` command is a trivial solution:
  ```sh
  $ export VAR1="foo" VAR2="bar"; echo "begin" && printenv VAR1 && printenv VAR2 && echo "end"
  begin
  foo
  bar
  end
  $ echo $?
  0
  ```

  As a [new sub-shell](https://www.gnu.org/software/make/manual/html_node/Execution.html#Execution) is invoked for each line of the recipe, there are no side effects of using `export`. It means this solution should not be considered invasive.

  Fixes bitcoin/bitcoin#22719.

  ---

  Also this PR removes no longer needed crutch from `qt.mk`.

ACKs for top commit:
  fanquake:
    ACK affbf58a1e52a8e60c830be6a9e0347e0ff4c28e

Tree-SHA512: 0ce2cf82870a7774bdf1592fac50857126ae47da902e349f1092d50109223be9d6a8efd5e92ec08c2ca775b17516482aabaf232378950ade36484a883acc177b
2024-10-25 09:08:27 -05:00
pasta
0587790c01
Merge #6347: backport: trivial 2024 10 23 pr3
c75a0d4c57 Merge bitcoin/bitcoin#29177: build: Fix check whether `-latomic` needed (fanquake)
f670118cce Merge bitcoin/bitcoin#28851: build: Patch Qt to handle minimum macOS version properly (fanquake)
685ee8a46f Merge bitcoin/bitcoin#28884: doc: remove x86_64 build assumption from depends doc (fanquake)
47f6126504 Merge bitcoin/bitcoin#28881: doc: remove mention of missing bdb being a configure error (fanquake)
a9021db4ec Merge bitcoin/bitcoin#28777: doc: update docs for `CHECK_ATOMIC` macro (fanquake)
d5e15dfc5a Merge bitcoin/bitcoin#26839: Add support for RNDR/RNDRRS for AArch64 on Linux (Andrew Chow)
5aedcbfb43 Merge bitcoin/bitcoin#28778: depends: drop -O1 workaround from arm64 apple Qt build (fanquake)
95a8d8cfdc Merge bitcoin/bitcoin#21161: Fee estimation: extend bucket ranges consistently (glozow)
f4ea48e623 Merge bitcoin/bitcoin#28693: build: Include `config/bitcoin-config.h` explicitly in `util/trace.h` (fanquake)
f160e0dbb2 Merge bitcoin/bitcoin#28691: refactor: Remove CBlockFileInfo::SetNull (fanquake)
0278163aa3 Merge bitcoin/bitcoin#28697: fuzz: Increase merge -rss_limit_mb (fanquake)
90a1fb0e8d Merge bitcoin/bitcoin#28650: fuzz: Merge with -set_cover_merge=1 (fanquake)
f007abd19d Merge bitcoin/bitcoin#28459: build: add `-mbranch-protection=bti` (aarch64) to hardening flags (fanquake)
af8d12445a Merge bitcoin/bitcoin#28624: docs: fix typo (fanquake)
c740264da8 Merge bitcoin/bitcoin#28532: qt: enable` -ltcg` for windows under LTO (fanquake)
ccd3920d40 Merge bitcoin/bitcoin#28556: doc: fix link to developer-notes.md file in multiprocess.md (fanquake)

Pull request description:

  ## Issue being fixed or feature implemented
  Batch of trivial backports

  ## What was done?
  See commits

  ## How Has This Been Tested?
  built locally; large combined merge passed tests locally

  ## Breaking Changes
  Should be none

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK c75a0d4c57

Tree-SHA512: 035dc3fa9812c7f381946ae4798b8e729a58b38a090d94502a8d992e9cfaab3307173c602d7b782c637a79c5c41b62570dc73bb4bb367e4505a039964926181b
2024-10-24 17:14:23 -05:00
fanquake
f670118cce
Merge bitcoin/bitcoin#28851: build: Patch Qt to handle minimum macOS version properly
05aca093819be276ac7d648472c6ed5c7d235cc5 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov)

Pull request description:

  This PR is:
  - required to [switch](https://github.com/bitcoin/bitcoin/pull/28622) to macOS 14 SDK (Xcode 15).
  - an alternative to https://github.com/bitcoin/bitcoin/pull/28732 and https://github.com/bitcoin/bitcoin/pull/28775.

  Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to
  the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option.

  Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
      #endif
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
  ```

  In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #if defined(__has_builtin) && __has_builtin(__is_target_os)
          #if __is_target_os(macos)
              #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
              #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
          #endif
      #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
      #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
  ```

  The latter macro is not provided by LLVM Clang until c8e2dd8c6f, which is available in Clang 17.

  The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header.

ACKs for top commit:
  maflcko:
    lgtm ACK 05aca093819be276ac7d648472c6ed5c7d235cc5

Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
2024-10-24 13:50:33 -05:00
fanquake
5aedcbfb43
Merge bitcoin/bitcoin#28778: depends: drop -O1 workaround from arm64 apple Qt build
664c87354f9ec5df95346eab72a034296b83914d depends: drop -O1 workaround from arm64 apple Qt build (fanquake)

Pull request description:

  Drop the workaround of setting optimization flags to -O1 for the `arm64-apple-darwin` builds. I no-longer see reproducibility issues when building across `x86_64` and `aarch64`:
  ```bash
  real7m21.192s
  user67m41.047s
  sys5m8.596s
  fedora-32gb-hel1-1 bitcoin]# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  62373549d2884e8ef8f46a77b9a93f64ebfc88603569e9d33b68fc67beaf2226  guix-build-664c87354f9e/output/arm64-apple-darwin/SHA256SUMS.part
  597889f1908fdb67a6419177a98935b7119c637a962f03f47270893c5ba3fd6f  guix-build-664c87354f9e/output/arm64-apple-darwin/bitcoin-664c87354f9e-arm64-apple-darwin-unsigned.tar.gz
  289340354532a54a42b7235c831d13fdb28751c643f0fa0fc417ab195e9b5d90  guix-build-664c87354f9e/output/arm64-apple-darwin/bitcoin-664c87354f9e-arm64-apple-darwin-unsigned.zip
  74f4ab3819a186d6c34ca0a4b9dda7c38fcb36bd9b22075a5d91df9bdd5df98a  guix-build-664c87354f9e/output/arm64-apple-darwin/bitcoin-664c87354f9e-arm64-apple-darwin.tar.gz
  f0d0dad63057c7dddf6d6ccee244e7916ac0ee26b3bef8dd35f8430280043b38  guix-build-664c87354f9e/output/dist-archive/bitcoin-664c87354f9e.tar.gz
  fedora-32gb-hel1-1 bitcoin]# uname -m
  aarch64
  ```

  ```bash
  real18m10.759s
  user108m21.656s
  sys6m12.930s
  ubuntu-32gb-hel1-1:~/bitcoin# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  62373549d2884e8ef8f46a77b9a93f64ebfc88603569e9d33b68fc67beaf2226  guix-build-664c87354f9e/output/arm64-apple-darwin/SHA256SUMS.part
  597889f1908fdb67a6419177a98935b7119c637a962f03f47270893c5ba3fd6f  guix-build-664c87354f9e/output/arm64-apple-darwin/bitcoin-664c87354f9e-arm64-apple-darwin-unsigned.tar.gz
  289340354532a54a42b7235c831d13fdb28751c643f0fa0fc417ab195e9b5d90  guix-build-664c87354f9e/output/arm64-apple-darwin/bitcoin-664c87354f9e-arm64-apple-darwin-unsigned.zip
  74f4ab3819a186d6c34ca0a4b9dda7c38fcb36bd9b22075a5d91df9bdd5df98a  guix-build-664c87354f9e/output/arm64-apple-darwin/bitcoin-664c87354f9e-arm64-apple-darwin.tar.gz
  f0d0dad63057c7dddf6d6ccee244e7916ac0ee26b3bef8dd35f8430280043b38  guix-build-664c87354f9e/output/dist-archive/bitcoin-664c87354f9e.tar.gz
  ubuntu-32gb-hel1-1:~/bitcoin# uname -m
  x86_64
  ```

ACKs for top commit:
  hebasto:
    ACK 664c87354f9ec5df95346eab72a034296b83914d.
  TheCharlatan:
    ACK 664c87354f9ec5df95346eab72a034296b83914d

Tree-SHA512: 79527df4181eb0a0c42fe526581479abcdeba8fb09e1faf52265d697d39a8f3a3532ee3c573579b9af00b7330a401e4b6f1686636f9bac6bf9839be8381a2033
2024-10-24 13:50:32 -05:00
fanquake
c740264da8
Merge bitcoin/bitcoin#28532: qt: enable -ltcg for windows under LTO
f0cebbdb2a1a3c2f0facd88963484ad6fd5851db qt: enable -ltcg for windows HOST (fanquake)

Pull request description:

  Patch around multiple definition issues in Qt, and enable `-ltcg` when using `LTO=1`.

  Split from #25391.

ACKs for top commit:
  hebasto:
    ACK f0cebbdb2a1a3c2f0facd88963484ad6fd5851db

Tree-SHA512: 2d6e34779f360bf6dfea4f70fc9004a16e95da79716fcb3046afbf2b01317b7e16965cb51b967b7b5fb64549306c5f48cf59082884289c52016bc1e86949e062
2024-10-24 11:17:28 -05:00
fanquake
9b6a05df66
Merge bitcoin/bitcoin#29443: depends: fix BDB compilation on OpenBSD
0fbf051fec723f86f49ab14ea15c91bb1435c656 depends: fix BDB compilation on OpenBSD (Sebastian Falbesoner)

Pull request description:

  Compiling C++ code with `-D_XOPEN_SOURCE=600` causes problems on OpenBSD. If that define is set, the C++ standard header detection routine in BDB's configure script fails due to a missing type name for `locale_t` (see https://gist.github.com/theStack/b41884e31ebc5cdca3220bcaa674cb70 for the relevant config.log part).

  This results in `HAVE_CXX_STDHEADERS` not being defined, which then it turn leads to the inclusion of `<iostream.h>` (rather than `<iostream>`), which doesn't exist, as described in #28963.

  According to a mailing list post discussing a similar problem [1], "OpenBSD provides the POSIX APIs by default", so we don't need this define anyway and can remove it. This fixes the BDB build problem as described in issue #28963. See also f87e75ae71 for a similar fix for google's flatbuffer project.

  Tested on OpenBSD 7.4 with clang 13.0.0. Fixes #28963.

  [1] https://www.mail-archive.com/tech@openbsd.org/msg63386.html

ACKs for top commit:
  fanquake:
    ACK 0fbf051fec723f86f49ab14ea15c91bb1435c656

Tree-SHA512: 02139e9081ed855e067bfba8c81b54c657417576e553cc1035a916ada9be049358f5e14d756d5f234c5226bd7e943f61c6ae8990c1b152f9125681b7b777c9b3
2024-10-24 11:16:20 -05:00
fanquake
277766fcef
Merge bitcoin/bitcoin#27493: depends: no-longer nuke libc++abi.so* in native_clang package
9ae854da193f3c4bda38a75e96f9b989b289baab depends: no-longer nuke libc++abi.so* in native_clang package (fanquake)

Pull request description:

  We weren't copying it over in any case.

ACKs for top commit:
  hebasto:
    ACK 9ae854da193f3c4bda38a75e96f9b989b289baab
  theuni:
    Sure. utACK no-op 9ae854da193f3c4bda38a75e96f9b989b289baab.

Tree-SHA512: 3cc7f18f27c1b498f930bc1a09283aa04ba673d3c1a5220d8462213f0a06b74bc34989f23404402850de518cba35ddab900a54f7f0fac112fc86664e4155f8cb
2024-10-23 20:05:10 -05:00
fanquake
a11690bf62
Merge bitcoin/bitcoin#27301: depends: make fontconfig build under clang-16
9cbc1c279247800d79c5f6f95c0c2d8f387aac0a depends: make fontconfig build under clang-16 (fanquake)

Pull request description:

  Use the same workaround we've applied to qrencode, and other packages. Fontconfig not building is currently a blocker for fuzz/sanitizer infra upgrades (#27298).

  For now, this is also more straightforward than bumping the package, which introduces more complexity/usage of gperf.

  Closes: #27299.

ACKs for top commit:
  hebasto:
    ACK 9cbc1c279247800d79c5f6f95c0c2d8f387aac0a

Tree-SHA512: 387ea1a73e3429f166ef5278305a56cb3c69b6e3fc8a21a66521738e313e3fe783f042759b396cd88e28c10918a4427fb836a8dfecc5a846723b6f6c6a7ade51
2024-10-23 18:57:24 -05:00
Kittywhiskers Van Gogh
9dad5252db
build: set -march irrespective of target operating system 2024-10-08 14:52:16 +00:00
Kittywhiskers Van Gogh
82b440546a
build: update gmp to 6.3.0 2024-10-08 14:52:16 +00:00
fanquake
9f0e4ae82a
Merge bitcoin/bitcoin#29706: depends: set two CMake options globally
76045bb9d6808931cd0f2933203b5b611e032ec8 depends: always set CMAKE_POSITION_INDEPENDENT_CODE=ON (fanquake)
d04623678c70ff58a20fb5c35d33cb8f483f1efb depends: always set CMAKE_INSTALL_LIBDIR=lib/ (fanquake)

Pull request description:

  Set `CMAKE_INSTALL_LIBDIR=lib/` and `CMAKE_POSITION_INDEPENDENT_CODE=ON` globally in depends, rather than per-package. `CMAKE_INSTALL_LIBDIR=lib/` is needed to override the annoying [`GNUInstallDirs`](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html) `lib` vs `lib64` behaviour, and we always want PIC code. The PIC commit is the counterpart to the same Autotools change in #29488. I'm PRing these commits as I have a CMake branch building on top, and want to avoid adding the same workarounds to every package we are going to touch, but these can go in separately as the build should be tested for existing packages (i.e multiprocess).

ACKs for top commit:
  hebasto:
    re-ACK 76045bb9d6808931cd0f2933203b5b611e032ec8.
  theuni:
    utACK 76045bb9d6808931cd0f2933203b5b611e032ec8. Both changes make sense to me, and both can be overridden if needed, though I can't imagine we'd need to.

Tree-SHA512: 655a0b6b7ee5a5820f52e8e919ef03fc216d29f13f3904f72b64ce57436510e073c903039488d5740535c56e1f6221267229238c5231de5f8467d238fd562578
2024-10-04 12:54:24 -05:00
fanquake
be07bbe87e
Merge bitcoin/bitcoin#28846: depends: fix libmultiprocess build on aarch64
bde8d63b17637c507a543cebe90f2998b5847373 depends: build libmultiprocess with position independant code (fanquake)
506634d79d6427925cd458f67799fe59e0ab14dd depends: always install libmultiprocess to /lib (fanquake)
beb309626381bf189cd2ae8bde83078b9de47c6a depends: always install capnp to /lib (fanquake)

Pull request description:

  Change to always install libmultiprocess into `lib/`. On some systems (my Fedora aarch64 box), libmultiprocess was being installed into `lib64/`, and then configure would fail to pick it up, because we only add `lib/` to pkgconfig/ldflags out of depends. Rather than adding lib64 to those, I opted for installing libmultiprocess into lib, with every other dependency we build.

  This was broken in our build after https://github.com/chaincodelabs/libmultiprocess/pull/79 upstream.

ACKs for top commit:
  ryanofsky:
    Code review ACK bde8d63b17637c507a543cebe90f2998b5847373. Only changes since last review were reverting the native_capnp change as suggested, and changing the order of the first two commits.

Tree-SHA512: ddd547e4ac224f2f199c569efd91104db7f2c243b124f9535aa0d9377315775ac566d699101580ce45ddd6676ad3e0c8cbe256334eeed9548205c2fa04d02102
2024-10-04 12:54:24 -05:00
fanquake
0dea194026
Merge bitcoin/bitcoin#28856: depends: Build the native_capnp and capnp packages with CMake
11d797e3a078b8f5f0039a1073047d3f0a8c6cdc depends: Build `native_capnp` package with CMake (Hennadii Stepanov)
90389c95e9edf3d705fb9376388c83f07d1a570e depends: Build `capnp` package with CMake (Hennadii Stepanov)

Pull request description:

  The first commit fixes two bugs when cross-compiling the `capnp` package on the master branch @ 160d23677ad799cf9b493eaa923b2ac080c3fb8e:
  - for `x86_64-w64-mingw32` (see https://github.com/bitcoin/bitcoin/pull/28735#issuecomment-1790406668):
  ```
  libtool: link: x86_64-w64-mingw32-g++-posix -shared -nostdlib /usr/lib/gcc/x86_64-w64-mingw32/12-posix/../../../../x86_64-w64-mingw32/lib/dllcrt2.o /usr/lib/gcc/x86_64-w64-mingw32/12-posix/crtbegin.o  src/kj/.libs/cidr.o src/kj/.libs/common.o src/kj/.libs/units.o src/kj/.libs/memory.o src/kj/.libs/refcount.o src/kj/.libs/array.o src/kj/.libs/list.o src/kj/.libs/string.o src/kj/.libs/string-tree.o src/kj/.libs/source-location.o src/kj/.libs/hash.o src/kj/.libs/table.o src/kj/.libs/encoding.o src/kj/.libs/exception.o src/kj/.libs/debug.o src/kj/.libs/arena.o src/kj/.libs/io.o src/kj/.libs/mutex.o src/kj/.libs/thread.o src/kj/.libs/time.o src/kj/.libs/filesystem.o src/kj/.libs/filesystem-disk-unix.o src/kj/.libs/filesystem-disk-win32.o src/kj/.libs/test-helpers.o src/kj/.libs/main.o src/kj/parse/.libs/char.o   -L/home/hebasto/git/bitcoin/depends/x86_64-w64-mingw32/lib -L/usr/lib/gcc/x86_64-w64-mingw32/12-posix -L/usr/lib/gcc/x86_64-w64-mingw32/12-posix/../../../../x86_64-w64-mingw32/lib -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 /usr/lib/gcc/x86_64-w64-mingw32/12-posix/crtend.o  -mthreads -O2 -mthreads   -mthreads -o .libs/libkj-1-0-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libkj.dll.a
  /usr/bin/x86_64-w64-mingw32-ld: src/kj/.libs/cidr.o:cidr.c++:(.text+0x1dc): undefined reference to `__imp_inet_ntop'
  /usr/bin/x86_64-w64-mingw32-ld: src/kj/.libs/cidr.o:cidr.c++:(.text+0x44b): undefined reference to `__imp_inet_pton'
  collect2: error: ld returned 1 exit status
  ```
  - for `arm64-apple-darwin`:
  ```
  checking build system type... x86_64-pc-linux-gnu
  checking host system type... Invalid configuration `arm64-apple-darwin': machine `arm64-apple' not recognized
  configure: error: /bin/bash build-aux/config.sub arm64-apple-darwin failed
  ```

  The second commit applies the same changes for the `native_capnp` package for [consistency](https://github.com/bitcoin/bitcoin/pull/28856#issuecomment-1807936546).

ACKs for top commit:
  ryanofsky:
    Code review ACK 11d797e3a078b8f5f0039a1073047d3f0a8c6cdc. Since last review arm64-apple-darwin platform is now mentioned in the commit message, and the change to `depends/packages/libmultiprocess.mk` in d1604d4b1d1ee8df279a1776303e167cc3d06193 which was unrelated (but probably still a good optimization) was reverted.

Tree-SHA512: c636e53073ce6fcda9724723bc59f3990fa9629a3b2f73d93dbc102a5a1badfbe8f4c5fef841f03588ebcad5cd4883f3ce32b128afcd75f6bc21eb801796a586
2024-10-04 12:54:23 -05:00
merge-script
7cdacdc1ad
Merge bitcoin/bitcoin#30513: depends: Bump libmultiprocess for CMake fixes
ec0e805d11d6a73c542032fc49a58a1d05b62d24 depends: Bump `libmultiprocess` for CMake fixes (Hennadii Stepanov)

Pull request description:

  This PR amends https://github.com/bitcoin/bitcoin/pull/30490 and bumps the upstream branch, which now includes a required CMake [fix](https://github.com/chaincodelabs/libmultiprocess/pull/103).

  Addresses https://github.com/bitcoin/bitcoin/pull/30490#issuecomment-2241153244.

  The CI logs are available in https://github.com/bitcoin/bitcoin/pull/29790 where the recent [push](https://github.com/hebasto/bitcoin/tree/pr29790-0723.2.mp) uses this PR implementation.

ACKs for top commit:
  ryanofsky:
    Code review ACK ec0e805d11d6a73c542032fc49a58a1d05b62d24
  theuni:
    utACK ec0e805d11d6a73c542032fc49a58a1d05b62d24.

Tree-SHA512: e300a27bcab80a63a518719e9af8e10a938294fc07289cadbf4a7744627c10b0e9541a36971d08b65152f3f7d0eb434e427274d9c9d9f0bdd216afd914027a0f
2024-10-03 01:16:41 -05:00
merge-script
1b622944c4
Merge bitcoin/bitcoin#30743: depends: build libevent with -D_GNU_SOURCE
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
2024-10-01 22:54:14 -05:00
merge-script
d46e16c023
Merge bitcoin/bitcoin#30490: depends: bump libmultiprocess for CMake fixes
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
2024-10-01 09:46:26 -05:00
fanquake
7a63c20c47
Merge bitcoin/bitcoin#29276: depends: Update libmultiprocess library to fix C++20 macos build error
b8105b3ed7c97cd6545dba99d0e13c33f183e450 depends: Update libmultiprocess library to fix C++20 macos build error (Ryan Ofsky)

Pull request description:

  Fixes #29248

  The std::result_of type was removed in c++20, but was being referenced in some old, unused code in the library. The issue was fixed in:

  - https://github.com/chaincodelabs/libmultiprocess/pull/91

  This update also includes other recent libmultiprocess changes to improve C++20 support and fix build issues:

  - https://github.com/chaincodelabs/libmultiprocess/pull/89
  - https://github.com/chaincodelabs/libmultiprocess/pull/90
  - https://github.com/chaincodelabs/libmultiprocess/pull/93

ACKs for top commit:
  fanquake:
    ACK b8105b3ed7c97cd6545dba99d0e13c33f183e450.

Tree-SHA512: 2ca64b5fc27be752baba38df4b4faf62152e18c70ead6e0e063f1cb0c25dd5d924dec7ebfd7f8bbd651ae50eb35e8d8b591a9847c36f22558b5f5effccf56536
2024-10-01 09:46:26 -05:00
fanquake
630e767be7
Merge bitcoin/bitcoin#28907: depends: bump libmultiprocess to fix capnproto deprecation warnings
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
2024-10-01 09:46:26 -05:00
fanquake
318471d599
Merge bitcoin/bitcoin#28735: depends: Bump to capnproto-c++-1.0.1
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
2024-10-01 09:46:26 -05:00
fanquake
ad0c279ac8
Merge bitcoin/bitcoin#26672: build: Update libmultiprocess library
1986f129c6af7644d238c76f032713731d7afcac build: Update `libmultiprocess` library (Hennadii Stepanov)

Pull request description:

  This update in particular includes:
  - https://github.com/chaincodelabs/libmultiprocess/pull/78 which is [required](https://github.com/bitcoin/bitcoin/pull/25972#issuecomment-1246812573) for https://github.com/bitcoin/bitcoin/pull/25972
  - https://github.com/chaincodelabs/libmultiprocess/pull/74
  - https://github.com/chaincodelabs/libmultiprocess/pull/70

ACKs for top commit:
  ryanofsky:
    Code review ACK 1986f129c6af7644d238c76f032713731d7afcac

Tree-SHA512: 2d9fa72df5de7d5be37d77d479702cba36c45e9fa9d9fc27e58aac0437c39e4a1054c0ac53b612cb43e830982e444d98c7d3e651d093ac68344e66f4734227bb
2024-10-01 09:46:26 -05:00
fanquake
ae6e0ada9b
Merge bitcoin/bitcoin#29725: depends: build libqrencode with CMake
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
2024-09-29 10:54:41 +03:00
UdjinM6
1522896f9f
fix mingw32 build 2024-09-28 10:48:43 +03:00
fanquake
6bee8e25f7
Merge bitcoin/bitcoin#27496: depends: reuse _config_opts for CMake options
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
2024-09-27 13:45:27 -05:00
merge-script
24973ee34c
Merge bitcoin/bitcoin#30488: depends: Fix CMake-generated libevent*.pc files
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
2024-09-27 12:52:15 -05:00
merge-script
a27b08ed7a
Merge bitcoin/bitcoin#29835: depends: build libevent with CMake
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
2024-09-27 12:52:15 -05:00
merge-script
02aee122de
Merge bitcoin/bitcoin#30508: depends: Fix CMake-generated libzmq.pc file
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
2024-09-27 12:52:15 -05:00
merge-script
e2b24461d4
Merge bitcoin/bitcoin#29723: depends: build zeromq with CMake
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
2024-09-27 12:52:15 -05:00
pasta
801c4fc24a
build: followup to 29488 applied to gmp 2024-09-27 10:22:36 -05:00
fanquake
4b704a60ad
Merge bitcoin/bitcoin#28627: depends: zeromq 4.3.5
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
2024-09-26 22:44:19 -05:00
fanquake
0e6cb989a7
Merge bitcoin/bitcoin#26421: build: copy config.{guess,sub} post autogen in zmq package
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
2024-09-26 22:44:15 -05:00
fanquake
cd33b69bfd
Merge bitcoin/bitcoin#29488: depends: always configure with --with-pic
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
2024-09-26 22:38:53 -05:00
fanquake
1b88674815
Merge bitcoin/bitcoin#29287: depends: Do not override CFLAGS when building SQLite with DEBUG=1
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
2024-09-26 22:37:07 -05:00
Andrew Chow
f50fb6e627
Merge bitcoin/bitcoin#26998: depends: ensure we are appending to sqlite cflags
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
2024-09-26 22:37:04 -05:00
Andrew Chow
25a594f46e
Merge bitcoin/bitcoin#25987: build: compile depends sqlite with more recommended options
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
2024-09-26 22:35:05 -05:00
fanquake
d725c5880d
Merge bitcoin/bitcoin#27312: depends: qrencode 4.1.1
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
2024-09-26 22:34:13 -05:00
fanquake
482e5bbc49
Merge bitcoin/bitcoin#27462: depends: fix compiling bdb with clang-16 on aarch64
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
2024-09-26 22:33:26 -05:00
merge-script
f0a53c99e9
Merge bitcoin/bitcoin#26994: depends: define __BSD_VISIBLE for FreeBSD bdb build
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
2024-09-26 22:32:03 -05:00