bitcoin core UNIX BUILD NOTES
- https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md
Ubuntu & Debian
Dependency Build Instructions
$sudo apt-get install -y build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev
$sudo apt-get update
$sudo apt-get upgrade -y
install Berkeley DB
$mkdir ~/tmp
$cd ~/tmp
$wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
$tar -xzvf db-4.8.30.NC.tar.gz
$cd db-4.8.30.NC/build_unix/
$../dist/configure --enable-cxx
$make
$sudo make install
Download bitcoin core
$sudo apt-get install git -y
$sudo apt-get install gcc -y
$git clone https://github.com/bitcoin/bitcoin.git
$cd bitcoin
install Bitcoin core
./autogen.sh$./configure --enable-gprof --enable-debug --with-pic --prefix=/home/$HOSTNAME/bitcoin/db4/$./configure --enable-gprof --enable-debug --with-pic CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib"
* opt. no GUI, --without-gui
Options used to compile and link:
with wallet = yes
with gui / qt = yes
with qr = auto
with zmq = yes
with test = yes
with bench = yes
with upnp = yes
use asm = yes
sanitizers =
debug enabled = yes
gprof enabled = yes
werror = no
target os = linux
build os =
CC = gcc
CFLAGS = -g -O2
CPPFLAGS = -DDEBUG -DDEBUG_LOCKORDER -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
CXX = g++ -std=c++11
CXXFLAGS = -Og -g3 -ftrapv -Wall -Wextra -Wformat -Wvla -Wformat-security -Wredundant-decls -Wno-unused-parameter -Wno-implicit-fallthrough -pg
LDFLAGS = -pthread -no-pie -pg
ARFLAGS = cr
$make install
configure: error: libdb_cxx headers missing
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
configure: error: libevent not found.
sudo apt-get install libevent-dev
Memory Requirements
C++ compilers are memory-hungry. It is recommended to have at least 1.5 GB of memory available when compiling Bitcoin Core. On systems with less, gcc can be tuned to conserve memory with additional CXXFLAGS:
./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768"
For Ubuntu only: db4.8 packages are available here. You can add the repository and install using the following commands:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
sudo apt-get install libminiupnpc-dev
sudo apt-get install libzmq3-dev
To Build
./autogen.sh
./configure
make
sudo make install # optional
Optional dependencies:
Library |
Purpose |
Description |
miniupnpc |
UPnP Support |
Firewall-jumping support |
libdb4.8 |
Berkeley DB |
Wallet storage (only needed when wallet enabled) |
qt |
GUI |
GUI toolkit (only needed when GUI enabled) |
protobuf |
Payments in GUI |
Data interchange format used for payment protocol (only needed when GUI enabled) |
libqrencode |
QR codes in GUI |
QR codes in GUI Optional for generating QR codes (only needed when GUI enabled) |
univalue |
Utility |
JSON parsing and encoding (bundled version will be used unless --with-system-univalue passed to configur |
libzmq3 |
ZMQ notification |
Optional, allows generating ZMQ notifications (requires ZMQ version >= 4.x) |
./configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
'Part 3 > ¶ blockcahin' 카테고리의 다른 글
[ripple]sign method example (0) | 2018.10.17 |
---|---|
bitcoin OP_RETURN (0) | 2018.10.01 |