Skip to main content

Debian / Ubuntu

Install Dependencies

1

Install build tools and libraries

Optional: Install fuse2fs for building images without root privileges.
2

Install GCC 14 or Clang 17+

On Ubuntu 24.04 (Noble) and later:
For older versions, use the ubuntu-toolchain-r/test PPA.
3

Install QEMU 6.2 or later

Ubuntu 22.04 and later include QEMU 6.2. For earlier versions, build from source:
4

Verify CMake version

CMake 3.25.0 or later is required. If your version is older:

Build and Run

If you see fusermount: failed to open /etc/mtab: No such file or directory, create the symlink:

Arch Linux / Manjaro

Install Dependencies

Optional packages:
  • fuse2fs - For building images without root
  • clang llvm llvm-libs - For building with Clang

Build and Run

Fedora

Install Dependencies

Optional: e2fsprogs package for building images without root.

openSUSE

Install Dependencies

Void Linux

Install Dependencies

ALT Linux

Install Dependencies

NixOS

Using Flakes

The repository includes a flake with all required dependencies:

Using Legacy nix-shell

This uses Toolchain/default.nix and your host nixpkgs.

Alpine Linux

Tested on edge. YMMV on stable.

Install Dependencies

1

Enable community repository

Edit /etc/apk/repositories to enable the community repository, then:
2

Install basic tools

3

Install GNU coreutils

4

Install build tools

5

Install QEMU

6

Install development libraries

samurai is a drop-in replacement for ninja.

OpenBSD

Install Dependencies

FreeBSD

Install Dependencies

Optional: fusefs-ext2 for building images without root.

Building on SerenityOS

You can build SerenityOS on SerenityOS itself!

Install Required Ports

Install Toolchain Ports

Configure Shell

Create a symlink from /bin/sh to /usr/local/bin/bash:
Add this to your customization script to persist across rebuilds.

Ports

To build a port, navigate to its directory and run the package script:
The port will be available the next time you start SerenityOS.

Common Port Dependencies

Some ports require a symlink from /usr/bin/python to /usr/bin/python3.

Troubleshooting

Outdated Toolchain

If prompted to rebuild the toolchain:

CMake Cache Issues

If CMake complains about version mismatches:

Next Steps

Advanced Build Options

Explore CMake options, build configurations, and customization