JS-38.2.1

Introduction to JS

JS is Mozilla's JavaScript engine written in C.

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

Package Information

Additional Downloads

JS38 Dependencies

Required

Autoconf-2.13, ICU-59.1, NSPR-4.17, Python-2.7.14, and Zip-3.0

Optional

Doxygen-1.8.13

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

Installation of JS

[Warning]

Warning

The tarball extracts to mozjs-38.0.0, rather than what is listed in the download section.

First, apply a patch to fix the build and to prevent segmentation faults.

patch -Np1 -i ../js38-38.2.1-upstream_fixes-2.patch

Install JS by running the following commands:

cd js/src &&
autoconf2.13 &&

./configure --prefix=/usr       \
            --with-intl-api     \
            --with-system-zlib  \
            --with-system-ffi   \
            --with-system-nspr  \
            --with-system-icu   \
            --enable-threadsafe \
            --enable-readline   &&
make

This package does not come with a working test suite.

Now, as the root user:

make install &&
pushd /usr/include/mozjs-38 &&
for link in `find . -type l`; do
    header=`readlink $link`
    rm -f $link
    cp -pv $header $link
    chmod 644 $link
done &&
popd

Command Explanations

autoconf213: This command regenerates the configure script with the changes from the patch.

--with-*: These parameters allow the build system to use system versions of the above libriares. These are required for stability.

--enable-readline: This switch enables Readline support in the JS shell.

--enable-threadsafe: This switch enables support for multiple threads at one time. This increases performance as well as stability.

for link in...: This command replaces links to the build directory, with files copied from the build directory.

Contents

Installed Programs: js38 and js38-config
Installed Libraries): libmozjs-38.so and libjs_static.ajs
Installed Directories: /usr/include/mozjs-38

Short Descriptions

js38

provides a command line interface to the JavaScript engine.

js38-config

is used to find the JS compiler and linker flags.

libmozjs-38.so

contains the Mozilla JavaScript API functions.

Last updated on 2017-10-15 13:23:25 -0500