The Linux distillery
Bringing the world of Linux to you, David cuts through the tech and shows you how it works and how to use it, in terms that apply to any distro. RSS
Technology news and Jobs arrow The Linux distillery arrow Make Firefox fly: building from a minefield of source
Make Firefox fly: building from a minefield of source E-mail
by David M Williams   
Monday, 30 June 2008
By default, Firefox will download programs into the Download folder under your home directory. Move back there and then unpack the tarball.

[david@dmw firefox-3.0]$ cd ~
[david@dmw ~]$ cd Download
[david@dmw Download]$ ls
firefox-3.0-source.tar.bz2
[david@dmw Download]$ tar -xjf firefox-3.0-source.tar.bz2
[david@dmw Download]$ ls
firefox-3.0-source.tar.bz2 mozilla


Note the tar -xjf command may take a while to complete - it is unpacking a 36Mb tarball after all. You will now have a new subdirectory called mozilla. This contains all the source code for the Firefox web browser. Hoorah for open source software.

To kick of the process for your computer, execute a local script called configure, like this:

[david@dmw Download]$ cd mozilla
[david@dmw mozilla]$ ./configure -enable-application=browser


You will see pages of text fly by, where the configure script checks just what your system offers. This will include messages like

checking host system type... i686-pc-linux-gnu
checking whether the C compiler (gcc) works... yes
checking for as... /usr/bin/as
checking that static assertion macros used in autoconf tests work... yes
checking for 64-bit OS... no
checking for ANSI C header files... yes
checking for int16_t... yes
checking for trouble comparing to zero near std::operator!=()... no


and so on. Before long you will notice the messages change; instead of checking, they are now creating:

creating widget/Makefile
creating xpfe/components/windowds/Makefile
creating toolkit/crashreporter/Makefile
creating jpeg/Makefile


and on and on. Loads of new Makefiles have been constructed, all crafted specifically to match your very computer and its capabilities. The Makefiles contain all the instructions necessary to build each and every module and component that makes up Firefox. Although there are a large number, you can kick off the whole kablooey with just one simple command

[david@dmw mozilla]$ make

The make command will open the Makefile in the current directory, and begin compiling and building code as per the instructions contained within. Now go watch a movie, go out for dinner, or go up a level on World of Warcraft: this is going to take a while!

Finally, finally, the process will complete. Let's check out the new executable. A new folder, dist (for "distributable" or "distribution"), has been made and in here we find the executable files and libraries.

[david@dmw mozilla]$ cd dist/bin
[david@dmw bin]$ ls -s firefox-bin
12 firefox-bin
[david@dmw bin]$ ./firefox-bin &
[23050]


The new Firefox starts up! You'll know it is different right away from the previously installed version because it is brandished 'Minefield' and not 'Firefox.'

What's going on?

CONTINUED



 
< Next story in category   Previous story in the category >
iTWire user statistics Visitors last 30 days
Suscribers
904,266
13,751
#1 independent technology news advertise here
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff
Subscribe to our free e-newsletter