build: fix configuring when building depends with NO_BDB=1 #21629

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:fixup_depends_sqlite_only_build changing 3 files +16 −2
  1. fanquake commented at 8:47 am on April 7, 2021: member

    Currently, if you build depends using NO_BDB=1 (only sqlite wallets), ./configure will fail as it still tries to find bdb. i.e:

    0make -C depends/ NO_QT=1 NO_BDB=1 NO_UPNP=1 NO_ZMQ=1 NO_NATPMP=1 -j8
    1...
    2copying packages: native_b2 boost libevent sqlite
    3
    4./autogen.sh
    5./configure --prefix=/home/ubuntu/bitcoin/depends/x86_64-pc-linux-gnu
    6...
    7checking for Berkeley DB C++ headers... default
    8configure: error: Found Berkeley DB other than 4.8, required for portable BDB wallets (--with-incompatible-bdb to ignore or --without-bdb to disable BDB wallet support)
    

    This PR fixes the build such that you can build depends, opting out of bdb, without opting out of wallets entirely, and still configure successfully. I think I’ve tested across most potential configurations. i.e:

     0 ./configure (bdb and sqlite on system)
     1	bdb & sqlite are both are available
     2	
     3./configure --without-bdb  (bdb and sqlite on system)
     4	only sqlite
     5
     6./configure --without-sqlite  (bdb and sqlite on system)
     7	only bdb
     8
     9./configure --disable-wallet  (bdb and sqlite on system)
    10	neither bdb or sqlite
    11
    12depends NO_WALLET=1
    13./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0
    14	neither bdb or sqlite
    15
    16depends NO_BDB=1
    17./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0
    18	only sqlite
    19
    20depends NO_SQLITE=1
    21./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0
    22	only bdb
    23
    24depends
    25./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0
    26	bdb and sqlite
    
  2. fanquake added the label Build system on Apr 7, 2021
  3. MarcoFalke added the label Needs Guix build on Apr 7, 2021
  4. build: fix configuring when building depends with NO_BDB=1
    Currently, if you build depends using `NO_BDB=1` (only sqlite wallets),
    ./configure will fail as it still tries to find bdb. i.e:
    ```bash
    checking for Berkeley DB C++ headers... default
    configure: error: Found Berkeley DB other than 4.8, required for portable BDB wallets (--with-incompatible-bdb to ignore or --without-bdb to disable BDB wallet support)
    ```
    
    This PR fixes the build such that you can build depends, opting out of
    bdb without opting out of wallets entirely, and still configure
    successfully.
    a5491882a0
  5. fanquake force-pushed on Apr 7, 2021
  6. laanwj requested review from theuni on Apr 7, 2021
  7. laanwj requested review from dongcarl on Apr 7, 2021
  8. jarolrod commented at 4:42 am on April 9, 2021: member

    ACK a5491882a06d3bf7c486033037edd9c9203ecaed

    Confirming that configure will fail on looking for bdb on master after building depends with NO_BDB=1

    This PR fixes that when testing on Ubuntu and macOS

    Guix hashes:

     0$ find output -type f -name *$(git rev-parse --short HEAD)*.* -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     1
     248551f4e5fc1f71430eec5bd75a2ef3856f4fb8a3b405094642bf70727f4867d  output/aarch64-linux-gnu/bitcoin-a5491882a06d-aarch64-linux-gnu-debug.tar.gz
     3d63d5faa46594a4929c7bcb9c8f63ca292b18d843538851908c603bc8892fb45  output/aarch64-linux-gnu/bitcoin-a5491882a06d-aarch64-linux-gnu.tar.gz
     41093754e461b834de2eb97b8676ac356c8f04c41dcfd34ac24b65ab96c652791  output/arm-linux-gnueabihf/bitcoin-a5491882a06d-arm-linux-gnueabihf-debug.tar.gz
     549006a9be4a984d8117132771748c48465a3cf53ae7ac10c56b443db706f095a  output/arm-linux-gnueabihf/bitcoin-a5491882a06d-arm-linux-gnueabihf.tar.gz
     67a6f90ed8adc88775f65f88058f41a65bf35d6126acc2f32d1290aa95cea24a1  output/dist-archive/bitcoin-a5491882a06d.tar.gz
     7c4d34ce1ae3c3ce52be8a1b318caf1bf601459f93c83581f77276d86cd464e1e  output/powerpc64-linux-gnu/bitcoin-a5491882a06d-powerpc64-linux-gnu-debug.tar.gz
     88356a8e1c8b915a95344cb3549cffd611dbad378ab7134d0b755ceb2518f093b  output/powerpc64-linux-gnu/bitcoin-a5491882a06d-powerpc64-linux-gnu.tar.gz
     94fe8b1c120deae2bc1490b3195bf09f08fc7a7abde1e74248726a0a3f44b2839  output/powerpc64le-linux-gnu/bitcoin-a5491882a06d-powerpc64le-linux-gnu-debug.tar.gz
    10ef4e08d8ad3396f003dc6a0dcff4c16e696a0a19f76822e8526f1aa5e679b8e6  output/powerpc64le-linux-gnu/bitcoin-a5491882a06d-powerpc64le-linux-gnu.tar.gz
    115c45eba7a7d375f0d2d10f85988fdf0f9941ef5a20a320b4d0dd90a4c42dce69  output/riscv64-linux-gnu/bitcoin-a5491882a06d-riscv64-linux-gnu-debug.tar.gz
    1210b04528436fee2399b2fe344ee14cc5e0c9c0e1f06c490d0bf2d29d79baeaed  output/riscv64-linux-gnu/bitcoin-a5491882a06d-riscv64-linux-gnu.tar.gz
    133412cd7a1c089fbc8d7f3772befe78a7bf575a47abb5e344736e20166cf1b08a  output/x86_64-apple-darwin18/bitcoin-a5491882a06d-osx-unsigned.dmg
    143efa989c87abefa5781ad1a8d9d8b324916b7da773e60e7d9e3402f3a049f3b4  output/x86_64-apple-darwin18/bitcoin-a5491882a06d-osx-unsigned.tar.gz
    15cffa107aef47e91bec2b2ad8d7f6af56108c3edb9a3bff73c55ddc14b379c66d  output/x86_64-apple-darwin18/bitcoin-a5491882a06d-osx64.tar.gz
    16d140c9178ef46212582621afb0b188536ff71aeefc482c0fbca507bb21ddbdd6  output/x86_64-linux-gnu/bitcoin-a5491882a06d-x86_64-linux-gnu-debug.tar.gz
    17b41d6230e5018f72cecee05fba18bca8f54c2490b412ed367a2a19e044b1b98b  output/x86_64-linux-gnu/bitcoin-a5491882a06d-x86_64-linux-gnu.tar.gz
    183e8e884cd4e00910b1b40c3e1208b5caacb3f1087fe87f3a7eae3be4ed3ef86d  output/x86_64-w64-mingw32/bitcoin-a5491882a06d-win-unsigned.tar.gz
    19ace0383e8eabf3293b0255efa88c2f0819ef7f69333d113d8611a9b6fafec542  output/x86_64-w64-mingw32/bitcoin-a5491882a06d-win64-debug.zip
    20e8babfa7082101b71957cb29d479803f9867bc6cab71c11a53b9770bb6308343  output/x86_64-w64-mingw32/bitcoin-a5491882a06d-win64-setup-unsigned.exe
    216d4c409df6c270696b8b8b3ee8e792f277a137d4e1e134adc653abceb543634e  output/x86_64-w64-mingw32/bitcoin-a5491882a06d-win64.zip
    
  9. laanwj commented at 11:28 am on May 5, 2021: member
    Code review ACK a5491882a06d3bf7c486033037edd9c9203ecaed
  10. laanwj merged this on May 5, 2021
  11. laanwj closed this on May 5, 2021

  12. MarcoFalke removed the label Needs Guix build on May 5, 2021
  13. sidhujag referenced this in commit 9df20094e2 on May 5, 2021
  14. fanquake deleted the branch on May 6, 2021
  15. luke-jr commented at 0:18 am on May 14, 2021: member
    0[00:12:23] <luke-jr> fanquake: doesn't [#21629](/bitcoin-bitcoin/21629/) break using depends for most things, but using system BDB? or is that intended?
    1[00:13:06] <fanquake> what do you mean by most things
    2[00:13:11] <fanquake> how does it break them
    3[00:15:36] <luke-jr> fanquake: it forces BDB support off, no?
    4[00:15:52] <luke-jr> fanquake: eg, make depends NO_BDB=1 but with bdb4.8 on the system install
    5[00:16:09] <luke-jr> previously I assume the system BDB would have been picked up and used
    6[00:16:58] <fanquake> If that was the case then I think that was a bug, or at least not well documented that that would be the behaviour.
    7[00:17:02] <sipa> i would have assumed that a depends build never uses any system library ar all
    8[00:17:20] <fanquake> If you're building from depends you'd only want to be using the depends libraries
    9[00:17:27] <luke-jr> ok, I wasn't sure
    
  16. gwillen referenced this in commit 4c47eb18c3 on Jun 1, 2022
  17. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me