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.
Preparing your system
Before you can build Thunderbird, you'll need the build tools listed below and a few gigabytes of free disk space. Builds will be slow unless you have at least 2GB of RAM.
Run the following commands in a shell to install the needed tools:
sudo apt-get build-dep thunderbird sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev mesa-common-dev autoconf2.13 yasm
Debian users: Same as Ubuntu, but replace the first command with
sudo apt-get build-dep icedove
sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development' sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libGL-devel alsa-lib-devel libXt-devel
Problems? See Linux build prerequisites.
- Install Xcode 3. You can download this from Apple, or install it from the OS DVDs that came with your Mac.
- If you're using OS X 10.6.5 or later, install Java Developer Package for Mac (for a file required by the MacPorts packages we install below).
- Install MacPorts, and then run these commands in a shell:
sudo port sync sudo port install mercurial libidl autoconf213 yasm
- homebrew is an alternative to MacPorts. Thunderbird uses an older version of autoconf, so you need to use an alternate brew recipe from the homebrew's Github site.
sudo easy_install pip sudo pip install Mercurial sudo brew install libidl yasm sudo brew install https://raw.github.com/adamv/homebrew-alt/master/versions/autoconf213.rb
Problems? See Mac OS X build prerequisites.
- Make sure your system is up-to-date through Windows Update. Windows XP needs at least Service Pack 2 and .NET Framework 2.0.
- Install Visual C++ 2005 Professional, VC++ 2008 Professional or Express with SP1 (free), or Visual C++ 2010 Professional or Express (free). VC++ 2008 Express without SP1 will not work.
- You may need to install one or more Windows SDKs. See Windows SDK versions for a quick guide.
- Install the June 2010 DirectX SDK.
- Install MozillaBuild, a package of additional build tools. (If you see a Windows error dialog giving you the option to re-install with the 'correct settings', choose that option and after that all should be well.) (Another option is to use pymake, a Python implementation of Make that uses Window's multi-core architectur e and thus significantly speeds up build time. See Mike Conley's blog post for more information.)
The rest of the build steps are done from the MSYS shell installed with MozillaBuild. Use the shortcuts on your desktop, or run
c:\mozilla-build\start-msvcX.bat (where X is 8 for 2005, 9 for VS 2008 and 10 for VS 2010). Even if you're on 64-bit Windows, do not use the
start-msvcX-x64.bat files (unless you know what you're doing). Those files are experimental and unsupported. See the Build:MozillaBuild For x64 wiki page.
Problems? See Windows build prerequisites.
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
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.
On Mac OS X, and GNU/Linux to start the build, cd into the subdirectory (created automatically by the
hg clone command), and run:
make -f client.mk
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.
Various compiled files, libraries, and the Thunderbird executable will be found in your object directory (under
comm-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
From the object directory, Windows users should run
mozilla/dist/bin/thunderbird.exe, Linux users should run
mozilla/dist/bin/thunderbird, and OS X users should run
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 "
make -f client.mk" command above (you can do the addition before running make for the first time)
How to build again later
comm-central directory, run the same command as before:
python client.py checkout
Then just re-run the "
make -f client.mk" command above.
make will only recompile files that changed, but it's still a long haul. An incremental build can be faster.
- Checked the Thunderbird tinderbox 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)
- 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.