LogoLogo
  • About Thunderbird
  • Contributing to Thunderbird
    • Getting Started Contributing
    • Setting Up A Build Environment
    • Building Thunderbird
      • Windows Build Prerequisites
      • Linux Build Prerequisites
      • macOS Build Prerequisites
      • Artifact Builds
    • Codebase Overview
      • Account Configuration
      • Address Book
      • Chat Core
        • Notifications
        • Message Styles
        • Keyboard shortcuts
        • Chat Core Protocols
        • Contacts
      • Mail Front-End
    • Tutorials and Examples
      • Hello World Example
      • Thunderbird Live Development Videos
    • Fixing a Bug
      • Bug Triaging 101
        • Bug Status Classicification
        • Bug Types
        • Garbage Collection
        • Narrow the Scope
      • Using Mercurial Bookmarks
      • Using Mercurial Queues
      • Lint and Format Code
      • Using ESLint to Format Javascript Code
      • Try Server
      • Landing a Patch
      • Care and Feeding of the Tree
    • Testing
      • Running Tests
      • Adding Tests
      • Writing Mochitest Tests
  • Planning
    • Roadmap
    • Android Roadmap
    • Supported Standards
  • Add-on Development
    • Introduction
    • What's new?
      • Manifest Version 3
    • A "Hello World" Extension Tutorial
      • Using WebExtension APIs
      • Using a Background Page
      • Using Content Scripts
    • A Guide to Extensions
      • Supported Manifest Keys
      • Supported UI Elements
      • Supported WebExtension APIs
      • Thunderbird's WebExtension API Documentation
      • Thunderbird WebExtension Examples
      • Introducing Experiments
    • A Guide to Themes
    • Developer Community
    • Documentation & Resources
      • Tips and Tricks
    • Add-on Update Guides
      • Update for Thunderbird 128
      • Update for Thunderbird 115
        • Adapt to Changes in Thunderbird 103-115
      • Update for Thunderbird 102
        • Adapt to Changes in Thunderbird 92-102
      • Update for Thunderbird 91
        • Adapt to Changes in Thunderbird 79-91
      • Update for Thunderbird 78
        • Adapt to Changes in Thunderbird 69-78
      • Update for Thunderbird 68
        • Adapt to Changes in Thunderbird 61-68
      • How to convert legacy extensions?
        • Convert wrapped WebExtensions to modern WebExtensions
        • Convert legacy WebExtensions to modern WebExtensions
        • Convert legacy overlay extension to legacy WebExtension
        • Convert legacy bootstrapped extension to legacy WebExtension
  • Releases
    • Thunderbird Channels
    • Release Cadence
    • Uplifting Fixes
    • Feature Flags
    • Tracking Fixes for Releases
    • Contributing to Release Notes
Powered by GitBook
On this page
  • Hardware Requirements
  • 30 GB of free space
  • Build Environment
  • Python
  • Mercurial
  • Get the Source
  • Scripted
  • Manually
  • Missing libraries
  • You're all set

Was this helpful?

Edit on GitHub
Export as PDF
  1. Contributing to Thunderbird
  2. Building Thunderbird

macOS Build Prerequisites

This page has all the information you need to get your macOS development environment set up and ready to hack on Thunderbird.

PreviousLinux Build PrerequisitesNextArtifact Builds

Last updated 22 days ago

Was this helpful?

Hardware Requirements

30 GB of free space

The Thunderbird build can use 30-40GB of disk space to complete depending on your operating system.

Note that while it's not technically required to have an internet connection to build, the default when building from mozilla/comm-central is that --enable-bootstrap is set so that the toolchains download automatically. If you do not have an active internet connection then

Build Environment

Python

You will need python (version 3.8 or later) and pipx (used to install packages from pypi). Both of these can be installed from homebrew. If you have not yet setup homebrew, please see .

brew install python pipx

Note that once homebrew is installed, the macOS SDK headers are installed already and can be found under /Library/Developer/CommandLineTools/SDKs. There should be no additional action required to install these SDK headers.

Use pipx to install mozphab

MozPhab is the tool needed to interface with Mozilla's instance of Phabricator. This step is needed before the bootstrap step. Pipx is the tool that we will use to install MozPhab and then we will make sure the relevant ~/.local/bin has been added to the PATH envirnoment variable.

pipx install MozPhab
pipx ensurepath 

Mercurial

brew install mercurial

Get the Source

Once you have Mercurial and MozPhab installed, you are ready to grab the source code. There are a couple of different methods to do this.

Mozilla-central will build Firefox without the comm-central repo present and a few options set. Mozilla-central is the Firefox codebase and comm-central features the additions that turn Firefox into Thunderbird.

Scripted

mkdir tb-build && cd tb-build
wget https://hg.mozilla.org/comm-central/raw-file/tip/python/rocboot/bin/bootstrap.py
chmod +x bootstrap.py
./bootstrap.py

This will create a mozilla-unified directory with both a mozconfig and a comm/ folder inside.

The mozilla-unified repository has several bookmarks (akin to a git branch) and you will by default be on the autoland bookmark. You will need to be on the central bookmark and you can change by going into this directory and changing to that bookmark:

hg up central

The mozilla-unified/comm repository has several bookmarks and you will by default be on the comm bookmark. This is where you want to be, unless you are specifically working on a past ESR.

The mozconfig file is setup to build Thunderbird and you can verify this with cat mozconfig; the --enable-project parameter should be comm/mail:

ac_add_options --enable-project=comm/mail

Manually

If you would rather manually gather the source code, perform the bootstrap, and create your mozconfig file, then follow these steps.

Checkout the Source Code

Get the latest Mozilla source code from Mozilla's mozilla-central Mercurial code repository, and check it out into a local directory source (or however you want to call it). Then, get the latest Thunderbird source code from Mozilla's comm-central Mercurial code repository. It needs to be placed inside the Mozilla source code, in a directory named comm/:

hg clone https://hg.mozilla.org/mozilla-central source/
cd source/
hg clone https://hg.mozilla.org/comm-central comm/

Create mozconfig file

Mach Bootstrap

In the source directory run the following command to get additional dependencies needed to install Thunderbird:

./mach bootstrap

You will be presented with the following options:

Please choose the version of Firefox you want to build:
  1. Firefox for Desktop Artifact Mode
  2. Firefox for Desktop
  3. GeckoView/Firefox for Android Artifact Mode
  4. GeckoView/Firefox for Android

Please choose option 2 to proceed with a successful build.

This action should install all the remaining libraries and dependencies necessary to build Thunderbird locally.

Missing libraries

It could happen that some libraries will not be installed by the bootstrap command, specifically Rust and Go. Check if these packages are available in your system by running these commands in your terminal:

  • which rustc

  • which cargo

  • Install Rust: brew install rust

  • Install C bindings: cargo install cbindgen

If you get a command not found error while running cargo, but the command which cargo returns the location of the that package, it means you need to update your PATH inside your .bashrc file to include the cargo location:

export PATH=$HOME/.cargo/bin:$PATH

You're all set

As noted in the , both mozilla-central and comm-central are version controlled with Mercurial. This means you will need to install Mercurial. Here is a quick command to install it with mercurial but for a more complete list of instructions, please see .

We have created and host a script that will grab the two source repos you need, run ./mach bootstrap for you, and sets up a necessary mozconfig file. This script is called . Download this file to the directory where you would like your source code folder to live, either by clicking the link and moving the file to the appropriate location or using wget. Then we will make it executable and run it.

This step will need to be performed if you manually checked out the code and performed the bootstrap, and it will covered in the next section you follow, .

If one or both commands return an empty output, you need to install them manually. We recommend using to download and install these packages in your system. After that, follow these steps:

Go back to the page and continue following the guide:

the homebrew installation instructions
Setting up a build environment page
Mercurial's download page on their wiki
bootstrap.py
HomeBrew
Building Thunderbird
Building Thunderbird
Building Thunderbird