Peter Djalaliev wrote:
Yeah,

I agree with David.  I don't know if there is a "make install" feature
in the NSS build system (I don't remember, I think I couldn't find one
when I first started using NSS).  I copy the header files and shared
libraries of my NSS builds manually to /usr/include and /usr/lib.

After you build NSS, you can find the include files of your NSS build
in:
mozilla/dist/public/nss (NSS header files)
mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ/include (NSPR header files)

the shared libraries of the NSS build in:
mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ/lib (both NSPR and NSS
shared libraries)

and the NSS binary executables in:
mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ/bin.

From there, you can copy them anywhere (I usually write a shell script
to do this) and configure the libpath, if need be.

David, Peter, thank you both for the reply.

The build system of NSS originated from Netscape's build system,
which predated the "configure; make; make test; make install"
sequence that we're familiar with now.  Our makefiles also have
an "install" target, but it has a different meaning: our "install"
means installing the headers, libraries, and programs in the
appropriate directories under mozilla/dist.

So right now you need to manually install the headers, libraries,
and programs in the directories you want.  If you install the
libraries in a directory other than /usr/lib, you usually need
to set the LD_LIBRARY_PATH environment variable.  You can avoid
that by installing the libraries in a directory that is
$ORIGIN/../lib, where $ORIGIN is the directory where the programs
are installed.  This is done here:
http://lxr.mozilla.org/security/source/security/nss/cmd/platlibs.mk#53
 53 ifeq ($(OS_ARCH), Linux)
 54 ifeq ($(USE_64), 1)
 55 EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib'
 56 else
 57 EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib'
 58 endif
 59 endif

For example, if you install certutil in /foo/bar/nss/bin and the
.so's in /foo/bar/nss/lib, then you only need to add /foo/bar/nss/bin
to your PATH; you don't need to set LD_LIBRARY_PATH.

The libraries you need to install are:
NSPR:
libnspr4.so
libplds4.so
libplc4.so

NSS: (Note the use of * for libfreebl -- some platforms have multiple
ones)
libfreebl*3.so
libfreebl*3.chk
libsoftokn3.so
libsoftokn3.chk
libnss3.so
libsmime3.so
libssl3.so
libnssckbi.so

Wan-Teh

_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to