VIZ Ledger uses a CMake-based build system with dedicated build scripts for each platform. The two-script Linux process (install-deps-linux.sh + build-linux.sh) separates dependency installation (needs root) from the actual build (runs as a regular user).
| Component | Version |
|---|---|
| CMake | 3.16+ |
| GCC | 4.8+ |
| Clang | 3.3+ |
| Boost | 1.83–1.9x (with coroutine component) |
| OpenSSL | Any recent version |
The official Docker images build against Boost 1.91; stock Ubuntu 24.04's Boost 1.83 is also supported and covered by CI. Switching an existing node between the two requires a replay — see Upgrading to a Boost 1.9x build.
git clone --recursive https://github.com/VIZ-Blockchain/viz-cpp-node
cd viz-cpp-nodechmod +x install-deps-linux.sh
sudo ./install-deps-linux.shInstalls: cmake, gcc/g++, git, boost (all components including coroutine/context), openssl, readline, ccache, and compression libraries.
chmod +x build-linux.sh
./build-linux.shOutput binary: build/programs/vizd/vizd
# Testnet build
./build-linux.sh -n
# Debug build
./build-linux.sh -t Debug
# Parallel jobs
./build-linux.sh -j 8
# Custom Boost / OpenSSL paths
./build-linux.sh --boost-root /opt/boost_1_74_0 --openssl-root /opt/opensslchmod +x build-mac.sh
./build-mac.shThe script installs Xcode Command Line Tools (if needed) and Homebrew dependencies automatically, then configures and builds.
# With custom Boost path
./build-mac.sh --boost-root /opt/homebrew/opt/boost
# Skip dependency installation
./build-mac.sh --skip-depsset BOOST_ROOT=C:\Boost
set OPENSSL_ROOT_DIR=C:\OpenSSL-Win64
build-mingw.batOptional environment variables:
| Variable | Default | Description |
|---|---|---|
VIZ_BUILD_TYPE |
Release |
Release or Debug |
VIZ_BUILD_TESTNET |
OFF |
ON for testnet build |
VIZ_FULL_STATIC |
OFF |
ON for fully static binary |
Requires Visual Studio 2019+ with "Desktop development with C++" workload:
set BOOST_ROOT=C:\Boost
set OPENSSL_ROOT_DIR=C:\OpenSSL-Win64
build-msvc.batFor direct CMake usage (advanced):
| Option | Default | Description |
|---|---|---|
BUILD_TESTNET |
OFF |
Enable testnet-specific code |
CHAINBASE_CHECK_LOCKING |
OFF |
Enable lock assertion checks (debug) |
BUILD_SHARED_LIBRARIES |
OFF |
Build shared libraries |
USE_PCH |
OFF |
Enable precompiled headers (faster rebuilds) |
Example:
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
..
make -j$(nproc)Or use the helper:
python3 programs/build_helpers/configure_build.py --release| Target | Binary | Description |
|---|---|---|
vizd |
programs/vizd/vizd |
Main node daemon |
cli_wallet |
programs/cli_wallet/cli_wallet |
Command-line wallet |
The repository ships four Dockerfiles:
| File | Purpose |
|---|---|
Dockerfile-production |
Full mainnet node (Release) |
Dockerfile-testnet |
Testnet node (BUILD_TESTNET=ON) |
Build example:
docker build -f share/vizd/docker/Dockerfile-production -t vizd:local .See Docker for full production Docker setup.
| Problem | Solution |
|---|---|
boost/coroutine.hpp not found |
Install libboost-coroutine-dev (Ubuntu) or Boost 1.71+ |
| CMake < 3.16 | Install newer CMake from cmake.org or Kitware PPA |
do not run as root error |
Run build-linux.sh as a normal user, not sudo |
| Link error on macOS (OpenSSL) | export OPENSSL_ROOT_DIR=$(brew --prefix openssl) |
| Out of memory during compilation | Use -j 2 to reduce parallel jobs |