1
1
NetBSD build guide
2
2
======================
3
- (updated for NetBSD 7 .0)
3
+ (updated for NetBSD 8 .0)
4
4
5
5
This guide describes how to build bitcoind and command-line utilities on NetBSD.
6
6
@@ -15,35 +15,65 @@ You will need the following modules, which can be installed via pkgsrc or pkgin:
15
15
autoconf
16
16
automake
17
17
boost
18
- db4
19
18
git
20
19
gmake
21
20
libevent
22
21
libtool
23
- python27
24
- ```
22
+ pkg-config
23
+ python37
25
24
26
- Download the source code:
27
- ```
28
- git clone https://github.com/bitcoin/bitcoin
25
+ git clone https://github.com/bitcoin/bitcoin.git
29
26
```
30
27
31
28
See [ dependencies.md] ( dependencies.md ) for a complete overview.
32
29
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
+
33
50
### Building Bitcoin Core
34
51
35
52
** Important** : Use ` gmake ` (the non-GNU ` make ` will exit with an error).
36
53
37
54
With wallet:
38
55
```
39
56
./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"
42
63
```
43
64
44
65
Without wallet:
45
66
```
46
67
./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
49
79
```
0 commit comments