Building a wallet with legacy support fails on OpenBSD 7.4 #28963

issue davemiketony openend this issue on November 29, 2023
  1. davemiketony commented at 4:11 am on November 29, 2023: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    Building a wallet with legacy support by following the instructions located within doc/build-openbsd.md fails on OpenBSD 7.4 (the latest OpenBSD release).

    The instructions fail during the gmake step from the Legacy Wallet Support section.

    My understanding is that this project used to install BerkeleyDB support via a (now removed) installer script. The removed installer script contrib/install_db4.sh was removed in this commit. It seems the intent moving forward is to build BerkeleyDB from the depends folder - this process is currently failing - hence the creation of this issue.

    Expected behaviour

    A successful build of a wallet with legacy support is possible by strictly following the instructions found within doc/build-openbsd.md and depends/README.md.

    Steps to reproduce

     0$ pkg_add bash git gmake libevent libtool boost
     1$ pkg_add autoconf automake python
     2    17: autoconf-2.71
     3    10: automake-1.16.5
     4    4: python-3.11.5
     5$ git clone https://github.com/bitcoin/bitcoin.git
     6$ cd bitcoin
     7$ git checkout v25.1
     8$ pkg_add gtar
     9    1: gtar-1.35
    10    (per instructions on https://github.com/bitcoin/bitcoin/tree/master/depends/README.md)
    11$ gmake -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_NATPMP=1 NO_UPNP=1 NO_ZMQ=1 NO_USDT=1
    

    Relevant log output

    Failure Output

    0[REMOVED]
    1config.status: executing libtool commands
    2Building bdb...
    3[REMOVED]
    4In file included from ../dist/./../cxx/cxx_db.cpp:13:
    5./db_cxx.h:59:10: fatal error: 'iostream.h' file not found
    6#include <iostream.h>
    7         ^~~~~~~~~~~~
    81 error generated.
    9[REMOVED]
    

    Installed Packages

     0$ pkg_info -m
     1autoconf-2.71       automatically configure source code on many Un*x platforms
     2automake-1.16.5     GNU Standards-compliant Makefile generator
     3bash-5.2.15         GNU Bourne Again Shell
     4boost-1.80.0p2v0    free peer-reviewed portable C++ source libraries
     5git-2.42.0          distributed version control system
     6gmake-4.4.1         GNU make
     7gtar-1.35           GNU version of the traditional tape archiver
     8libevent-2.1.12p0   event notification library
     9libtool-2.4.2p2     generic shared library support script
    10python-3.11.5       interpreted object-oriented programming language
    11quirks-6.160        exceptions to pkg_add rules and cache
    

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    v25.1

    Operating system and version

    OpenBSD 7.4 amd64

    Machine specifications

    No response

  2. maflcko added the label Build system on Nov 29, 2023
  3. maflcko added the label Questions and Help on Nov 29, 2023
  4. maflcko added the label Wallet on Nov 29, 2023
  5. maflcko commented at 6:29 pm on November 30, 2023: member
    I don’t have OpenBSD, so I can’t help here. However, it may be possible to undo the commit that removed install_db4.sh, or otherwise restore the script and use it (at your own risk). Longer term, it is recommend to move toward sqlite descriptor wallets.
  6. fanquake commented at 10:09 pm on November 30, 2023: member

    In file included from ../dist/./../cxx/cxx_db.cpp:13: ./db_cxx.h:59:10: fatal error: ‘iostream.h’ file not found

    The issue is some code like this in bdb:

    0#ifdef HAVE_CXX_STDHEADERS
    1#include <iostream>
    2#include <exception>
    3#define	__DB_STD(x)	std::x
    4#else
    5#include <iostream.h>
    6#include <exception.h>
    7#define	__DB_STD(x)	x
    8#endif
    

    For some reason, configure fails to detect C++ header availability, and HAVE_CXX_STDHEADERS is not defined. Is g++ and a C++ standard library definitely available, which version?

    Are you able to post the output of config.log from the bdb build in depends? That should show why the configure check fails to detect the c++ headers. You can get that output using:

    0gmake -C depends bdb_configured
    1cat depends/work/build/your-build-triplet/bdb/4.8.30-somehash/build_unix/config.log
    
  7. theStack referenced this in commit 0fbf051fec on Feb 18, 2024
  8. fanquake closed this on Feb 26, 2024

  9. fanquake referenced this in commit ac19235818 on Feb 26, 2024

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-06-29 07:13 UTC

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