You can follow this guide, with a few exceptions:
Use the latest thunderbird 3.1.x (For example 3.1.15)
Then, when building it directly you will receive a few errors:
1. Patching os2.cc
--- a/gfx/ots/src/os2.cc+++ b/gfx/ots/src/os2.cc@@ -1,12 +1,14 @@ // Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + #include "os2.h" #include "head.h" // OS/2 - OS/2 and Windows Metrics namespace ots {2. Add GC 4.6 backward compatibility option in your mozconf file:
export CXXFLAGS="-fpermissive"
3. Patch the makefile to use correct linking order
+--- a/mail/app/Makefile.in ++++ b/mail/app/Makefile.in +@@ -127,6 +127,8 @@ APP_XPCOM_LIBS = $(XPCOM_LIBS) + endif + + LIBS += \ ++ $(STATIC_EXTRA_LIBS) \ ++ $(MOZ_OTS_LIBS) \ + $(STATIC_COMPONENTS_LINKER_PATH) \ + $(MOZ_JS_LIBS) \ + $(EXTRA_DSO_LIBS) \ +@@ -185,8 +187,6 @@ DEFINES += $(STATIC_DEFINES) + CPPSRCS += $(STATIC_CPPSRCS) + EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS) + REQUIRES += $(STATIC_REQUIRES) +-EXTRA_LIBS += $(STATIC_EXTRA_LIBS) +-EXTRA_LIBS += $(MOZ_OTS_LIBS) + + ifndef MOZILLA_1_9_2_BRANCH +
After these changes you should be able to build thunderbird 3.1.x under Ubuntu 11.10