Build Instructions Unix (*BSD, GNU Linux, MacOS) - rmottola/Arctic-Fox GitHub Wiki

Prerequisites

Basic Dependencies

  • GNU Compiler Collection (see below) of CLang
  • Python 2.7.x (core package from sources is enough)
  • GNU M4
  • Yasm 1.2.0 or higher
  • XZ
  • zip + unzip
  • ccache
  • gtk2 or gtk3
  • Plenty of free disk space
  • At least 1 GB RAM free per CPU used during compilation
  • (limit using the mk_add_options MOZ_MAKE_FLAGS="-jN" option)

Getting the source

Either get a source archive for the specific release, or clone git. Run the following command in the directory where you want the source code to be. git clone https://github.com/rmottola/Arctic-Fox.git

Python 2.7

Some distributions do not provide Python 2.7 since it is EOL. On Debian PPC old binaries no longer work due to t64 time transition.

I had success in compiling binaries myself. On Debian 13 amd64, just out of the box. Shipped libffi doesn't work sometimes (e.g. PPC).. 2.7.18 is needed or there libc issues too.

./configure --with-system-ffi

Be sure openssl headers are present (e.g. on debian, apt-get install libssl-dev)

Build

Configuration

Create a .mozconfig file in the directory where you checked out the sources. You can start by copying out one of the existing mozcfg-* examples

Tweak and play with options sparingly!

Some suggestions:

  • Don't overdo it with compiler flags and optimisations, start slowly. If in doubt, force -O0 for optimisations and then work up
  • GCC 6.x and up need these optimizations to be disabled: -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 The configure script should detect and set them for you, but often it doesn't work. Also, these cannot be set with clang, so try clang -O1 if you get strange crashes with -O2

Linux

On debian install: m4 gtk2.0-dev or libgtk-3-dev libasound2-dev libxt-dev

To Build On Linux

* GCC tested up to 15.0 . On some Systems (e.g. SPARC) implicit-int triggers, in case use GCC 13 or fiddle with -Wno-implicit-int 

To Build On FreeBSD

  • --disable-precompiled-startupcache is needed since otherwise fails to start, even without taking in account of package failure https://github.com/rmottola/Arctic-Fox/issues/162
  • GCC 13 is sweet-spot, clang has issues with hunspell, GCC14 has other issues -> 47.1+ are broken during package stage!

To Build on OpenBSD

* latest clang tried needs -O0 / -O1 or it will generate a crashing binary (x86-64 only)
* add LDFLAGS="-Wl,-z,wxneeded" to relax memory checks
* add TAR=gtar

To Build on NetBSD

* every gcc version tested worked
* drawback is that build always starts from scratch, probable NetBSD shell issue

To Build on MacOS

* MacPorts clang up to 7.0 work
* MacPorts clang 9.0 or later build, but yield crashing executable (at least with default optimisations)

Build

Just run: ./mach build

This will re-run configure and start a compilation process. Depending on your system, RAM, enabled options (system vs. internal libraries) from something like 10 minutes to several hours on older, single-core CPUs. Provide ample cooling, especially on laptops. If you are tight with RAM, a lot of swap will be used - don't use your system. Try to close all applications. Maybe even disable the graphic or desktop environment to free up memory. Continuous build may stress hour Hard Disk, CPU and RAM - some core developers destroyed Hardware, especially during summer time!

If all ends fine, you can do a quick test with: ./mach run Which will run Arctic Fox with a clean temporary profile.

Packaging

./mach package Will create tarballs, zip packages or .dmg files for your platform

Install

Either install the created file your preferred way, extract it or package it. ./mach install will install Arctic Fox in /usr/local so you can usually just start it with "arcticfox"