Compiling Binary from Source
This page describes how to compile the Imuachain 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 Imua'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
Compiling
Download the source
git clone https://github.com/imua-xyz/imuachain.git
cd imuachain
git checkout v1.1.1 # or later version
Build and install
make install
Check the version
imuad version # reports `1.1.1`
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/imua-xyz/imuachain.git
git checkout v1.1.1 # 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