Skip to content

Universal Build Guide

koh-gt edited this page Sep 21, 2024 · 1 revision

Workflow

General workflow for cross-compilation on Ubuntu Linux:
Get Ubuntu Linux
Clone the repository
Install dependencies for installing base dependencies on other Operating Systems(OSes)
Install base dependencies
Build the dependencies
Build Ferrite Core

Get Ubuntu Linux

You will first need Ubuntu Linux either on a physical machine, a Virtual Machine (VM) or on Windows Subsystem for Linux (WSL). Then you will need to update your apt repositories.

sudo apt update && sudo apt upgrade

Clone the repository

To clone ferrite-core, you will need the general dependencies.

sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git

and then acquire the source code

git clone https://github.com/koh-gt/ferrite-main.git

Install dependencies for installing base dependencies

Common
Windows
MacOS Linux ARM
Linux RISC-V 64-bit Linux POWER 64-bit Linux S390X

Common Linux required dependencies Ubuntu and Debian

sudo apt-get install make automake cmake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3 patch

Skip this step if you are only compiling for Ubuntu Linux x64
From the Dependencies guide

For Windows cross compilation

You will need the mingw-w64 cross-compiler tool

sudo apt install g++-mingw-w64-x86-64

and then set the default compiler toolchain to posix

sudo update-alternatives --config x86_64-w64-mingw32-g++

You will also need nsis to build the windows installer with make deploy

sudo apt install nsis

For MacOS cross compilation

apt install clang lld llvm g++ zip

For Linux cross compilation