Getting Firefox 3.6.23 to compile under LFS
Using the instructions from the BLFS book with the latest available 3.6 build of Firefox, I was able to achieve success. I figured I’d try out 3.6 before going onto something with a terribly inflated version number, and as per usual, ran into some problems:
- Rebuild libpng-1.5.5 with APNG support. This is actually optional as I ended up commenting out the –with-system-png option in mozconfig.
- In the suggested mozconfig, comment out the last two lines:
to create a standalone build.
- Apply the GCC patch from this Bugzilla report (direct download).
- Apply a partial patch from the Chromium project of all places. I’ve customized it here:
# TLE Patch for Firefox/LFS
diff -u a/gfx/ots/src/os2.cc b/gfs/ots/src/os2.cc
— a/gfx/ots/src/os2.cc 2011-11-02 07:10:17.000000000 -0400
+++ b/gfx/ots/src/os2.cc 2011-11-02 07:10:30.000000000 -0400
@@ -5,6 +5,7 @@
// OS/2 – OS/2 and Windows Metrics
- Apply a GCC4.6-specific patch to fix various .cpp files. Some parts of the patch will fail; that’s expected.
- Manually edit layout/style/nsCSSRuleProcessor.cpp and go to line 1199. Change the source code as follows:
const nsCaseInsensitiveStringComparator ciComparator;
const nsCaseInsensitiveStringComparator ciComparator = nsCaseInsensitiveStringComparator();
- For the toolkit/components/places/src/SQLFunctions.cpp file, change line 126 to:
const nsCaseInsensitiveStringComparator caseInsensitiveCompare = nsCaseInsensitiveStringComparator();
- In toolkit/crashreporter/google-breakpad/src/common/linux/language.cc, make sure line 51 is changed to:
const CPPLanguage CPPLanguageSingleton = CPPLanguage();
- In toolkit/xre/nsAppRunner.cpp, line 990:
static const nsXULAppInfo kAppInfo = nsXULAppInfo();
- While this is resolved in newer Firefox versions, copy security/coreconf/Linux2.6.mk to security/coreconf/Linux3.1.mk to add support for the 3.1 kernel.
Your reward will be a working Firefox installation:
I currently run a mix of Windows, OS X and Linux systems for both work and personal use.
For Linux, I prefer Ubuntu LTS releases without Unity and still keep Windows 7 around for gaming.
Check out my profile for more information.