Build with BerkeleyDB >= 4.6 #14360

pull sizeofvoid wants to merge 1 commits into bitcoin:master from sizeofvoid:master changing 2 files +7 −3
  1. sizeofvoid commented at 12:16 PM on October 1, 2018: contributor

    Merge OpenBSD patches1 to unbreak build on OpenBSD and systems with BerkeleyDB >= 4.6. Original patches from me, bitcoin openbsd ports maintainer.

  2. Build with BerkeleyDB >= 4.6 26de07767a
  3. fanquake added the label Wallet on Oct 1, 2018
  4. fanquake added the label Build system on Oct 1, 2018
  5. in build-aux/m4/bitcoin_find_bdb48.m4:26 in 26de07767a
      21 | @@ -22,7 +22,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
      22 |        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
      23 |          #include <${searchpath}db_cxx.h>
      24 |        ]],[[
      25 | -        #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4)
      26 | +        #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 6) || DB_VERSION_MAJOR > 4)
      27 |            #error "failed to find bdb 4.8+"
    


    practicalswift commented at 12:22 PM on October 1, 2018:

    "4.8+" should be "4.6+" here? :-)

  6. in build-aux/m4/bitcoin_find_bdb48.m4:39 in 26de07767a
      34 | @@ -35,7 +35,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
      35 |        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
      36 |          #include <${searchpath}db_cxx.h>
      37 |        ]],[[
      38 | -        #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8)
      39 | +        #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 6)
      40 |            #error "failed to find bdb 4.8"
    


    practicalswift commented at 12:22 PM on October 1, 2018:

    "4.8" should be "4.6" here? :-)


    promag commented at 5:26 PM on October 1, 2018:

    And the file should be renamed..

  7. in src/wallet/db.cpp:159 in 26de07767a
     155 | @@ -156,7 +156,9 @@ bool BerkeleyEnvironment::Open(bool retry)
     156 |      dbenv->set_errfile(fsbridge::fopen(pathErrorFile, "a")); /// debug
     157 |      dbenv->set_flags(DB_AUTO_COMMIT, 1);
     158 |      dbenv->set_flags(DB_TXN_WRITE_NOSYNC, 1);
     159 | +#if DB_VERSION_MINOR > 7
    


    practicalswift commented at 12:23 PM on October 1, 2018:

    Should check also for the relevant DB_VERSION_MAJOR number?


    promag commented at 5:34 PM on October 1, 2018:

    It shouldn't be possible to build with anything other than 4.8, except through --with-incompatible-bdb

    Is this required to build with < 4.8?

  8. in src/wallet/db.cpp:218 in 26de07767a
     214 | @@ -213,7 +215,9 @@ void BerkeleyEnvironment::MakeMock()
     215 |      dbenv->set_lk_max_locks(10000);
     216 |      dbenv->set_lk_max_objects(10000);
     217 |      dbenv->set_flags(DB_AUTO_COMMIT, 1);
     218 | +#if DB_VERSION_MINOR > 7
    


    practicalswift commented at 12:23 PM on October 1, 2018:

    Should check also for the relevant DB_VERSION_MAJOR number?


    sizeofvoid commented at 12:36 PM on October 1, 2018:

    Yes, also a good idea!

  9. practicalswift commented at 12:30 PM on October 1, 2018: contributor

    @sizeofvoid --with-incompatible-bdb will still be required to build with a bdb version other than 4.8, right?

  10. achow101 commented at 3:46 PM on October 1, 2018: member

    Tend to NACK. We only officially support BDB 4.8 and make no guarantee to support any other version. I don't see why it is necessary to support an even older version of BDB.

  11. Cobra-Bitcoin commented at 4:54 PM on October 1, 2018: none

    NACK as is. It shouldn't be possible to build with anything other than 4.8, except through --with-incompatible-bdb.

  12. in src/wallet/db.cpp:1 in 26de07767a
       0 | @@ -1,4 +1,4 @@
       1 | -// Copyright (c) 2009-2010 Satoshi Nakamoto
       2 | +
    


    promag commented at 5:30 PM on October 1, 2018:

    Why this change?


    sizeofvoid commented at 8:04 PM on October 1, 2018:

    Of course it shouldn't be.

  13. sizeofvoid commented at 8:02 PM on October 1, 2018: contributor

    @sizeofvoid --with-incompatible-bdb will still be required to build with a bdb version other than 4.8, right?

    On OpenBSD 6.3 and upcoming 6.4 with db-4.6.21 it fails also with --with-incompatible-bdb:

    checking for Berkeley DB C++ headers... no
    configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)                                   
    *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2693 'do-configure')
    *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2713 '/usr/ports/pobj/bitcoin-0.17.0/.configure_done')                                                                             
    *** Error 1 in /usr/ports/net/bitcoin (/usr/ports/infrastructure/mk/bsd.port.mk:2419 'configure') 
    
  14. fanquake commented at 11:15 PM on October 1, 2018: member

    Agree with the other comments, we shouldn't be making code-changes to allow for building with < 4.8. We also already provide a db4 install script, which is the way we recommended installing BerkeleyDB in the OpenBSD docs.

  15. promag commented at 9:22 AM on October 2, 2018: member

    NACK, as stated above, only supported version is 4.8 and this should be closed.

  16. practicalswift commented at 9:46 AM on October 2, 2018: contributor

    @sizeofvoid It seems like the consensus is NACK. Does keeping this patch (perhaps with the suggested changes incorporated) in the ports system cause any trouble for the OpenBSD project? :-)

  17. fanquake closed this on Oct 2, 2018

  18. sizeofvoid commented at 11:24 AM on October 2, 2018: contributor

    @sizeofvoid It seems like the consensus is NACK. Does keeping this patch (perhaps with the suggested changes incorporated) in the ports system cause any trouble for the OpenBSD project? :-)

    No, it doesn't.

  19. DrahtBot locked this on Sep 8, 2021

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: 2026-04-15 06:15 UTC

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