Some depencencies need to be installed from the source. The following is the detailed instruction, with slight variation depending on Linux (Ubuntu/CentOS) or Mac.
CMake
Mac:
brew install cmake
# version 3.15.4 will be installed
Linux:
git clone -b v3.15.4 --single-branch https://github.com/Kitware/CMake.git
cd CMake
./bootstrap && make -j && sudo make install
OpenSSL
Mac:
brew install openssl@1.1
# The following is needed for libevent install
export OPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1"
Linux:
git clone -b OpenSSL_1_1_1d https://github.com/openssl/openssl.git
cd openssl
./config && make -j && sudo make install
This is required by libevent and secp256k1.
Protocol Buffers
Mac:
brew install protobuf
# version 3.10.0 will be installed
Linux:
git clone -b v3.10.0 --single-branch https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh && ./configure && make -j
make check
sudo make install
sudo ldconfig # refresh shared library cache.
brew install rocksdb
# version 6.1.2 will be installed
Linux:
git clone -b v6.3.6 --single-branch https://github.com/facebook/rocksdb.git
cd rocksdb
make shared_lib -j
sudo make install
libevent
git clone -b release-2.1.11-stable --single-branch https://github.com/libevent/libevent.git
cd libevent
mkdir build && cd build
cmake ..
make -j && sudo make install
The brew-installed libevent (version 2.1.11_1) on Mac does not work smoothly for now. So please compile as instructed in the above.
Google Test
git clone -b release-1.10.0 --single-branch https://github.com/google/googletest.git
cd googletest && mkdir build && cd build
cmake ..
make -j && sudo make install
Secp256k1
git clone https://github.com/bitcoin-core/secp256k1.git
cd secp256k1
./autogen.sh && ./configure --enable-module-recovery=yes
make -j && sudo make install