From 336685e17ec774348ece079fbbd9ea91d8927b2a Mon Sep 17 00:00:00 2001 From: Randolf Richardson Date: Mon, 8 Jan 2018 01:49:42 -0800 Subject: [PATCH 1/3] [build] Add db4_cxx to bitcoin_find_bdb48.m4 Added "db4_cxx" as this is the name used in NetBSD for the Berkeley DB library. Without this additional base filename alternative, the "configure" script will fail to find this library and compilation will not succeed. --- build-aux/m4/bitcoin_find_bdb48.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/bitcoin_find_bdb48.m4 index b9bf7bf46e5..ea9c795daa2 100644 --- a/build-aux/m4/bitcoin_find_bdb48.m4 +++ b/build-aux/m4/bitcoin_find_bdb48.m4 @@ -64,7 +64,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[ if test "x$BDB_LIBS" = "x"; then # TODO: Ideally this could find the library version and make sure it matches the headers being used - for searchlib in db_cxx-4.8 db_cxx; do + for searchlib in db_cxx-4.8 db_cxx db4_cxx; do AC_CHECK_LIB([$searchlib],[main],[ BDB_LIBS="-l${searchlib}" break From 1944fa32053f311ca645d9cfdf543ec7000c622c Mon Sep 17 00:00:00 2001 From: Randolf Richardson Date: Mon, 8 Jan 2018 11:26:00 -0800 Subject: [PATCH 2/3] [doc] Create build-netbsd.md --- doc/build-netbsd.md | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 doc/build-netbsd.md diff --git a/doc/build-netbsd.md b/doc/build-netbsd.md new file mode 100644 index 00000000000..5bf2d6b59b8 --- /dev/null +++ b/doc/build-netbsd.md @@ -0,0 +1,49 @@ +NetBSD build guide +====================== +(updated for NetBSD 7.0) + +This guide describes how to build bitcoind and command-line utilities on NetBSD. + +This guide does not contain instructions for building the GUI. + +Preparation +------------- + +You will need the following modules, which can be installed via pkgsrc or pkgin: + +``` +autoconf +automake +boost +db4 +git +gmake +libevent +libtool +python27 +``` + +Download the source code: +``` +git clone https://github.com/bitcoin/bitcoin +``` + +See [dependencies.md](dependencies.md) for a complete overview. + +### Building Bitcoin Core + +**Important**: Use `gmake` (the non-GNU `make` will exit with an error). + +With wallet: +``` +./autogen.sh +./configure CPPFLAGS="-I/usr/pkg/include" LDFLAGS="-L/usr/pkg/lib" BOOST_CPPFLAGS="-I/usr/pkg/include" BOOST_LDFLAGS="-L/usr/pkg/lib" +gmake +``` + +Without wallet: +``` +./autogen.sh +./configure --disable-wallet CPPFLAGS="-I/usr/pkg/include" LDFLAGS="-L/usr/pkg/lib" BOOST_CPPFLAGS="-I/usr/pkg/include" BOOST_LDFLAGS="-L/usr/pkg/lib" +gmake +``` From 11c5827ca7dd1c9cbfd1fcc3215977ad7550cb73 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 30 Jan 2018 07:48:30 +0800 Subject: [PATCH 3/3] [build] Add NETBSD leveldb target to configure.ac --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 256aed40b29..8e779f32257 100644 --- a/configure.ac +++ b/configure.ac @@ -449,6 +449,9 @@ case $host in *openbsd*) LEVELDB_TARGET_FLAGS="-DOS_OPENBSD" ;; + *netbsd*) + LEVELDB_TARGET_FLAGS="-DOS_NETBSD" + ;; *) OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'` AC_MSG_WARN([Guessing LevelDB OS as OS_${OTHER_OS}, please check whether this is correct, if not add an entry to configure.ac.])