 |
 |
|
 |
 |
 |
Building the Mozilla client on Unix platforms
Last modified: Tue Feb 16 12:03:19 PST 1999
1. Introduction
2. Other Unix Build pages
3. Requirements
4. Get the Code
5. Build the Lizard
6. After the Build
7. Common Problems
Perhaps you are interested in building classic Mozilla, before the
fall of the old layout engine, and the rise of the new. If so, the
Classic Mozilla Build document
is what you're looking for.
What this document is: A guide to building the Mozilla application.
This includes:
- A listing of the development tools you will need to build Mozilla.
- A sample set of commands to build Mozilla using the Autoconf
build system.
If you're looking for documentation on developing features or fixing bugs,
the Mozilla
Technical Documents or
Library
are probably what you're looking for.
Your hardware should be equal to, or better than:
32 MB RAM, 128 MB swap (64 MB RAM recommended)
The following software should be installed:
There are two principal ways of manually getting the code,
ftp and
CVS.
CVS will provide the most current code for building, but is
slower than ftp. Ftp drops are generally produced once per month,
and are known to compile on some machine, somewhere.
# Manually pull the right source
setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
cvs co SeaMonkeyEditor
or
# Automagically do the pull; this will pull branches if needed.
setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
cvs co mozilla/client.mk
gmake -f mozilla/client.mk checkout
This should pull all the right source for building the viewer and apprunner.
5.1 Manually drive the build
cd mozilla
# Configure the build, putting objects in the source tree.
#
# For configure options, run "./configure --help".
# The level of nspr and thread support will depend on the OS.
# If you specified USE_PTHREADS when building NSPR, you'll
# need to add "--with-pthreads"; we continue with the
# Redhat/Linux example below:
./configure --with-nspr=/usr/local/nspr --with-pthreads --enable-editor --enable-debug
# Building on more than one OS? Create an external object tree:
#
# mkdir obj-`./build/autoconf/config.guess`
# cd obj-`./build/autoconf/config.guess`
#
# ../configure --with-nspr=/usr/local/nspr --with-pthreads --enable-editor --enable-debug
gmake depend
gmake
Once you have configured, you only have to run
configure if you add
or remove Makefile.in files (cvs update can do this! beware!). The list
of makefiles is in mozilla/allmakefiles.sh
If a Makefile.in file is changed (not added or deleted), you only have
to run ./config.status.
If you change configure.in, cd to mozilla, and run
autoconf.
This generates a new configure script. (When
you checkin configure.in, cvs will run autoconf and check in a new
configure script for you).
5.2 Automated build
# (this should find the client.mk-built NSPR libraries).
# One-liner for the above manual step.
# Note: client.mk seems to be falling behind, try manual steps above first.
gmake -f mozilla/client.mk build
-
cd obj*/dist/bin and you should see links to the objects you
need to run: viewer and apprunner.
- On most unixen
LD_LIBRARY_PATH must be set to wherever
the necessary libraries are (the same directory as the executables, in this
case).
- On HP-UX, the equivalent environment variable is
SHLIB_PATH.
- On AIX, the equivalent environment variable is
LIBPATH.
- Set
MOZILLA_HOME to the directory the binary resides in
(the absolute, not relative, path) as well.
- Update your tree by re-checking out the source, e.g. repeating the initial checkout process.
- Make sure
$LD_LIBRARY_PATH includes the
paths to your NSPR and GTK libraries.
(For instance, you might set it to .:../../nspr/lib).
- Having more than one installation of gtk can cause problems
(i.e. if you compile one version yourself and upgrade by
installing an rpm). You'll probably need to remove the older libraries
and gtk-config script.
- Not setting
MOZILLA_HOME causes a crash upon startup.
If you run the executables from anywhere
other than obj*/dist/bin, you must set the environment variable
MOZILLA_HOME
to point to the absolute path of the dist/bin directory.
- I'm sure there are bound to be others. Send
me mail.
|
 |
 |