gui: Enable console line edit on setClientModel
[novacoin.git] / doc / build-unix.txt
1 Copyright (c) 2009-2012 Bitcoin Developers
2 Copyright (c) 2013 NovaCoin Developers
3 Distributed under the MIT/X11 software license, see the accompanying
4 file license.txt or http://www.opensource.org/licenses/mit-license.php.
5 This product includes software developed by the OpenSSL Project for use in
6 the OpenSSL Toolkit (http://www.openssl.org/).  This product includes
7 cryptographic software written by Eric Young (eay@cryptsoft.com).
8
9
10 UNIX BUILD NOTES
11 ================
12
13 To Build
14 --------
15
16 cd src/
17 make -f makefile.unix            # Headless novacoin
18
19 See readme-qt.rst for instructions on building NovaCoin QT,
20 the graphical novacoin.
21
22 Dependencies
23 ------------
24
25  Library     Purpose           Description
26  -------     -------           -----------
27  libssl      SSL Support       Secure communications
28  libdb4.8    Berkeley DB       Blockchain & wallet storage
29  libboost    Boost             C++ Library
30  libqrencode QRCode generation Optional QRCode generation
31
32 Note that libexecinfo should be installed, if you building under *BSD systems. 
33 This library provides backtrace facility.
34
35 libqrencode is used for QRCode image generation. It can be downloaded
36 from http://fukuchi.org/works/qrencode/index.html.en, or installed via
37 your package manager.
38
39 Licenses of statically linked libraries:
40  Berkeley DB   New BSD license with additional requirement that linked
41                software must be free open source
42  Boost         MIT-like license
43
44 Versions used in this release:
45  GCC           4.3.3
46  OpenSSL       0.9.8g
47  Berkeley DB   4.8.30.NC
48  Boost         1.37
49
50 Dependency Build Instructions: Ubuntu & Debian
51 ----------------------------------------------
52 sudo apt-get install build-essential
53 sudo apt-get install libssl-dev
54 sudo apt-get install libdb4.8-dev
55 sudo apt-get install libdb4.8++-dev
56  Boost 1.40+: sudo apt-get install libboost-all-dev
57  or Boost 1.37: sudo apt-get install libboost1.37-dev
58 sudo apt-get install libqrencode-dev
59
60 If using Boost 1.37, append -mt to the boost libraries in the makefile.
61
62
63 Dependency Build Instructions: Gentoo
64 -------------------------------------
65
66 Note: If you just want to install novacoind on Gentoo, you can add the Novacoin
67       overlay and use your package manager:
68           layman -a novacoin && emerge novacoind
69
70 emerge -av1 --noreplace boost glib openssl sys-libs/db:4.8
71
72 Take the following steps to build:
73  cd ${NOVACOIN_DIR}/src
74  make -f makefile.unix BDB_INCLUDE_PATH='/usr/include/db4.8'
75  strip novacoind
76
77
78 Notes
79 -----
80 The release is built with GCC and then "strip novacoind" to strip the debug
81 symbols, which reduces the executable size by about 90%.
82
83 Berkeley DB
84 -----------
85 You need Berkeley DB 4.8.  If you have to build Berkeley DB yourself:
86 ../dist/configure --enable-cxx
87 make
88
89
90 Boost
91 -----
92 If you need to build Boost yourself:
93 sudo su
94 ./bootstrap.sh
95 ./bjam install
96
97
98 Security
99 --------
100 To help make your novacoin installation more secure by making certain attacks impossible to
101 exploit even if a vulnerability is found, you can take the following measures:
102
103 * Position Independent Executable
104     Build position independent code to take advantage of Address Space Layout Randomization
105     offered by some kernels. An attacker who is able to cause execution of code at an arbitrary
106     memory location is thwarted if he doesn't know where anything useful is located.
107     The stack and heap are randomly located by default but this allows the code section to be
108     randomly located as well.
109
110     On an Amd64 processor where a library was not compiled with -fPIC, this will cause an error
111     such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;"
112
113     To build with PIE, use:
114     make -f makefile.unix ... -e PIE=1
115
116     To test that you have built PIE executable, install scanelf, part of paxutils, and use:
117     scanelf -e ./novacoin
118
119     The output should contain:
120      TYPE
121     ET_DYN
122
123 * Non-executable Stack
124     If the stack is executable then trivial stack based buffer overflow exploits are possible if
125     vulnerable buffers are found. By default, novacoin should be built with a non-executable stack
126     but if one of the libraries it uses asks for an executable stack or someone makes a mistake
127     and uses a compiler extension which requires an executable stack, it will silently build an
128     executable without the non-executable stack protection.
129
130     To verify that the stack is non-executable after compiling use:
131     scanelf -e ./novacoin
132
133     the output should contain:
134     STK/REL/PTL
135     RW- R-- RW-
136
137     The STK RW- means that the stack is readable and writeable but not executable.