Dependencies

Basic tools via system installation

We provide instructions for two operating systems: Ubuntu and MacOS.

Ubuntu 18.04

  1. Install some basics build tools

     sudo apt-get install autoconf libtool pkg-config
  2. Install gcc-8

     sudo apt-get install gcc-8 g++-8

    Update alternatives

     sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100
     sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100
  3. Install clang-9

    Add repository. If you have a different version of Ubuntu other than 18.04, see https://apt.llvm.org for corresponding repos.

    wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
    sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
    sudo apt-get update 
    sudo apt-get install clang-9

    Update alternatives

    sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 100
    sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 100
  4. (Optional) for libsecp256k1

     sudo apt-get install libgmp-dev

Mac OS X 10.15

  1. XCode11

    Mac provides its own C/C++ compiler and lib via XCode, Apple clang version 11.0.0 (clang-1100.0.33.8). Mac OS X must upgrade to 10.15.

  2. Brew

  3. Some configure/make tools

  4. (Optional) for libsecp256k1

Dependencies installation from source

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:

Linux:

OpenSSL

Mac:

Linux:

This is required by libevent and secp256k1.

Protocol Buffers

Mac:

Linux:

If "make check" fails, you can still install, but it is likely that some features of this library will not work correctly on your system. Proceed at your own risk. https://github.com/protocolbuffers/protobuf/blob/master/src/README.md

gRPC

Mac:

Linux:

The above instruction is from https://github.com/grpc/grpc/blob/master/BUILDING.md.

RocksDB

Mac:

Linux:

libevent

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

Secp256k1

Last updated

Was this helpful?