Home page of this blog

Friday, January 22, 2010

Building Firefox 3.6 from source in Ubuntu Karmic optimized for core2

Step 1:

Get the firefox source from

ftp://ftp.mozilla.org/pub/firefox/releases/3.6/source/firefox-3.6.source.tar.bz2

to extract

tar xjvf firefox-3.6.source.tar.bz2

Step 2:

Get all the build dependencies installed

sudo apt-get build-dep firefox

sudo apt-get install libiw-dev libnotify-dev


Step 3:

Configure

Enter the directory where firefox got extracted (in my case mozilla-1.9.2)

change CFLAGS and CXXFLAGS in following to appropriate values based on your processor, see http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel for Intel processor and http://en.gentoo-wiki.com/wiki/Safe_Cflags/AMD for AMD

for example, for a core i7 processor

CFLAGS="-march=core2 -msse4 -mcx16 -msahf -O2 -pipe" CXXFLAGS="-march=core2 -msse4 -O2 pipe" ./configure --enable-application=browser --prefix=/usr/local


Step 4:


if you have core2 --> make -j2

if you have quad core --> make -j4


if you have core i7 --> make -j8

to time your build call like

time make -j8 or time make -j4 or time make -j2 for i7,quadcore or core2 respectively


Step 5:

sudo make install


Step 6:

to run firefox 3.6

Alt + F2 or from command line type

/usr/local/bin/firefox



No comments:

Post a Comment