# Building the Mozilla client on Unix platforms

## Daniel Nunes, `leaf@mozilla.org`

v 1.2, 1998-11-02

How to build Mozilla on a Unix System.

## 1. Introduction

## 2. Building Mozilla

- 2.1 Get the Code
- 2.2 Requirements
- 2.3 Build the Lizard
- 2.4 After the Build

## 3. Common Problems

## 1. Introduction

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:

1. A listing of the development tools you will need to build Mozilla.
2. 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.

## 2. Building Mozilla

Each of the following subsections describes, or gives references to descriptions of, the steps necessary to build Mozilla.

## 2.1 Get the Code

Eventually, there will be two principal ways of 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. For now, however, you must do the following to obtain the newest browser source:
`cvs co mozilla/nglayout.mk
cd mozilla
gmake -f nglayout.mk pull_all
`
This should pull all the right source.

## 2.2 Requirements

The following should be installed:

- Motif 1.2
- The native C/C++ compiler (or GNU C/C++ compiler 2.7.2 in lieu of the native compiler)
- GNU make 3.74 or better
- Perl5
- Autconf requirements, including NSPR.
- `LD_LIBRARY_PATH` must include the path to the NSPR shared objects.
  For most people, this means adding `/usr/local/nspr/lib` to `LD_LIBRARY_PATH` (either:
  `setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/local/nspr/lib`
  or
  `export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/nspr/lib` .
  If you get an error like "No such variable" then omit the `${LD_LIBRARY_PATH}:` part )

Your hardware should be equal to, or better than:

32 MB RAM, 128 MB swap (64 MB RAM recommended)

## 2.3 Build the Lizard

`autoconf
mkdir obj-`./build/autoconf/config.guess`
cd obj-`./build/autoconf/config.guess`
../configure --with-nspr=/usr/local/nspr --enable-toolkit=motif
gmake depend
gmake
`

## 2.4 After the build

- `cd dist/bin` and you should see links to the objects you need to run `main`.
- On most unixen LD_LIBRARY_PATH must be set to wherever the necessary libraries are.
  - On HP-UX, the equivalent environment variable is `SHLIB_PATH`.
  - On AIX, the equivalent environment variable is `LIBPATH`.

## 3. Common Sticking Points

- I'm sure there are bound to be some. Send me mail.