Merge bitcoin/bitcoin#25985: Revert "build: Use Homebrew's sqlite package if it is available"

d216d714aa Revert "build: Use Homebrew's sqlite package if it is available" (fanquake)

Pull request description:

  This reverts ee7b84e63c from #20527.

  That change was made without any rationale, maybe other than, a brew
  installed version might be newer, and that's "better". However when
  building from source on macOS, it just results in drastically worse
  performance, and issues / confusion like #25724.

  The difference in performance can be observed using the example from https://github.com/bitcoin/bitcoin/issues/25724#issuecomment-1213554922,
  but minified i.e:
  ```bash
  time src/bitcoin-cli createwallet speedy true
  time src/bitcoin-cli importdescriptors '[
    {"desc":"raw(00145846369f3d6ba366d6f5a903fb5cf4dca3763c0e)#k9wh6v62","timestamp":"now"},
    {"desc":"raw(001420800aabf13f3a4c4ce3ce4c66cecf1d17f21a6e)#6m0hlfh4","timestamp":"now"},
    {"desc":"raw(0014c6bf9715e06d73ebf9b3b02d5cc48d24d8bbabc1)#wyavh36r","timestamp":"now"},
    {"desc":"raw(00141ba7807b3f46af113beaea5c698428ce7138cd8a)#jctdsups","timestamp":"now"},
    {"desc":"raw(00140c1bd27f10fff01b36ddf3c1febaa1acff19b080)#9s6nc3pk","timestamp":"now"},
    {"desc":"raw(00141226e31987e4bc2e63c0ee12908f675e40464b20)#9pp7qm39","timestamp":"now"},
    {"desc":"raw(0014f73f149f7503960a5e849c6ee7a8a8c336f631cb)#qtkxv9fc","timestamp":"now"},
    {"desc":"raw(0014c8ccb4d81ffc769fc5fdd8d7eed69b0e0cae5749)#hn39qayv","timestamp":"now"},
    {"desc":"raw(001498565aead2d67a22a6021d55210f2a917fc22169)#6ar3vwsx","timestamp":"now"},
    {"desc":"raw(001403013248ac0cd9eabe176cad162cda2a19f771e1)#4m47mukd","timestamp":"now"}
  ]'
  ```

  Running master, when building from souce and using brew installed
  sqlite, this takes ~3.4s. With this PR, the same operation takes ~0.3s.

  Resolves the "build from source" portion of #25724. Building from
  depends is still not ideal, however I have some other changes that might
  help improve things in that case.

  Related performance issue reports:
  * https://github.com/bitcoindevkit/bdk/issues/749
  * https://bitcoin.stackexchange.com/questions/113898/bitcoin-v23-is-10-times-slower-than-v22-on-macos-for-basic-regtest-tests
  * https://github.com/bitcoin/bitcoin/issues/25724
  * https://github.com/bitcoin/bitcoin/pull/25985#issuecomment-1245942400

ACKs for top commit:
  achow101:
    ACK d216d714aa
  jarolrod:
    ACK d216d714aa
  hebasto:
    ACK d216d714aa, I have reviewed the code and it looks OK, I agree it can be merged. No conflicts with our build [docs](d216d714aa/doc/build-osx.md (descriptor-wallet-support)).

Tree-SHA512: 1bb4b44385b11fa9fe66edd7449278f9e47a6cc679b7111f9adf17db94c34e29c9cceafc917454e134420db40b24b56da29226af6f43e6dbeff822b79b77ed60
pull/25595/head
Andrew Chow 2 years ago
commit a52ff619a4
No known key found for this signature in database
GPG Key ID: 17565732E08E5E41

@ -763,10 +763,6 @@ case $host in
BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8" BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8"
fi fi
if test "$use_sqlite" != "no" && $BREW list --versions sqlite3 >/dev/null; then
export PKG_CONFIG_PATH="$($BREW --prefix sqlite3 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH"
fi
if $BREW list --versions qt@5 >/dev/null; then if $BREW list --versions qt@5 >/dev/null; then
export PKG_CONFIG_PATH="$($BREW --prefix qt@5 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH" export PKG_CONFIG_PATH="$($BREW --prefix qt@5 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH"
fi fi

Loading…
Cancel
Save