Compiling Binary from Source

Instructions to compile from source

Prerequisites

To compile the binary, begin by acquiring the build tools meta package (containing make, gcc, g++ and other tools) for your choice of Linux distribution.

Ubuntu

apt update
apt install -y build-essential

Amazon Linux / CentOS

yum update
yum groupinstall -y "Development Tools"

In addition, you will need to install go. The version used is 1.22.12, and it can be downloaded and installed based on the instructions here.

# clear previous installations
rm -rf /usr/local/go
# download
tar -C /usr/local -xzf go1.22.12.linux-amd64.tar.gz
# set PATH to use `go` instead of `/usr/local/go/bin/go`
export PATH=$PATH:/usr/local/go/bin
# check value
go version # reports `go version go1.21.12 linux/amd64` or similar

If you get a permissions-related issue, try to prefix the first two commands with sudo

Compiling

Download the source

git clone https://github.com/ExocoreNetwork/exocore.git
cd exocore
git checkout v1.0.3 # or later version

Build and install

make install

Check the version

exocored version # reports `1.0.3`

Using Docker to compile

You can use containerization to avoid installing any dependencies on your system, if you already have docker installed.

git clone https://github.com/ExocoreNetwork/exocore.git
git checkout v1.0.3 # or later version
make release-dry-run

The release binary is available in dist/*/bin folder for each architecture and can be moved to $PATH.

Last updated