Skip to main content

Compiling from Source

This guide will walk you through compiling Pastella from source code on various platforms.

Download Pre-Built Releases

If you prefer not to compile from source, pre-built binaries are available for download:

PlatformDownload Link
PastellaCore (Linux, Windows, macOS)github.com/PastellaOrg/PastellaCore/releases/latest
Mobile Wallet (Android)github.com/PastellaOrg/pastella-mobile-wallet/releases/latest

The Mobile Wallet provides an easy-to-use interface for managing your PAS coins on Android devices, with features including:

  • Send and receive PAS
  • QR code scanning for easy payments
  • Transaction history
  • Staking support
  • Address book management

Table of Contents

Quick Start

Linux (Native Build)

git clone https://github.com/PastellaOrg/PastellaCore.git
cd PastellaCore
make release

Binaries will be in build/src/


Prerequisites

Common Requirements

  • CMake 3.8 or higher
  • Make (GNU Make)
  • Git
  • C++17 compatible compiler (GCC 7.0+, Clang 6.0+)
  • Boost 1.66 or higher
  • OpenSSL

Platform-Specific

PlatformAdditional Requirements
Linuxbuild-essential, libzstd-dev
WindowsMinGW-w64, MSYS2
macOSXCode, Command Line Tools
FreeBSDclang, libc++

Linux

Ubuntu/Debian

# Install dependencies
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
git \
libboost-all-dev \
libzstd-dev \
python3

# Clone repository
git clone https://github.com/PastellaOrg/PastellaCore.git
cd PastellaCore

# Build
make release

# Run
./build/src/Pastellad --version

Arch Linux

# Install dependencies
sudo pacman -S cmake git boost python3 zstd

# Clone repository
git clone https://github.com/PastellaOrg/PastellaCore.git
cd PastellaCore

# Build
make release

# Run
./build/src/Pastellad --version

Fedora/RHEL

# Install dependencies
sudo dnf install -y \
cmake \
git \
boost-devel \
boost-static \
zlib-static \
python3

# Clone repository
git clone https://github.com/PastellaOrg/PastellaCore.git
cd PastellaCore

# Build
make release

# Run
./build/src/Pastellad --version

Static Linux Build (Fully Portable)

For a static build with all dependencies bundled:

# Build dependencies
make depends-linux

# Build static binary
make release-static-linux-x86_64

The static binary will be in build/release/x86_64-linux-gnu/src/

Linux ARM64 (Raspberry Pi, ARM servers)

For static ARM64 build:

# Build dependencies
make depends-linux-arm64

# Build static binary
make release-static-linux-arm64

The static binary will be in build/release/arm64-linux/src/


Windows

Windows builds are done via cross-compilation from Linux.

# Install MinGW-w64 on Ubuntu/Debian
sudo apt-get install -y mingw-w64

# Build dependencies
make depends-win64

# Build Windows binary
make release-static-win64

The Windows binary will be in build/release/x86_64-w64-mingw32/src/

Option 2: Using Visual Studio (Native)

  1. Install Visual Studio 2019 or later
  2. Install "Desktop development with C++" workload
  3. Install Boost (1.66 or later)
  4. Install CMake
  5. Clone repository and open Developer Command Prompt
cd PastellaCore
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 ..
  1. Open PastellaCore.sln in Visual Studio
  2. Build → Build Solution (Release configuration)

macOS

Option 1: Using Homebrew (x86_64)

# Install XCode and Command Line Tools
xcode-select --install

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install dependencies
brew install cmake boost git

# Clone repository
git clone https://github.com/PastellaOrg/PastellaCore.git
cd PastellaCore

# Build
make release

# Run
./build/src/Pastellad --version

Option 2: Static macOS Build

For a static build (more portable):

# Build dependencies
make depends-mac

# Build static binary
make release-static-mac-x86_64

macOS ARM64 (Apple Silicon M1/M2/M3)

# Build dependencies
make depends-mac-arm64

# Build static binary
make release-static-mac-arm64

FreeBSD

# Install dependencies
pkg install cmake git boost-python3 python3 zstd

# Clone repository
git clone https://github.com/PastellaOrg/PastellaCore.git
cd PastellaCore

# Build
make release

# Or for static build
make release-static-freebsd-x86_64

Build Targets

Quick Reference

TargetDescriptionCommand
releaseOptimized build with system librariesmake release
debugDebug build with symbolsmake debug
release-allRelease with all componentsmake release-all

Static Build Targets (Portable Binaries)

TargetDescriptionCommand
release-static-linux-x86_64Static Linux x86_64make depends-linux && make release-static-linux-x86_64
release-static-linux-arm64Static Linux ARM64make depends-linux-arm64 && make release-static-linux-arm64
release-static-win64Static Windows x64 (cross-compile)make depends-win64 && make release-static-win64
release-static-mac-x86_64Static macOS x86_64make depends-mac && make release-static-mac-x86_64
release-static-mac-arm64Static macOS ARM64make depends-mac-arm64 && make release-static-mac-arm64
release-static-freebsd-x86_64Static FreeBSD x86_64make depends-freebsd && make release-static-freebsd-x86_64

Dependency Management

TargetDescriptionCommand
dependsAuto-detect system and build dependenciesmake depends
depends-win64Build Windows x64 dependenciesmake depends-win64
depends-linuxBuild Linux x86_64 dependenciesmake depends-linux
depends-linux-arm64Build Linux ARM64 dependenciesmake depends-linux-arm64
depends-macBuild macOS x86_64 dependenciesmake depends-mac
depends-mac-arm64Build macOS ARM64 dependenciesmake depends-mac-arm64
depends-freebsdBuild FreeBSD x86_64 dependenciesmake depends-freebsd

Clean Targets

TargetDescriptionCommand
cleanRemove build directorymake clean
clean-allRemove all build directoriesmake clean-all
clean-dependsClean dependencies for current systemmake clean-depends
clean-depends-allClean all dependency buildsmake clean-depends-all

Troubleshooting

Build Fails with "boost not found"

Ensure Boost is installed and its path is set correctly:

# Linux
export BOOST_ROOT=/usr
cmake -DBOOST_ROOT=$BOOST_ROOT ..

Build Fails with "cmake version too old"

Install CMake 3.8+:

# Ubuntu/Debian
sudo pip3 install cmake

# Or
sudo apt-get install cmake

Windows Build: "wine not found" or "gcc not found"

Ensure MinGW-w64 is properly installed and in your PATH:

sudo apt-get install mingw-w64

macOS Build: "command not found: cmake"

Install CMake via Homebrew:

brew install cmake

ARM Build: "aarch64-linux-gnu not found"

Build dependencies first:

make depends-linux-arm64

Running Pastellad: "error while loading shared libraries"

For static builds, this shouldn't happen. For dynamic builds, ensure library paths are set:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Memory Issues During Compilation

If you run out of memory during compilation:

make -j2  # Reduce parallel jobs

Build Output Locations

After building, binaries are located in:

Build TypeLocation
Debugbuild/debug/src/
Releasebuild/release/src/
Static Linux x86_64build/release/x86_64-linux-gnu/src/
Static Linux ARM64build/release/arm64-linux/src/
Static Windowsbuild/release/x86_64-w64-mingw32/src/
Static macOS x86_64build/release/x86_64-apple-darwin/src/
Static macOS ARM64build/release/arm64-apple-darwin/src/
Static FreeBSDbuild/release/x86_64-unknown-freebsd/src/

Main binaries:

  • Pastellad - Daemon/node
  • Pastella-Wallet - CLI wallet
  • Pastella-Wallet-API - Wallet API server
  • P2P - P2P node (for testing)

Getting Help

For a full list of build targets:

make help

Next Steps

Need Help?