Thunderbird:Build: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
(Removing browser from options, since this is specifically about thunderbird. Should consider removing calendar too.)
Line 13: Line 13:
The following command works for the mozconfig shown below: (time, a Unix app, will tell you how long the compile took.)
The following command works for the mozconfig shown below: (time, a Unix app, will tell you how long the compile took.)


  $ time make -f client.mk checkout MOZ_CO_PROJECT=browser,mail,calendar
  $ time make -f client.mk checkout MOZ_CO_PROJECT=mail,calendar


A sample .mozconfig for a dual-core MacBook Pro, which checks out Firefox, Thunderbird (with Lightning enabled), and Sunbird code at the same time:
A sample .mozconfig for a dual-core MacBook Pro, which checks out Firefox, Thunderbird (with Lightning enabled), and Sunbird code at the same time:
Line 20: Line 20:
  mk_add_options MOZ_MAKE_FLAGS="-j3"
  mk_add_options MOZ_MAKE_FLAGS="-j3"
  mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir-@CONFIG_GUESS@
  mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir-@CONFIG_GUESS@
  mk_add_options MOZ_BUILD_PROJECTS="browser mail calendar"
  mk_add_options MOZ_BUILD_PROJECTS="mail calendar"
  mk_add_options MOZ_CO_PROJECT="browser mail calendar"
  mk_add_options MOZ_CO_PROJECT="mail calendar"
  # For debugging, enable if necessary
  # For debugging, enable if necessary
  #mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc"
  #mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc"
  #ac_add_options --enable-trace-malloc
  #ac_add_options --enable-trace-malloc
  # To enable multi-app compilation from one .mozconfig
  # To enable multi-app compilation from one .mozconfig
ac_add_app_options browser --enable-application=browser
  ac_add_app_options mail --enable-application=mail
  ac_add_app_options mail --enable-application=mail
  ac_add_app_options calendar --enable-application=calendar
  ac_add_app_options calendar --enable-application=calendar

Revision as of 21:19, 14 March 2008

<< Back to Thunderbird Home Page

Build

Mozilla Developer Center has the documentation required to build Thunderbird.

To build on Mac OS X 10.5 Leopard,

1. Get your build environment up and running.

2. Check out your code on CVS. Be sure to decide if you want a trunk build or a branch build.

The following command works for the mozconfig shown below: (time, a Unix app, will tell you how long the compile took.)

$ time make -f client.mk checkout MOZ_CO_PROJECT=mail,calendar

A sample .mozconfig for a dual-core MacBook Pro, which checks out Firefox, Thunderbird (with Lightning enabled), and Sunbird code at the same time:

# Sample .mozconfig
mk_add_options MOZ_MAKE_FLAGS="-j3"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir-@CONFIG_GUESS@
mk_add_options MOZ_BUILD_PROJECTS="mail calendar"
mk_add_options MOZ_CO_PROJECT="mail calendar"
# For debugging, enable if necessary
#mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc"
#ac_add_options --enable-trace-malloc
# To enable multi-app compilation from one .mozconfig
ac_add_app_options mail --enable-application=mail
ac_add_app_options calendar --enable-application=calendar
# Compilation options
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --disable-static
ac_add_options --enable-shared
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
# Build Thunderbird with preinstalled Lightning if needed.
ac_add_options --enable-extensions=default,lightning

3. Compile the build: (feel free to replace "mail" with "browser" and "calendar")

time make -f client.mk build MOZ_CURRENT_PROJECT=mail

4. To run the builds in Terminal in the following recommended way, go through the following commands:

  • Set up for leak detection.
$ export XPCOM_MEM_LEAK_LOG=2
  • mail-dumped.txt will show the objects dumped when shut down.
$ export XPC_SHUTDOWN_HEAP_DUMP=mail-dumped.txt
  • Change into the directory where ThunderbirdDebug.app is found.
$ cd @@@YOURDIRECTORY@@@/objdir-i386-apple-darwin9.2.0/mail/dist/ThunderbirdDebug.app/Contents/MacOS/
  • Create your profile here.
$ ./thunderbird-bin -Profilemanager --no-remote
  • Run Thunderbird within gdb to get stack traces when the application crashes.
$ gdb ./thunderbird-bin
  • Within gdb, type this command:
(gdb) handle SIG33 noprint nostop
  • Run the debug Thunderbird build with your just-created profile.
(gdb) run -P "@@@YOURPROFILE@@@" -no-remote
  • When the application crashes, run backtrace within gdb:
    • and attach the trace shown in your Terminal window as an attachment in a Bugzilla report if there are no other duplicates.
(gdb) backtrace
  • To quit gdb, type:
(gdb) quit


Build Machines

TBD

Helping With Build

TBD