Skip to content

Build Instructions Unix (*BSD, GNU Linux)

Riccardo edited this page Jan 8, 2024 · 2 revisions

Prerequisites

Basic Dependencies

  • GNU Compiler Collection (see below)
  • Python 2.7.x
  • Exactly Autoconf 2.13
  • Yasm 1.2.0 or higher
  • XZ
  • 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)
  • Various distribution specific development packages

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

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 optimizations, start slowly. If in doubt, force -O0 for optimizations and then work up
  • GCC 6.x and up need these optimiazations 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

To Build On FreeBSD

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, system one being OK up to gcc8

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"