This page covers the basic steps needed to build a bleeding-edge, development version of Thunderbird. For additional, more detailed information, see the build documentation.
- Recommended: 4GB of RAM (having only 2GB RAM and 2GB swap may give memory errors during compile)
- High speed internet
Depending on your Operating System you will need to carry out a different process to prepare your machine. So firstly complete the instructions for your OS and then continue following these build instructions. Please note that for the Linux/MacOS build you should ignore the bootstrap script's prompt to clone the mozilla-central repository and return to this document instead.
Get the source
Get the latest source code from Mozilla's
comm-central Mercurial code repository.
hg clone http://hg.mozilla.org/comm-central
Then, get all the repositories it depends on. The comm-central repository includes a script to do just that. This may take a while, it's a lot of code! First, cd into the
central subdirectory (created automatically by the previous command), then run:
python client.py checkout
The source code requires 1.5GB of free space or more.
For more on getting the source code, see the page Getting comm-central Source Code Using Mercurial [en-US].
Build configuration (optional)
By default, the build system creates a release build of Thunderbird roughly equivalent to the official Firefox release builds. If that's not exactly what you want, there are many build configuration options to choose from, although it's strongly recommended that you only use options that you fully understand. The normal way to specify build options is to place them in a file called '.mozconfig' at the root of your mozilla source tree. For example, to create a debug build instead of a release build, that file would contain:
For more on configuration options, see the page Configuring build options.
To start the build, cd into the
comm-central subdirectory (created automatically by the
hg clone command), and run:
mach is our command-line tool to streamline common developer tasks. See the mach article for more.
Building can take a significant amount of time, depending on your system, OS and chosen build options. Linux builds on a fast box may take under 15 minutes, but Windows builds on a slow box may take several hours. Tips for making builds faster.
Building Thunderbird and Lightning
If you've set up you build environment as above, then all you need to do is:
echo 'ac_add_options --enable-calendar' >> .mozconfig
comm-central directory, or just add the
ac_add_options --enable-calendar line to your .mozconfig with your favourite editor.
Then just re-run the mach command above (you can do the addition before running make for the first time)
Various temporary files, libraries, and the Thunderbird executable will be found in your object directory (under
mozilla-central/), which is prefixed with
obj-. The exact name depends on your system and OS. For example, a Mac user may get an object directory name of
The Firefox executable in particular, and its dependencies, are located under the
mozilla/dist/bin folder under the object directory. To run the executable from your
comm-central working directory:
- OS X:
How to update and build again
comm-central directory, run the same command as before:
python client.py checkout
Then just re-run the mach command above. This will only recompile files that changed, but it's still a long haul. An incremental build can be faster.
- Checked the Thunderbird tbpl for known failures at the time you pulled the code?
- If the trunk is broken, you may wish to consider building one of the branches (to pull the source code from a branch, just replace the url to the repository in the hg clone instruction)
- Checked to make sure that the path in which you placed the source code has no spaces, and is not too long?
- Have you searched the bug database for issues relating to your problem (e.g. platform specific issues)?
- Try asking in mozilla.dev.builds - don't forget to include details of what is in your mozconfig, and what the actual error is.