Firefox LogoThunderbird LogoSure, building Firefox from sources is easy. Just choose the right compiler, put a good ~/.mozconfig file in place, check out the sources, and build it. Here's what I needed to do on my Solaris Express Developer Edition 01/08 box.

Get the right compiler. The compiler that comes with SXDE 01/08 will croak on the beloved jsinterp.c file as mentioned in the Solaris Build Prerequisites page. The problem is trying to figure out how to patch the compiler. It turns out that the Sun Studio compiler that comes with SXDE is not done via pkgadd, so you cannot really do much to patch it. Instead, you can just grab a Sun Studio Express build and untar it. Then, point your $PATH to the bin directory where you untarred it and set up some other environment variables as well. Here's some cut/paste from my ~/.bash_profile. I was lazy and didn't make a variable to hold the path to the place I unpacked the Sun Studio Express build. If I end up grabbing another build, I'll be more diligent and will probably just set up a symbolic link to point to my latest SUNWspro. Note also that I use JDS CBE, so that by the time this code snippet is used, PATH has already been modified to find all the JDS CBE goodies (e.g., like a 'make' that works):

export PATH=$HOME/StudioExpress/2008-02-25.ii/SUNWspro/bin:/usr/local/bin:$PATH:
/usr/openwin/bin:/usr/demo/jds/bin:/usr/sfw/bin:/usr/sbin:/opt/sfw/bin:/usr/bin/
X11
export CC=$HOME/StudioExpress/2008-02-25.ii/SUNWspro/bin/cc
export CXX=$HOME/StudioExpress/2008-02-25.ii/SUNWspro/bin/CC
export LDFLAGS="-L$HOME/StudioExpress/2008-02-25.ii/SUNWspro/lib -L/usr/sfw/lib -R$HOME/StudioExpress/2008-02-25.ii/SUNWspro/lib:/usr/sfw/lib"
export LD_LIBRARY_PATH=$HOME/StudioExpress/2008-02-25.ii/SUNWspro/lib

Create your ~/.mozconfig file. Yeah, easy, once someone else gives you the contents of their file:

ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --enable-application=browser
. $topsrcdir/browser/config/mozconfig 

Checkout the Firefox sources:

cvs -d :pserver:anonymous-AT-cvs-mirror.mozilla-DOT-org:/cvsroot co mozilla/client.mk
cvs -d :pserver:anonymous-AT-cvs-mirror.mozilla-DOT-org:/cvsroot co mozilla/browser/config/mozconfig
cd mozilla
make -f client.mk checkout

Build it. This worked fine on my box. Took about an hour:

make -f client.mk build > make.out 2>&1

Run it. Here's what I do:

~/mozilla/dist/bin/firefox

If you want to build Thunderbird, everything is pretty much the same, except you need to do a global substitution of 'browser' with 'mail' in your .mozconfig file and your cvs checkout.

That's it. I wrote this more for me than you, but I hope you find it helpful. ;-)

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by wwalker