You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



Build Instructions for NSS 3.9 Release

Newsgroup: mozilla.dev.tech.crypto

The instructions that follow describe how to build the NSS 3.9 release.

For detailed information about the NSS 3.9 release, see NSS 3.9 Release Notes.

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.9 is compatible with NSPR 4.4.1 and higher versions.

Build Instructions for All Platforms
Testing


Build Instructions for All Platforms

The following new build instructions should work for all platforms (with some platform-specific changes as noted).

Before you begin: for Windows, if you haven't before, get Netscape's "wintools" as explained in 2.2 Software Installation.

  1. Set environment variables:
    1. For Windows, set OS_TARGET to be either WINNT or WIN95 in the environment
    2. For Windows, make your PATH include the directory that contains either the MKS Toolkit or Cygwin tools, followed by Netscape's wintools (special gmake, nsinstall, etc.)
    3. For Windows, if you use the MKS Toolkit, set the CONFIG_SHELL environment variable to the full pathname of MKS's sh.exe program. This is not necessary if you use Cygwin tools.
    4. 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.
    5. 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.
    6. Set the environment variable CVSROOT to :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
    7. To build with gcc on platforms other than Linux and Windows, you need to set two more environment variables:
      • NS_USE_GCC=1
    8. 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
    9. 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.

  2. cvs login (if you haven't before).

  3.  
  4. Do the following CVS checkouts. Note: CVS always takes forward slashes, even on Windows.
    • cvs co -r NSPR_4_4_1_RTM mozilla/nsprpub
      cvs co -r DBM_1_61_RTM mozilla/dbm mozilla/security/dbm
      cvs co -r NSS_3_9_RTM mozilla/security/coreconf mozilla/security/nss
  5. Build NSPR, DBM, and NSS:
    • cd mozilla/security/nss (or, on Windows, cd mozilla\security\nss)
      gmake nss_build_all
For information on troubleshooting the build system, see Troubleshooting NSS and JSS Build Systems.


Testing

Once you have successfully built NSS, see NSS 3.2 Test Suite for information on testing your build.