Skip to content

Commit 35bb381

Browse files
committed
build: Improve build instructions
- Add package instructions for Ubuntu 15.10 - Clarify BerkeleyDB/wallet situation for unix - Add basic build instructions for Windows (closes #1401)
1 parent 42f339e commit 35bb381

File tree

3 files changed

+66
-18
lines changed

3 files changed

+66
-18
lines changed

doc/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ The following are developer notes on how to build Bitcoin on your native platfor
4343

4444
- [OS X Build Notes](build-osx.md)
4545
- [Unix Build Notes](build-unix.md)
46+
- [Windows Build Notes](build-windows.md)
47+
- [OpenBSD Build Notes](build-openbsd.md)
4648
- [Gitian Building Guide](gitian-building.md)
4749

4850
Development

doc/build-unix.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
UNIX BUILD NOTES
22
====================
3-
Some notes on how to build Bitcoin in Unix.
3+
Some notes on how to build Bitcoin Core in Unix.
44

55
(for OpenBSD specific instructions, see [build-openbsd.md](build-openbsd.md))
66

@@ -61,49 +61,55 @@ Dependency Build Instructions: Ubuntu & Debian
6161
----------------------------------------------
6262
Build requirements:
6363

64-
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libevent-dev
64+
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libevent-dev
6565

66-
For Ubuntu 12.04 and later or Debian 7 and later libboost-all-dev has to be installed:
66+
On Ubuntu 15.10+ there are generic names for the individual boost development
67+
packages, so the following can be used to only install necessary parts of
68+
boost:
6769

68-
sudo apt-get install libboost-all-dev
70+
apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libboost-base-dev
6971

70-
db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin).
71-
You can add the repository using the following command:
72+
For Ubuntu before 15.10, or Debian 7 and later libboost-all-dev has to be installed:
73+
74+
sudo apt-get install libboost-all-dev
75+
76+
BerkeleyDB is required for the wallet. db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin).
77+
You can add the repository and install using the following commands:
7278

7379
sudo add-apt-repository ppa:bitcoin/bitcoin
7480
sudo apt-get update
81+
sudo apt-get install libdb4.8-dev libdb4.8++-dev
7582

76-
Ubuntu 12.04 and later have packages for libdb5.1-dev and libdb5.1++-dev,
77-
but using these will break binary wallet compatibility, and is not recommended.
83+
Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install
84+
BerkeleyDB 5.1 or later, which break binary wallet compatibility with the distributed executables which
85+
are based on BerkeleyDB 4.8. If you do not care about wallet compatibility,
86+
pass `--with-incompatible-bdb` to configure.
7887

79-
For other Debian & Ubuntu (with ppa):
80-
81-
sudo apt-get install libdb4.8-dev libdb4.8++-dev
88+
See the section "Disable-wallet mode" to build Bitcoin Core without wallet.
8289

8390
Optional:
8491

85-
sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default)
92+
sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default)
8693

8794
ZMQ dependencies:
8895

8996
sudo apt-get install libzmq3-dev (provides ZMQ API 4.x)
9097

91-
9298
Dependencies for the GUI: Ubuntu & Debian
9399
-----------------------------------------
94100

95101
If you want to build Bitcoin-Qt, make sure that the required packages for Qt development
96-
are installed. Either Qt 4 or Qt 5 are necessary to build the GUI.
102+
are installed. Either Qt 5 or Qt 4 are necessary to build the GUI.
97103
If both Qt 4 and Qt 5 are installed, Qt 4 will be used. Pass `--with-gui=qt5` to configure to choose Qt5.
98104
To build without GUI pass `--without-gui`.
99105

100-
To build with Qt 4 you need the following:
106+
To build with Qt 5 (recommended) you need the following:
101107

102-
sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler
108+
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
103109

104-
For Qt 5 you need the following:
110+
Alternatively, to build with Qt 4 you need the following:
105111

106-
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
112+
sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler
107113

108114
libqrencode (optional) can be installed with:
109115

doc/build-windows.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
WINDOWS BUILD NOTES
2+
====================
3+
4+
Some notes on how to build Bitcoin Core for Windows.
5+
6+
Most developers use cross-compilation from Ubuntu to build executables for
7+
Windows. This is also used to build the release binaries.
8+
9+
Building on Windows itself is possible (for example using msys / mingw-w64),
10+
but no one documented the steps to do this. If you are doing this, please contribute them.
11+
12+
Cross-compilation
13+
-------------------
14+
15+
These steps can be performed on, for example, an Ubuntu VM. The depends system
16+
will also work on other Linux distributions, however the commands for
17+
installing the toolchain will be different.
18+
19+
First install the toolchains:
20+
21+
sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
22+
23+
To build executables for Windows 32-bit:
24+
25+
cd depends
26+
make HOST=i686-w64-mingw32 -j4
27+
cd ..
28+
./configure --prefix=`pwd`/depends/i686-w64-mingw32
29+
make
30+
31+
To build executables for Windows 64-bit:
32+
33+
cd depends
34+
make HOST=x86_64-w64-mingw32 -j4
35+
cd ..
36+
./configure --prefix=`pwd`/depends/x86_64-w64-mingw32
37+
make
38+
39+
For further documentation on the depends system see [README.md](../depends/README.md) in the depends directory.
40+

0 commit comments

Comments
 (0)