Linux / FreeBSD

Install dependencies before configuring. The default preset uses Ninja and Clang/Clang++. FFmpeg also uses GNU make and, on x86-64, NASM, and OpenSSL uses Perl and GNU make. These tools are not downloaded by CMake. The build patches its copy of FFmpeg with patch, which build-essential, base-devel and FreeBSD's base system include; Fedora lists it below.

Debian / Ubuntu

sudo apt update
sudo apt install build-essential git cmake ninja-build meson clang llvm nasm pkg-config python3 \
  libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxfixes-dev libxss-dev libxtst-dev \
  libasound2-dev libpulse-dev libpipewire-0.3-dev

This includes the X11 and audio development libraries for the SDL3 source fallback. Without the audio ones, SDL3 builds with no sound output and games run silent. If your release provides libsdl3-dev, install it to use the distribution's SDL3 instead:

sudo apt install libsdl3-dev

If apt cannot find that package, skip it. ScarletNX builds the pinned SDL3 automatically. Installing libsdl2-dev does not satisfy the SDL3 dependency.

For native Wayland support in the source fallback, also install:

sudo apt install libwayland-dev libxkbcommon-dev wayland-protocols libdecor-0-dev libegl-dev

Without libegl-dev SDL3 quietly leaves Wayland out and builds X11 only. The SDL_WAYLAND line of its configure summary reads (Wanted: ON): ON when Wayland is in.

CMake needs version 3.28 or newer (CPMUtil, which fetches the third-party packages, needs it), and Clang must support C23/C++23. Upgrade these tools if your release ships older versions. Install your GPU's Vulkan driver separately. For Intel/AMD or lavapipe on Debian/Ubuntu, the usual packages are libvulkan1 mesa-vulkan-drivers. NVIDIA users need a Vulkan-capable NVIDIA driver.

Fedora

sudo dnf install clang cmake ninja-build meson nasm make perl git pkgconf-pkg-config patch llvm python3 \
  libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXi-devel libXfixes-devel \
  libXScrnSaver-devel libXtst-devel alsa-lib-devel pulseaudio-libs-devel pipewire-devel

These are the Debian/Ubuntu packages above under Fedora's names. Fedora 44 provides SDL3 3.4; install SDL3-devel to use it instead of the source fallback:

sudo dnf install SDL3-devel

For native Wayland support in the source fallback, also install:

sudo dnf install wayland-devel libxkbcommon-devel wayland-protocols-devel libdecor-devel libglvnd-devel

libglvnd-devel holds the EGL headers. For Intel/AMD or lavapipe, the usual Vulkan packages are vulkan-loader mesa-vulkan-drivers.

Arch Linux

sudo pacman -Syu --needed base-devel git cmake ninja meson clang llvm nasm perl pkgconf python sdl3

FreeBSD

FreeBSD provides Clang in the base system. Install the remaining tools, the SDL3 package, and libusb, which SDL's HIDAPI loads at run time to read controllers (an Xbox pad is only read that way):

sudo pkg install git cmake ninja meson gmake nasm perl5 pkgconf python3 sdl3 llvm libusb glslang

The build uses that sdl3 package by default (SNX_SYSTEM_SDL3, see SDL3 troubleshooting); pass -DSNX_SYSTEM_SDL3=OFF for the pinned SDL3 source build instead.

Configure and build

git clone https://github.com/scarletnx/ScarletNX.git && cd ScarletNX &&
cmake --preset default -B build && cmake --build build
# -> build/{scarletnx,snx-shaderc}

SDL3 troubleshooting

On all platforms, CPMUtil first looks for a compatible SDL3 development package (3.4.18 or newer) through SDL3Config.cmake. If none is found, it downloads and builds the pinned SDL3. The fallback is static, so no separate SDL3 runtime installation is needed. It still needs your platform's window-system development libraries.

After installing dependencies, rerun:

cmake --preset default -B build && cmake --build build

If that directory was configured with a different compiler or generator, use a new build directory (for example -B build/clang) rather than mixing the old cache with the new toolchain.


Made from docs/dev/build.md at 69237645142c. GPL-3.0-or-later.