NSPR-4.20

#### Beyond Linux® From Scratch - Version 2019-02-27

### Chapter 9. General Libraries

- Prev

  npth-1.6

- Next

  PCRE-8.42

- Up
- Home

# NSPR-4.20

## Introduction to NSPR

Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions.

This package is known to build and work properly using an LFS-8.4 platform.

### Package Information

- Download (HTTP): https://archive.mozilla.org/pub/nspr/releases/v4.20/src/nspr-4.20.tar.gz

- Download MD5 sum: 1c198c7e73f6b0e2bb9153a644ba246b

- Download size: 1.1 MB

- Estimated disk space required: 10 MB

- Estimated build time: less than 0.1 SBU

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/nspr

## Installation of NSPR

Install NSPR by running the following commands:

    cd nspr                                                     &&
    sed -ri 's#^(RELEASE_BINS =).*#\1#' pr/src/misc/Makefile.in &&
    sed -i 's#$(LIBRARY) ##'            config/rules.mk         &&

    ./configure --prefix=/usr \
                --with-mozilla \
                --with-pthreads \
                $([ $(uname -m) = x86_64 ] && echo --enable-64bit) &&
    make

The testsuite is designed for testing changes to nss or nspr and is not particularly useful for checking a released version (e.g. it needs to be run on a non-optimized build with both nss and nspr directories existing alongside each other). For further details, see the User Notes for nss at http://wiki.linuxfromscratch.org/blfs/wiki/nss

Now, as the `root` user:

    make install

## Command Explanations

sed -ri 's#^(RELEASE_BINS =).*#\1#' pr/src/misc/Makefile.in: This sed disables installing two unneeded scripts.

sed -i 's#$(LIBRARY) ##' config/rules.mk: This sed disables installing the static libraries.

`--with-mozilla`: This parameter adds Mozilla support to the libraries (required if you want to build any other Mozilla products and link them to these libraries).

`--with-pthreads`: This parameter forces use of the system pthread library.

`$([ $(uname -m) = x86_64 ] && echo --enable-64bit)`: The --enable-64bit parameter is required on an x86_64 system to prevent configure failing with a claim that this is a system without pthread support. The [ $(uname -m) = x86_64 ] test ensures it has no effect on a 32 bit system.

## Contents

Installed Programs: nspr-config
Installed Libraries: libnspr4.so, libplc4.so and libplds4.so
Installed Directories: /usr/include/nspr

### Short Descriptions

nspr-config | provides compiler and linker options to other packages that use NSPR.
`libnspr4.so` | contains functions that provide platform independence for non-GUI operating system facilities such as threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management and shared library linking.
`libplc4.so` | contains functions that implement many of the features offered by libnspr4
`libplds4.so` | contains functions that provide data structures.

Last updated on 2019-02-15 15:01:29 -0600

- Prev

  npth-1.6

- Next

  PCRE-8.42

- Up
- Home