Build Instructions for NSS 3.2.1 Release
Newsgroup: mozilla.dev.tech.cryptoThe instructions that follow describe how to build the standalone NSS libraries without the BSAFE library.
For detailed information about the NSS 3.2.1 release, see NSS 3.2.1 Release Notes.
To build NSS with the RSA BSAFE Crypto-C library, first follow the instructions at Build Instructions for NSS Using RSA BSAFE Crypto-C, then continue with the instructions on this page.
Important: Before you build NSS, you should be familiar with the Mozilla CVS system; see source code via CVS for details.
NSPR Version: NSS 3.2.1 is compatible with NSPR 4.0 and higher versions. However, NSPR 4.1.1 and higher provide better performance than earlier versions.
Notes on New Build Instructions
Build Instructions for All Platforms
Testing
It is now possible to build all of NSS (including NSPR and DBM) entirely
with coreconf; that is, without using the mozilla browser's make system.
Notes on New Build Instructions
It is no longer necessary to check out mozilla/config, mozilla/client.mk, or any other parts of the browser to build NSS and its dependencies.
It is no longer necessary to define any MOZ_* environment variables.
On Windows, it is not necessary to use nmake or cygwin or MKS tools to build NSS, NSPR, or DBM. Netscape's wintools gmake is sufficient for all these. NT's command prompt works OK too, provided you use backslashes instead of slashes in the appropriate places in the steps below.
Note re DBM: Using the instructions given here to build NSS 3.2.1 will not produce identical files to those released in ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_2_RTM/. This is because the new instructions use mozilla's version of DBM, and the released binaries use Netscape's private version of DBM. The two versions of DBM are compatible.
Platforms and gcc versions: The build instructions that follow have been tested on the following platforms with the indicated versions of the GNU C compiler (gcc). The instructions have not yet been tested on any 64-bit platforms.
Platform | AIX | HP-UX | Linux | Windows | Compaq Tru64 | Solaris |
gcc version | ???? | ???? | 2.91.66 (egcs-1.1.2) | ???? | ???? | 2.95.2 |
If you successfully build NSS with a version of gccnot listed above, please let us know the version and platform you used.
Previous build instructions: For the build instructions used with the previous release, see Build Instructions for the NSS 3.2 Release.
The following new build instructions should work for all platforms (with some platform-specific changes as noted).
Build Instructions for All Platforms
Before you begin: for Windows, if you haven't before, get Netscape's "wintools" as explained in 2.1 Requirements.
- Set environment variables:
- For Windows, set OS_TARGET to be either WINNT or WIN95 in the environment
- For Windows, make your PATH include the directory that contains Netscape's wintools (special gmake, shmsdos, etc.)
- If you want a non-debug optimized build, set BUILD_OPT=1 in your environment. Otherwise, you get a debug build. On Windows, if you want a debug build with the system's debug RTL libraries, set USE_DEBUG_RTL=1 in your environment.
- On Unix platforms, except Alpha/OSF1, if you want a build for the system's 64-bit ABI, set USE_64=1 in your environment. By default, NSS builds for the 32-bit environment on all platforms except Alpha/OSF1.
- Set the environment variable CVSROOT to :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
- To build with gcc on platforms other than Linux and Windows, you need to
set two more environment variables:
NS_USE_GCC=1
NO_MDUPDATE=1 - For Windows, make sure the environment variable HOME is set to the name of a writable directory, and does not end with a slash or backslash, e.g. c:/home
- For IRIX, you can set two variables:
Set USE_N32 to 1 if you want the build to generate n32 binaries. Default is to generate o32 binaries. This is mutually exclusive with the use of USE_64 (as documented).
Set USE_PTHREADS to 1 if you want to use the IRIX pthreads implementation for threads. The default is to use IRIX sprocs for threads.
- cvs login (if you haven't before).
- Do the following CVS checkouts. Note: CVS always takes forward slashes,
even on Windows.
cvs co -r NSPRPUB_RELEASE_4_1_1 mozilla/nsprpub cvs co -r NSS_3_2_1_RTM mozilla/dbm mozilla/security/coreconf cvs co -r NSS_3_2_1_RTM mozilla/security/nss mozilla/security/dbm
- Build NSPR, DBM, and NSS:
cd mozilla/security/nss (or, on Windows, cd mozilla\security\nss)
gmake nss_build_all
Once you have successfully built NSS, see NSS 3.2 Test Suite for information on testing your build.
Testing