Skip to content

Commit 7cf1aea

Browse files
committed
Merge #12294: [Docs] Create NetBSD build instructions and fix compilation
11c5827 [build] Add NETBSD leveldb target to configure.ac (fanquake) 1944fa3 [doc] Create build-netbsd.md (Randolf Richardson) 336685e [build] Add db4_cxx to bitcoin_find_bdb48.m4 (Randolf Richardson) Pull request description: Replaces #12125. Tree-SHA512: 411d082ffff7198bcc1b2b6fcdf86c378baf228d8f4fee0e6c9f0688efe9c6b6dcfd5c1ab9c1dfd0c4637723b8584dbbb614634ace0e1a417b59e88a6c736dc0
2 parents 9d9c418 + 11c5827 commit 7cf1aea

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

build-aux/m4/bitcoin_find_bdb48.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
6464
6565
if test "x$BDB_LIBS" = "x"; then
6666
# TODO: Ideally this could find the library version and make sure it matches the headers being used
67-
for searchlib in db_cxx-4.8 db_cxx; do
67+
for searchlib in db_cxx-4.8 db_cxx db4_cxx; do
6868
AC_CHECK_LIB([$searchlib],[main],[
6969
BDB_LIBS="-l${searchlib}"
7070
break

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ case $host in
449449
*openbsd*)
450450
LEVELDB_TARGET_FLAGS="-DOS_OPENBSD"
451451
;;
452+
*netbsd*)
453+
LEVELDB_TARGET_FLAGS="-DOS_NETBSD"
454+
;;
452455
*)
453456
OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'`
454457
AC_MSG_WARN([Guessing LevelDB OS as OS_${OTHER_OS}, please check whether this is correct, if not add an entry to configure.ac.])

doc/build-netbsd.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
NetBSD build guide
2+
======================
3+
(updated for NetBSD 7.0)
4+
5+
This guide describes how to build bitcoind and command-line utilities on NetBSD.
6+
7+
This guide does not contain instructions for building the GUI.
8+
9+
Preparation
10+
-------------
11+
12+
You will need the following modules, which can be installed via pkgsrc or pkgin:
13+
14+
```
15+
autoconf
16+
automake
17+
boost
18+
db4
19+
git
20+
gmake
21+
libevent
22+
libtool
23+
python27
24+
```
25+
26+
Download the source code:
27+
```
28+
git clone https://github.com/bitcoin/bitcoin
29+
```
30+
31+
See [dependencies.md](dependencies.md) for a complete overview.
32+
33+
### Building Bitcoin Core
34+
35+
**Important**: Use `gmake` (the non-GNU `make` will exit with an error).
36+
37+
With wallet:
38+
```
39+
./autogen.sh
40+
./configure CPPFLAGS="-I/usr/pkg/include" LDFLAGS="-L/usr/pkg/lib" BOOST_CPPFLAGS="-I/usr/pkg/include" BOOST_LDFLAGS="-L/usr/pkg/lib"
41+
gmake
42+
```
43+
44+
Without wallet:
45+
```
46+
./autogen.sh
47+
./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"
48+
gmake
49+
```

0 commit comments

Comments
 (0)