Skip to content

Commit be5ca82

Browse files
committed
doc: update NetBSD build instructions for 8.0
1 parent 6d0a147 commit be5ca82

File tree

1 file changed

+41
-11
lines changed

1 file changed

+41
-11
lines changed

doc/build-netbsd.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NetBSD build guide
22
======================
3-
(updated for NetBSD 7.0)
3+
(updated for NetBSD 8.0)
44

55
This guide describes how to build bitcoind and command-line utilities on NetBSD.
66

@@ -15,35 +15,65 @@ You will need the following modules, which can be installed via pkgsrc or pkgin:
1515
autoconf
1616
automake
1717
boost
18-
db4
1918
git
2019
gmake
2120
libevent
2221
libtool
23-
python27
24-
```
22+
pkg-config
23+
python37
2524
26-
Download the source code:
27-
```
28-
git clone https://github.com/bitcoin/bitcoin
25+
git clone https://github.com/bitcoin/bitcoin.git
2926
```
3027

3128
See [dependencies.md](dependencies.md) for a complete overview.
3229

30+
### Building BerkeleyDB
31+
32+
BerkeleyDB is only necessary for the wallet functionality. To skip this, pass
33+
`--disable-wallet` to `./configure` and skip to the next section.
34+
35+
It is recommended to use Berkeley DB 4.8. You cannot use the BerkeleyDB library
36+
from ports, for the same reason as boost above (g++/libstd++ incompatibility).
37+
If you have to build it yourself, you can use [the installation script included
38+
in contrib/](/contrib/install_db4.sh) like so:
39+
40+
```shell
41+
./contrib/install_db4.sh `pwd`
42+
```
43+
44+
from the root of the repository. Then set `BDB_PREFIX` for the next section:
45+
46+
```shell
47+
export BDB_PREFIX="$PWD/db4"
48+
```
49+
3350
### Building Bitcoin Core
3451

3552
**Important**: Use `gmake` (the non-GNU `make` will exit with an error).
3653

3754
With wallet:
3855
```
3956
./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
57+
./configure --with-gui=no CPPFLAGS="-I/usr/pkg/include" \
58+
LDFLAGS="-L/usr/pkg/lib" \
59+
BOOST_CPPFLAGS="-I/usr/pkg/include" \
60+
BOOST_LDFLAGS="-L/usr/pkg/lib" \
61+
BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \
62+
BDB_CFLAGS="-I${BDB_PREFIX}/include"
4263
```
4364

4465
Without wallet:
4566
```
4667
./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
68+
./configure --with-gui=no --disable-wallet \
69+
CPPFLAGS="-I/usr/pkg/include" \
70+
LDFLAGS="-L/usr/pkg/lib" \
71+
BOOST_CPPFLAGS="-I/usr/pkg/include" \
72+
BOOST_LDFLAGS="-L/usr/pkg/lib"
73+
```
74+
75+
Build and run the tests:
76+
```bash
77+
gmake # use -jX here for parallelism
78+
gmake check
4979
```

0 commit comments

Comments
 (0)