Prerequisites Overview
Before building, ensure the following are available on your system: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:C++23-capable compiler
- Clang (recommended)
- GCC (alternative)
Audio support (optional)
Build Ladybird
Clone the repository
Run the build and launch
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:(macOS with Homebrew Clang) Set compiler environment variables
llvm@21 from Homebrew and want to use it instead of Xcode’s toolchain: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:--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_PRESET=Debug ./Meta/ladybird.py run or select the Debug Build Type in CLion’s CMake profile).Launch Ladybird normally
./Meta/ladybird.py run ladybird from a terminal.Attach CLion to the process
WebContent and attach to that process. Breakpoints, stepping, and variable inspection will now work.Xcode / Instruments on macOS
Build the project
Apply debug entitlements
Open Instruments
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"
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
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
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
/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
Race condition / double-free on exit with llvmpipe
Race condition / double-free on exit with llvmpipe
--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
#build-problems channel on the Ladybird Discord.