# Building Mozilla on Unix platforms

## Daniel Nunes, `leaf@netscape.com`

v 1.0, June 1998

How to build Mozilla on a Unix System.

## 1. Introduction

## 2. Building Mozilla

- 2.1 Get the Code
- 2.2 Requirements
- 2.3 Set up the Build Environment
- 2.4 Build the Lizard

## 3. Common Problems

## 1. Introduction

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 list of environment variables you will need to set before building.

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

There are two principal ways of getting the code, ftp and CVS. CVS will provide the least outdated code for building, but is slower than ftp.

## 2.2 Requirements

The following need to be installed:

- Motif 1.2 (2.1 recommended for RedHat Linux)
- GNU C/C++ compiler 2.7.2
- GNU make 3.74 or better
- Perl (or, if you have no Perl, then set `PERL=/bin/echo`)

Your hardware should be equal to, or better than:

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

## 2.3 Setup the Build Environment

The following environment variables need to be set: `

    MOZILLA_CLIENT=1
    MOZ_MEDIUM=1
    NO_SECURITY=1
    NO_MDUPDATE=1

` Optionally, you can set `BUILD_OPT=1` if you don't want a debug build.
Environment variables are set by the shell, and each shell may or may not have its own way of setting them. Type `man setenv` to find out how your shell sets variables, if you don't know already.

## 2.4 Run the build

Change to the directory you copied the source into (for example, `cd /builds`). If this directory was empty before you installed the source, there should be two directories here: `README` and `mozilla`. `

    cd mozilla
    gmake

`

## 3. Common Sticking Points

- My linker dies with this error: undefined reference to `_Xsetlocale'
  If this error occurs, you might have to recompile libX11.so with the -DX_LOCALE flag (thanks to Scott Lampert, fortunato@heavymetal.org). This problem stems from use of an older version of RedHat Motif. Moving to Motif 2.1 should resolve this. There are probably other problems with using the older versions of Motif, but i haven't encountered them.