[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-crypto
Subject:    revised build instructions for NSS 3.2
From:       Sean Cotter <cotter () netscape ! com>
Date:       2001-03-20 22:58:05
[Download RAW message or body]

Revised build instructions for NSS 3.2 are enclosed. These have been 
tested to some extent internally. We will post them to mozilla.org when 
it's clear that they work reliably for other people too.

Please direct any questions or comments to the newsgroup.

- Sean

["buildnss_32.html" (text/html)]

<HTML>
<HEAD>
<TITLE>Build Instructions for NSS 3.2</TITLE>
</HEAD>

<center>
<h2>Build Instructions for NSS 3.2 Release</h2>
<i><FONT SIZE="-1">

Newsgroup: 
<A HREF="news://news.mozilla.org/netscape.public.mozilla.crypto">netscape.public.mozilla.crypto</A><BR>


Main technical contact: 
<A HREF="mailto:mcgreer@netscape.com?subject=NSS Build Feedback">Ian McGreer</A><BR>

Manager: 
<A HREF="mailto:wtc@netscape.com?subject=NSS Build Feedback">Wan-Teh \
Chang</A></FONT></i> </center>

<p>The instructions that follow describe 
how to build the standalone NSS libraries without the BSAFE library. 
These instructions have been tested on Unix and Windows. They will be updated as \
testing proceeds on other platforms.

<p>For detailed information about the NSS 3.2 release, see <a \
href="release_notes_32.html">NSS 3.2 Release Notes</a>.

<p>To build NSS with the RSA BSAFE Crypto-C library, first follow the instructions at \
 <A href="buildnss.html">Build Instructions for NSS Using RSA BSAFE Crypto-C</a>, 
then continue with the instructions on this page.

<p><b>Important:</b> Before you build NSS, you should be familiar with the Mozilla \
CVS system;  see <a href="http://www.mozilla.org/cvs.html">source code via CVS</a> \
for details.

<p><b>Perl Version:</b>You must be using Perl 5.004 or greater for the instructions \
given here to work correctly.

<p><b>NSPR Version:</b> NSS 3.2 is compatible with NSPR 4.0.1 or higher. We recommend \
using NSPR 4.1,  as shown in the build instructions below. However, it's possible to \
use other NSPR tags, such as  <tt>NSPRPUB_RELEASE_4_0_1</tt> or \
<tt>NSPRPUB_CLIENT_BRANCH</tt>.

<p><a href="#new">Notes on New Build Instructions</a><BR>
<a href="#build">Build Instructions for All Platforms</a><BR>
<a href="#tests">Basic Tests</a>

<P><hr>
<a NAME="new"><h3>Notes on New Build Instructions</h3></a>

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.

<p>It is no longer necessary to check out <tt>mozilla/config</tt>, \
<tt>mozilla/client.mk</tt>,  or any other parts of the browser to build NSS and its \
dependencies.

<p>It is no longer necessary to define any <tt>MOZ_*</tt> environment variables.

<p>On Windows, it is not necessary to use <tt>nmake</tt> or <tt>cygwin</tt> or MKS \
tools  to build NSS, NSPR, or DBM. Netscape's wintools <tt>gmake</tt> 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.

<p>NSS now builds with the GNU C compiler (<tt>gcc</tt>) (v 2.95.2) on Solaris.

<p><b>Note re DBM:</b> Using the instructions given here to build NSS 3.2 will not \
produce identical files to those released in <a \
href="ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_3_2_RTM/"> \
ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_3_2_RTM/</a>. 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.

<P><hr>
<a NAME="build"><h3>Build Instructions for All Platforms</h3></a>


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

<p>Before you begin: for Windows, if you haven't before, get Netscape's "wintools" as \
 explained in <a href="http://www.mozilla.org/build/win32.html#ss2.1">2.1 \
Requirements</a>.

<ol>
	<li>Set environment variables:
	<p><ol type=a>
		<li>For Windows, set <tt>OS_TARGET</tt> to be either <tt>WINNT</tt> or \
<tt>WIN95</tt> in the environment

		<li>For Windows, make your PATH include the directory that contains 
   Netscape's wintools (special <tt>gmake</tt>, <tt>shmsdos</tt>, etc.)

		<li>If you want a non-debug optimized build, set <tt>BUILD_OPT=1</tt> 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 <tt>USE_DEBUG_RTL=1</tt> in your \
environment.

		<li>On Unix platforms, except Alpha/OSF1, if you want a build for the 
system's 64-bit ABI, set <tt>USE_64=1</tt> in your environment.  By default, NSS
builds for the 32-bit environment on all platforms except Alpha/OSF1.

		<li>Set the environment variable <tt>CVSROOT</tt> to 
<tt>:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot</tt>

		<li>To build with <tt>gcc</tt> on platforms other than Linux and Windows, you need \
to set two more environment variables:

		<ul>
			<p><tt>NSS_USE_GCC=1<BR>
			NO_MDUPDATE=1</tt>
		</ul><p>
		<li>For windows, make sure the environment variable <tt>HOME</tt> is set to the \
name of a writable directory, and does not end with a slash or backslash, e.g. \
<tt>c:/home</tt><p>  </ol>
	<li><tt>cvs login</tt> (if you haven't before).<BR><BR>

	<li>Do the following CVS checkouts. Note: CVS always takes forward slashes,
even on Windows. 
	<ul>

	<pre>cvs co -r NSPRPUB_RELEASE_4_1 mozilla/nsprpub 
cvs co -r NSS_3_2_BASE mozilla/dbm mozilla/security/coreconf
cvs co -r NSS_3_2_BASE mozilla/security/nss mozilla/security/dbm
</pre>
	</ul><p>

	<li>Build NSPR, DBM, and NSS:<BR>

	<ul><tt>cd mozilla/security/nss</tt> (or, on Windows, <tt>cd \
mozilla\security\nss</tt>)<BR>  <tt>gmake nss_build_all</tt></ul>
</ol>

<p><hr>
<a NAME="tests"><h3>Basic Tests</h3></a>

Once you have successfully built NSS, follow these steps to test the core \
functionality of  the <a href="tools/certutil.html"><tt>certutil</tt></a> tool and \
the setup and use of a basic  SSL connection:

<ol>

	<li>Build NSS as described above and make sure that \
<tt>mozilla/dist/$(OBJDIR)/lib</tt> is in  your shared library search path, which is \
specified  by the <tt>LD_LIBRARY_PATH</tt> environment variable on most
      Unix platforms, by <tt>SHLIB_PATH</tt> on HP-UX, by <tt>LIBPATH</tt>
      on AIX, and by <tt>PATH</tt> on Windows.<br><br>

	<li><tt>cd mozilla/security/nss/cmd/SSLsample</tt><BR><BR>
	<li><tt>gmake</tt><BR><BR>
	<li>To create an SSL server certificate, you will need to include the host and \
domain names of the host you want to run the server on. For example, if your machine \
name is <tt>myhost.domain.com</tt>,  you would set the two variables as \
follows:<BR><BR> 

	<tt>setenv HOSTNAME myhost</tt> (on UNIX this is most likely set already)<BR> 
	<tt>setenv MYDOMAIN domain.com</tt><BR><BR>

	These variables must be set correctly for your SSL server to work.<BR><BR>

	<li><tt>sh gencerts<BR>
    	gencerts</tt> is a shell script that will generate a CA certificate, an SSL \
server certificate,  and an SSL client certificate.<BR><BR>

	<li>You are now ready to run the sample SSL server.  This is a sample command \
line:<BR><BR>

	<tt>server -n SampleSSLServerCert -p 8080 -d SampleCertDBs -w sample -c e \
-R</tt><BR><BR>

	<li>You can now connect to the server with client processes.  This is a sample \
command line:<BR><BR>  
	<tt>client -n SampleSSLClientCert -p 8080 -d SampleCertDBs -w sample -c 2 \
myhost.domain.com</tt>

</ol>

For instructions on running more extensive NSS tests, see <a href="testnss.html">NSS \
Test Suite</a>.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic