| Make Firefox fly: building from a minefield of source |
|
|
| by David M Williams | |
| Monday, 30 June 2008 | |
|
Page 1 of 5 It's running Fedora release 9 (Sulphur), with Linux Kernel 2.6.25.6-55.fc9.i686 and GNOME 2.22.2 as advised by System/About this Computer. Firefox's Help/About menu reports it is Firefox version 3.0, specifically Gecko/2008061712 Fedora/3.0-1.fc9. I've run System/Administration/Update System to check I've got the latest version of Firefox available from the Fedora software repositories. Let's check how large Firefox is on disk. To do this, we first have to find where it is. We use the which command for this which locates where a specified program is within the directories listed in the PATH environment variable. [david@dmw ~]$ which firefox /usr/bin/firefox So, on this laptop, when I call the Firefox web browser, it's the program /usr/bin/firefox which is being invoked. This program file, however, is not a compiled binary file but is instead a shell script. You can tell this by a variety of methods, not least that the file size is quite minute for a complex piece of software: [david@dmw ~]$ ls -s /usr/bin/firefox 8 /usr/bin/firefox Compare this to the zip compression utility which also lives in /usr/bin: [david@dmw ~]$ ls -s /usr/bin/zip 84 /usr/bin/zip The zip program is 10 and a half times as large for a much smaller set of functions and requirements. Thus the firefox program in /usr/bin is either a shell script or it makes heavy use of ancillary files to break up its function. The former is the case as can be seen by opening it in a text editor like so: [david@dmw ~]$ view /usr/bin/firefox or, if you prefer something more graphical [david@dmw ~]$ gedit /usr/bin/firefox Either way, you can see the shell script instructions; according to comments by the author, the script sets up the environment "voodoo" to make Firefox work. This begins by determining the processor type using the uname -m command. On my Dell laptop that gives i686. For 64-bit architectures - with results like x86_64 or ia64 - an environment variable MOZ_LIB_DIR is set to directory /usr/lib64. For anything else, which includes processors like mine, the MOZ_LIB_DIR variable is set to directory /usr/lib. Scrolling down a bit you will then see the script then works out where your executable firefox program is as well as all the plugins and configuration items based on the directory $MOZ_LIB_DIR/firefox-3.0 - that is, from either /usr/lib/firefox-3.0 or /usr/lib64/firefox-3.0 depending on your processor. Please read on to see the size of the genuine Firefox 3.0 binary as well as how to get the source code and build it yourself, for your very own hardware. CONTINUED |
| < Next story in category | Previous story in the category > |
|---|
-
TAG 






