Welcome

   Introduction

   Lantah Software Stack

   Operations List

Tutorials

   Create an Account

   Send/Receive

   Follow Received Payments

   Handling Errors

   Securing Web Projects

Run a Node
   Overview

   Prerequisites

   Installing

   Configuring

   Publishing Archives

   Running

   Monitoring

   Commands

   Upgrading

   Tier 1 Organizations

Run an API Server

   Overview

   Prerequisites

   Installing

   Configuring

   Remote Captive Core

   Running

   Ingestion

   Monitoring

   Scaling

Software/SDKs

   Software and SDKs

Glossary

   Glossary

Installing from source

Picking a version to run

Best is to use the latest stable release that can be downloaded from https://github.com/lantah/gramr/releases

Alternatively, branches are organized in the following way:

For convenience, we also keep a record in the form of release tags of the versions that make it to production:

  • pre-releases are versions that get deployed to testnet

  • releases are versions that made it all the way to production

Containerized dev environment

We maintain a pre-configured Docker configuration ready for development with VSCode.

See the dev container's README for more detail.

Runtime dependencies

GramR does not have many dependencies.

If GramR was configured (see below) to work with Postgresql, a local Postgresql server will need to be deployed to the same host.

To install Postgresql, follow instructions from the Postgresql download page.

Build Dependencies

  • c++ toolchain and headers that supports c++17

    • clang >= 10.0

    • g++ >= 8.0

  • pkg-config

  • bison and flex

  • libpq-dev unless you ./configure --disable-postgres in the build step below.

  • 64-bit system

  • clang-format-10 (for make format to work)

  • perl

  • libunwind-dev

Ubuntu 18.04

You can install the test toolchain to build and run GramR with the latest version of the llvm toolchain.

Alternatively, if you want to just depend on stock Ubuntu, you will have to build with clang and have use libc++ instead of libstdc++ when compiling.

Ubuntu 18.04 has clang-10 available, that you can install with

After installing packages, head to building with clang and libc++.

Adding the test toolchain (optional)

Installing packages

In order to make changes, you'll need to install the proper version of clang-format.

In order to install the llvm (clang) toolchain, you may have to follow instructions on https://apt.llvm.org/

OS X

When building on OSX, here's some dependencies you'll need:

  • Install xcode

  • Install homebrew

  • brew install libsodium

  • brew install libtool

  • brew install autoconf

  • brew install automake

  • brew install pkg-config

  • brew install libpq (required for postgres)

  • brew install openssl (required for postgres)

  • brew install parallel (required for running tests)

  • brew install ccache (required for enabling ccache)

You'll also need to configure pkg-config by adding the following to your shell (.zshenv or .zshrc):

Windows

See INSTALL-Windows.md

Basic Installation

  • git clone https://github.com/lantah/gramr.git

  • cd gramr

  • git submodule init

  • git submodule update

  • Type ./autogen.sh.

  • Type ./configure (If configure complains about compiler versions, try CXX=clang-10 ./configure or CXX=g++-8 ./configure or similar, depending on your compiler.)

  • Type make or make -j<N> (where <N> is the number of parallel builds, a number less than the number of CPU cores available, e.g. make -j3)

  • Type make check to run tests.

  • Type make install to install.

Building with clang and libc++

On some systems, building with libc++, LLVM's version of the standard library can be done instead of libstdc++ (typically used on Linux).

NB: there are newer versions available of both clang and libc++, you will have to use the versions suited for your system.

You may need to install additional packages for this, for example, on Linux Ubuntu 18.04 LTS with clang-10:

Here are sample steps to achieve this:

Building with Tracing

Configuring with --enable-tracy will build and embed the client component of the Tracy high-resolution tracing system in the GramR binary.

The tracing client will activate automatically when GramR is running, and will listen for connections from Tracy servers (a command-line capture utility, or a cross-platform GUI).

The Tracy server components can also be compiled by configuring with --enable-tracy-gui or --enable-tracy-capture.

The GUI depends on the capstone, freetype and glfw libraries and their headers, and on linux or BSD the GTK-2.0 libraries and headers. On Windows and MacOS, native toolkits are used instead.