Building Ladybird from source is the only way to run it during the current pre-alpha stage of development. The process follows a consistent pattern across all supported platforms: install system prerequisites, optionally configure a UI frontend, then run a single Python script that handles CMake configuration and compilation. This page covers every supported Unix-like system in detail, along with tips for choosing a UI, running debug builds, and attaching a debugger.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ladybirdBrowser/ladybird/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites Overview
Before building, ensure the following are available on your system:| Requirement | Minimum version | Notes |
|---|---|---|
| CMake | 3.30 | Must be on $PATH; install from Kitware apt on Ubuntu |
| C++ compiler | clang-21 or gcc-14 | CI uses these versions; see find_compiler.py for minimums |
| Ninja | Any recent | Build system driver |
| Qt6 | 6.x | Default UI on Linux; optional on macOS |
| nasm | Any recent | Assembler required by several library dependencies |
| Rust (via rustup) | Stable | rustup.rs |
The CI pipeline uses clang-21 and gcc-14. If those exact versions are unavailable on your system, check
Meta/Utils/find_compiler.py for the minimum compatible version your build system will accept.Install System Dependencies
- Debian / Ubuntu
- Arch / Manjaro
- Fedora
- openSUSE
- Void Linux
- NixOS
- macOS
- FreeBSD
Base packages
CMake 3.30 or newer (Ubuntu only)
The system CMake is often too old. Install from Kitware’s apt repository:The Kitware apt repository is Ubuntu-only. Debian users should obtain CMake from the CMake download page.
C++23-capable compiler
- Clang (recommended)
- GCC (alternative)
Install from LLVM’s apt repository:
Audio support (optional)
Build Ladybird
Run the build and launch
The This builds a Release build. Debug symbols are available in both Release and Debug builds.
ladybird.py script is the simplest and recommended way to build and run Ladybird. It handles CMake configuration, dependency management (via vcpkg), compilation, and launch in one command:Build Variants
Debug Build
To build with debug-optimized settings (uses-Og, includes full debug symbols):
Run a Specific Executable
To run the JS REPL, the WebAssembly REPL, or another bundled tool instead of the browser:Start in GDB
Choosing a UI Frontend
Ladybird supports multiple UI frontends. The default is chosen automatically based on platform:| Frontend | Platform | Notes |
|---|---|---|
| AppKit | macOS | Default on macOS; native Objective-C UI |
| Qt | Linux, Windows (WSL2), others | Default on non-macOS |
| GTK 4 | Linux | Experimental alternative |
| Android UI | Android | Native Android UI |
--gui to ladybird.py or set LADYBIRD_GUI_FRAMEWORK:
Extra Packages for GTK 4
Building withLADYBIRD_GUI_FRAMEWORK=Gtk requires additional packages because some vcpkg dependencies (e.g. gettext) must be rebuilt from source:
- Debian / Ubuntu
- Arch / Manjaro
- Fedora
Running Manually (Without ladybird.py)
Theladybird.py script ultimately invokes Ninja targets. You can run them directly from the build directory:
Debugging
CLion
Build with debug symbols
Build using the Debug preset (either
BUILD_PRESET=Debug ./Meta/ladybird.py run or select the Debug Build Type in CLion’s CMake profile).Xcode / Instruments on macOS
Apply debug entitlements
Allow Instruments to attach by codesigning with the debug entitlements plist:
Troubleshooting
CMake fails with "unable to find a build program corresponding to Ninja"
CMake fails with "unable to find a build program corresponding to Ninja"
This error is a red herring produced by vcpkg, not Ninja itself. A dependency (often Check the log file for the actual root cause, fix the underlying dependency issue (often a missing system library), then retry.
skia) failed to build. The real error appears earlier in the terminal output and in the log file identified in the CMake output, typically at Build/release/vcpkg-manifest-install.log.CMake version is outdated
CMake version is outdated
Verify your version with
cmake --version. You need 3.30 or newer. On Ubuntu, install from Kitware’s apt repository (see the Debian/Ubuntu tab above). On other systems, download a binary from the CMake website.GCC is missing or too old
GCC is missing or too old
Check with
gcc --version. If the binary is named differently (e.g. gcc-13), specify it explicitly when invoking CMake:"Legacy renegotiation is disabled" TLS error
"Legacy renegotiation is disabled" TLS error
Add the following to
/etc/ssl/openssl.cnf:"Targets may link only to libraries" warning on macOS with Qt
"Targets may link only to libraries" warning on macOS with Qt
This CMake warning is harmless. It appears when building with the Qt UI on macOS and does not prevent a successful build. You can safely ignore it.
Race condition / double-free on exit with llvmpipe
Race condition / double-free on exit with llvmpipe
When running
--headless=text or --headless=layout-tree on a system using the llvmpipe software rasterizer (common on virtual machines), Ladybird may occasionally crash on exit with double free or corruption (!prev). Run with --force-cpu-painting to work around this.Build broken after git pull
Build broken after git pull
If the build passes on CI, it should work locally. Try rebuilding the toolchain. If that does not help, try a clean repository. For persistent issues, ask in the
#build-problems channel on the Ladybird Discord.