Compiling Binary from Source

This page describes how to compile the Exocore binary from source.

This page is only applicable for those who decided to compile the binary from source in the previous step.

If you downloaded the binary from Exocore's release page, please skip this step.

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.5 # or later version

Build and install

make install

Check the version

exocored version # reports `1.0.5`

Note: If you receive the error Caught SIGILL in blst_cgo_init, consult /bindings/go/README.md, try exporting the following environment variables in your shell and run make install again.

export CGO_CFLAGS="-O -D__BLST_PORTABLE__"
export CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__"

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.5 # 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