Build Pale Moon codename "Tycho" on Linux

NOTICE

Codename "Tycho" is still in development and this page may not represent the current build configuration requirements for a stable build. But we will try and keep it up to date and correct ;)

Prerequisites

  • GCC - Minimum version required is unknown. Versions 5.2.x is recommended, 6.x is still experimental and is known to produce unstable builds (segfaults in mozjs.so).
  • Python 2.7.x
  • Exactly Autoconf 2.13
  • at least 4 GB of usable ram (It may be possible to build with less ram but experience has shown that unstable to busted builds result)

Getting the source

Due to Linux's strict file permission model it is recommended that you obtain the source from the Official GitHub Repo directly either by cloning the repo or by downloading and extracting a tarball from the appropriate release tag.

If you chose to use the 7zip packed sources from the website you may encounter compilation issues due to file permissions (or lack thereof).

Mozconfig Files

You will need to create a file called .mozconfig in the same folder you unpack the Pale Moon source to. Do not to omit the . at the start. Make sue it is {dot}mozconfig and not .mozconfig.txt or similar.

Make sure it contains at least the following for a build that is similar to official builds:

#Use unstable branding during development
ac_add_options --with-branding=browser/branding/unstable
export MOZILLA_OFFICIAL=1
 
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
 
mk_add_options MOZ_OBJDIR=/home/$USER/pmbuild/
 
ac_add_options --disable-installer
ac_add_options --disable-updater
 
ac_add_options --disable-tests
ac_add_options --disable-mochitests
ac_add_options --disable-debug
ac_add_options --disable-sandbox
 
ac_add_options --disable-crashreporter
ac_add_options --disable-accessibility
ac_add_options --disable-parental-controls
ac_add_options --disable-maintenance-service
ac_add_options --disable-webrtc
ac_add_options --disable-websms-backend
ac_add_options --disable-metro
 
ac_add_options --enable-jemalloc
ac_add_options --with-pthreads
ac_add_options --enable-shared-js
 
ac_add_options --enable-strip
ac_add_options --enable-optimize="-O2 -msse2 -mfpmath=sse"
 
ac_add_options --x-libraries=/usr/lib

CentOS 7 Build Prerequisites

Enable the EPEL repository so that we can install all the required build dependencies:

yum install epel-release

Install the required development packages using the following commands:

yum install gtk2-devel dbus-glib-devel autoconf213 yasm mesa-libGL-devel alsa-lib-devel libXt-devel zlib-devel openssl-devel sqlite-devel bzip2-devel gstreamer1-devel gstreamer1-plugins-base-devel pulseaudio-libs-devel
yum groupinstall 'Development Tools'

The versions the development tools that ship with CentOS 7 are too old and will likely not build Pale Moon. the Red Hat Developer Toolset v4 to get newer versions that are supported.

First, install the Software Collections repository with the following command:

yum install centos-release-scl-rh

Now install the Red Hat Developer Toolset v4 Software Collection (which includes GCC 5.2.x and friends):

yum install devtoolset-4-toolchain

Using a text editor, create a shell script (e.g. build.sh) with the following contents and save it in your home directory:

#!/bin/bash
 
if [ ! -d "pmsrc" ] || [ ! -d "pmbuild" ] ; then
  echo "Missing directories!"
  exit 1
fi
 
cd pmsrc/
 
echo "Build?"
read -n 1 ch
 
if [ "$ch" == "y" ] ; then
  make -f client.mk build &> /dev/stdout | tee buildlog.txt
  if [ ${PIPESTATUS[0]} == 0 ]; then
    cd "../pmbuild"
    make package
  fi
else
  echo "Compilation aborted."
fi

Extract the Pale Moon source code to /home/$USER/pmsrc/. After extracting, create a mozconfig file (see above). You will also need to create a /home/$USER/pmbuild/ directory (the build.sh script will fail without it). Then execute the following command from a terminal to start the build:

scl enable devtoolset-4 ./build.sh

Categories: (Uncategorized)
Firefox, Mozilla Firefox and Mozilla are registered trademarks of the Mozilla Corporation.
Site design and Branding © 2016 Moonchild Productions - All rights reserved
Any other content is copyright or trademark to their respective owners.
This site uses Cookies - Your usage indicates your consent to their use.

The Pale Moon Developer Wiki is powered by Enano