This update applies to some degree to CentOS and RHEL, but some details will vary.
Fetch your source from the standard FTP. The basic URL is:
http://releases.mozilla.org/pub/mozilla.org/firefox/releases/
From there, dig down into the current release folder, followed by the “source” directory and grab the large bzipped tar-ball: firefox-6.0.1.source.tar.bz2 as of this writing. The canonical method on RHEL clones is to build stuff in your home directory, because $HOME
on a standard desktop install is larger than your system partition. You should build from your user account, and only use root to install. I created a src
folder in my home directory. Open your terminal window and join the Brotherhood of the Command Line. Navigate to your build folder and:
tar -jxvf firefox-6.0.1.source.tar.bz2
You’ll need to make sure you have the necessary dependencies, and it has changed a bit since FF4. The simplest is to grab everything at once the way it’s described for Fedora on the Mozilla Firefox Simple Build page, with some modifications specific to RHEL clones:
yum groupinstall ‘Development Tools’ ‘Development Libraries’ ‘GNOME Software Development’
yum install autoconf213 glibc-static yasm wireless-tools-devel mesa-libGL-devel
Then, by experimentation I discovered we needed to add a few more items:
yum install startup-notification-devel libnotify-devel alsa-lib-devel libIDL-devel
Finally, you’ll need to update Yasm to the latest. Visit your favorite Fedora Core 15 repository and pick up the SRPM. If nothing else, you can get it here. Use the standard RPMbuild instructions to produce RPMs. Install both the main and “devel” package.
That should cover the dependencies. Navigate under your user account into the directory created by unzipping and untarring the source package (usually the folder is named mozilla-release
). There, use your favorite editor to create a file named “.mozconfig” — make sure to have that leading period. Paste this in it:
mk_add_options MOZ_MAKE_FLAGS=”-j4″
ac_add_options –enable-application=browser
ac_add_options –with-system-jpeg
ac_add_options –with-system-zlib
ac_add_options –with-pthreads
ac_add_options –disable-tests
ac_add_options –disable-debug
ac_add_options –enable-optimize
ac_add_options –disable-installer
ac_add_options –enable-default-toolkit=cairo-gtk2
ac_add_options –disable-strip
ac_add_options –enable-pango
ac_add_options –enable-svg
ac_add_options –enable-canvas
ac_add_options –enable-startup-notification
ac_add_options –enable-libxul
ac_add_options –disable-crashreporter
ac_add_options –enable-safe-browsing
ac_add_options –enable-libnotify
ac_add_options –disable-necko-wifi
ac_add_options –disable-cpp-exceptions
ac_add_options –disable-updater
ac_add_options –enable-url-classifier
ac_add_options –enable-gio
ac_add_options –disable-gnomevfs
That first line is suitable for dual core or twin processor systems. Generally, the “-j” switch should be a number which is twice the number of processors or cores you have on your machine to get the most from it. Everything else reflects the standard features used in the Red Hat world, and they seem to work pretty well.
Now run this command:
make -f client.mk build
Barring any surprises, it should proceed to build and will take awhile. Don’t expect to get much done on your system while this is building. Once the prompt comes back in your terminal window without any errors, you are done. As root you can now install:
su root
make -f client.mk install
I notice lately some pages with heavy JavaScript implementations in FF6 will bog down my computer. I’m not the only one to notice, and I have no explanation for that. It may be simply the hardware combination or something specific to the way RHEL clones do things. Who’s to say it will continue being worth the trouble to do this?
To be honest, I’ve found downloading and installing the generic build for Linux works about as well. Instead of chasing down the source code on the FTP server, simply this page and click the big green button. Once you unzip and untar the bundle, simply move the whole thing to /usr/local/
and link your launcher icons to run the script: /usr/local/firefox/firefox
.
Pingback: Firefox 4.0 Simple Build on RHEL 6 « Do What's Right