Building Pale Moon: GNU Linux

These instructions are for building Pale Moon 34.3.0 and newer and assumes you want to build the latest release.

Prerequisites

Basic Dependencies

  • GNU Compiler Collection (see below)
  • Python 3.x (tested range 3.4-3.14; YMMV with other versions)
  • Yasm 1.2.0 or higher
  • Nasm 2.14 or higher (if building AV1 support with Dav1d)
  • XZ
  • Plenty of free disk space
  • At least 6 GB RAM free depending on number of processor cores
    (limit using the
    mk_add_options MOZ_MAKE_FLAGS="-jN"
    option)
  • Various distribution specific development packages
  • General system requirements for running the application itself

GCC Compatibility

Version Status Notes
15.x Generally Considered Stable Mid-term tested.
14.x Generally Considered Stable Mid-term tested.
13.x Generally Considered Stable Mid-term tested.
12.x Generally Considered Stable Mid-term tested.
11.x Recommended Long-term tested. Currently in-use for MCP Applications.
10.x Deprecated Mid-term tested.
9.x Deprecated Long-term tested.
<=8.x Unsupported

Getting the source

These instructions assume you are going to create a directory in your home directory (~) called palemoon-source. You can, of course, put the source code anywhere you want as long as the path does not contain any spaces.

Using git

Git is the official way to get the Pale Moon source code from our repository server and to build.

  • Install git and open a Bash prompt, and change directory to the desired source location, e.g.
    cd /location-you-picked/palemoon-source/
  • Execute the following commands:
    git clone https://repo.palemoon.org/MoonchildProductions/Pale-Moon.git ./
    git submodule init && git submodule update
    git checkout release && git submodule update
    
  • Close Bash and proceed to the "Build instructions" below.

Distribution specifics

Oracle Linux 8/Alma Linux 8

The generic x86_64 packages that we distribute are built on Oracle Linux 8 with GCC 11.5.

Install the required build dependencies by executing the following commands:

dnf install epel-release

dnf config-manager --set-enabled ol8_codeready_builder

dnf install gtk3-devel dbus-glib-devel yasm mesa-libGL-devel alsa-lib-devel \
libXt-devel openssl-devel sqlite-devel pulseaudio-libs-devel python3

dnf groupinstall 'Development Tools'

If you plan on building the GTK2 version of the binaries, you will additionally need:

dnf install gtk2-devel
To install a current compiler on this (recommended gcc 11.*) you need to install an updated toolset:
dnf install gcc-toolset-11
You can launch a new bash shell with that toolset as follows:
scl enable gcc-toolset-11 bash
and build from there, or alternatively set gcc11 and tools as default by adding the following to your
~/.bashrc
:
# set gcc-toolset-11 as default
source /opt/rh/gcc-toolset-11/enable

Debian/Ubuntu

This may also apply to derivatives of Debian or Ubuntu, e.g. Linux Mint. You may need additional packages based on your installation.

Install the required build dependencies by executing the following command:

apt-get install build-essential libgtk-3-dev libdbus-glib-1-dev \
yasm libegl1-mesa-dev libasound2-dev libxt-dev zlib1g-dev libssl-dev \
libsqlite3-dev libbz2-dev libpulse-dev libx11-xcb-dev zip python3 python-dbus

If you plan on building the GTK2 version of the binaries, you will additionally need:

apt-get install libgtk2.0-dev

Arch

Install the required build dependencies by executing the following command:

pacman -Syu gtk3 dbus-glib desktop-file-utils libxt mime-types \
alsa-lib startup-notification unzip zip yasm nasm libpulse gcc openssl-1.1

If you plan on building the GTK2 version of the binaries, you will additionally need:

pacman -Syu gtk2

Install the following from AUR using your preferred pacman wrapper (e.g. yay):

  • python3
    (required)
  • python-dbus
    is used for build notifications.

Gentoo

Install the required build dependencies by executing the following commands:

# Compile time dependencies
emerge -n1 sys-devel/gcc dev-lang/python dev-lang/perl dev-lang/yasm
If building AV1 support with Dav1d (default):
emerge -n1 dev-lang/nasm

# Runtime time dependencies
emerge -n x11-libs/libXt app-arch/zip media-libs/freetype media-libs/fontconfig \
sys-libs/glibc dev-libs/libffi sys-apps/dbus dev-libs/dbus-glib x11-libs/gtk+:3 \
media-sound/pulseaudio net-wireless/wireless-tools

If you plan on building the GTK2 version of the binaries, you will additionally need:

emerge -n x11-libs/gtk+:2
# Set the "x264" USE flag for media-video/ffmpeg and emerge it (mkdir /etc/portage/package.use; \ echo "media-video/ffmpeg x264" >> /etc/portage/package.use/ffmpeg) || \ echo "media-video/ffmpeg x264" >> /etc/portage/package.use emerge -nN ffmpeg

Add the following to the .mozconfig file you will create in Build Instructions:

mk_add_options PYTHON=/usr/bin/python2

Build instructions

Configure

Create a file called .mozconfig in the source folder you cloned or unpacked the source to. Make sure it contains at least the following for a close-to-official build:

.mozconfig file

# Clear this if not a 64bit build
_BUILD_64=1

# Set GTK Version to 2 or 3
_GTK_VERSION=3

# Standard build options for Pale Moon
ac_add_options --enable-application=palemoon
ac_add_options --enable-optimize="-O2 -w"
ac_add_options --enable-default-toolkit=cairo-gtk$_GTK_VERSION
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --enable-devtools
ac_add_options --enable-av1
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater
ac_add_options --with-pthreads

# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1

# Processor architecture specific build options
if [ -n "$_BUILD_64" ]; then
  ac_add_options --x-libraries=/usr/lib64
else
  ac_add_options --x-libraries=/usr/lib
fi

export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION

Note: LESS IS MORE! There are some pre-made build configs out there that have a lot of options listed, often with insane resulting build configurations. Do not use those and stick to the instructions here.

Build

Start the build:

./mach build

Be patient. Building could take a long time. Your PC will be fully occupied compiling and linking the browser (you can expect 100% CPU usage throughout and lots of memory use - provide ample cooling) and you should not be using it for anything else that is resource-intensive at this time. Especially memory-intensive applications should be avoided because it can cause issues with the linker (memory fragmentation) resulting in a very unstable browser.

Note: Some people are in a habit of using the old style
make -f client.mk build
but that can in some cases cause build failure and is generally no longer supported. While it may still start a build because of our underlying makefile structure, it does not create the right environment for building and the results will be unpredictable. Please always use the
mach
command indicated above!

Strip/package

After building is completed, you can take the resulting binaries for a test run in the object directory directly (see the on-screen instructions at the end of the build process) but it will not be complete yet. You need to strip and package the browser to integrate additional code, pack up the resource files, and have a ready-to-use browser. You do this by running:

./mach package
This will create a properly packaged xz compressed tarball in your object folder under the Pale Moon source folder. e.g. for Linux 64bit with GTK 3:
~/palemoon-source/obj-x86_64-pc-linux-gnu/dist/palemoon-{version}.linux-x86_64-gtk3.tar.xz

Site design and Branding © 2026 Moonchild Productions - All rights reserved
Any other content, brand names or logos are copyright or trademark to their respective owners.
Policies: Cookies - User Content - Privacy.

The Pale Moon Developer Site is powered by Project Selene 1.2.1.