c8ntinuum builds the ctmd node binary from source. Use this page when you need a local developer build, an installed binary, or a self-contained distribution bundle. For local chain startup after the binary is built, see Local Development.

What gets built

The top-level Makefile builds ctmd from evmd/cmd/evmd. Builds use CGO and first build the Rust SP1 verifier dynamic library from rust/sp1verifier. The usual developer targets are:
make doctor
make build
make install
make build creates a development binary under build/. make install installs the binary into BINDIR, which defaults to $(go env GOPATH)/bin or $HOME/go/bin if GOPATH is not available.

Prerequisites

  • Go matching go.mod and evmd/go.mod, currently 1.25.0
  • make
  • Rust and Cargo for rust/sp1verifier
  • A working C toolchain for CGO builds
  • macOS dynamic-library tooling: otool and install_name_tool
  • Linux dynamic-library tooling: ldd; patchelf is recommended
Ledger support is enabled by default and requires gcc. To build without ledger support:
LEDGER_ENABLED=false make build
RocksDB support is enabled by default. If RocksDB is not detected, the build falls back to goleveldb unless ROCKSDB_REQUIRED=true is set.

macOS setup

Install the Xcode Command Line Tools:
xcode-select --install
For a local RocksDB-backed build, install RocksDB and companion libraries with Homebrew:
brew install rocksdb snappy zstd lz4 bzip2 zlib gflags
The build system uses Homebrew prefixes when available and uses install_name_tool to fix local dynamic-library paths.

Linux setup

Install the core build tools and dynamic-library helpers:
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
  build-essential \
  pkg-config \
  patchelf \
  curl \
  ca-certificates \
  libsnappy-dev \
  zlib1g-dev \
  libbz2-dev \
  liblz4-dev \
  libzstd-dev \
  libgflags-dev \
  libnuma-dev
If your distribution ships an appropriate RocksDB development package, install it. Otherwise, build RocksDB from source and set ROCKSDB_PREFIX, ROCKSDB_INCLUDE_DIR, or ROCKSDB_LIB_DIR so the Makefile can find it.

Build commands

Check the local environment:
make doctor
Build a development binary:
make build
Install the binary:
make install
Install into a custom directory:
BINDIR=/path/to/bin make install
Create a self-contained distribution bundle under build/dist:
make dist
make verify-dist
Useful build overrides:
ROCKSDB_ENABLED=false make build
ROCKSDB_REQUIRED=true make build
RUST_SP1_PROFILE=dev make build
RUSTUP_TOOLCHAIN=<toolchain> make build

Outputs

make build writes:
build/ctmd
build/libsp1verifier.dylib   # macOS
build/libsp1verifier.so      # Linux
make install writes:
$BINDIR/ctmd
$BINDIR/Frameworks/libsp1verifier.dylib   # macOS
$BINDIR/lib/libsp1verifier.so             # Linux
make dist writes:
build/dist/bin/ctmd
build/dist/lib/libsp1verifier.*
When RocksDB is enabled, install and dist targets also bundle the required RocksDB dynamic libraries that the build system can detect.

Verify the binary

For a development build:
./build/ctmd version
For an installed build:
ctmd version
If ctmd is not found after make install, confirm that BINDIR is on your PATH:
export PATH="$(go env GOPATH)/bin:$PATH"

Troubleshooting

IssueFix
cargo not foundInstall Rust and Cargo, then rerun make doctor.
gcc not installed for ledger supportInstall a C toolchain or build with LEDGER_ENABLED=false make build.
RocksDB is missingLet the build fall back to goleveldb, set ROCKSDB_REQUIRED=true to fail fast, or set ROCKSDB_PREFIX=/path/to/rocksdb.
patchelf is missing on LinuxInstall patchelf; development builds can still run with LD_LIBRARY_PATH=build ./build/ctmd version.
ctmd is not on PATHUse the full binary path or install with BINDIR="$HOME/.local/bin" make install.