Introduction to JS

JS is Mozilla's JavaScript engine written in C.

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

Package Information

JS60 Dependencies


Autoconf-2.13, ICU-67.1, Python-2.7.18, Which-2.21, and Zip-3.0



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

Installation of JS

Install JS by running the following commands:



If you are compiling this package in chroot you must do two things. First, as the root user, ensure that /dev/shm is mounted. If you do not do this, the Python configury will fail with a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py. Run:

mountpoint /dev/shm >/dev/null ||
 mount -t tmpfs devshm /dev/shm

Second, either as the root user export the $SHELL environment variable using export SHELL=/bin/sh or else prepend SHELL=/bin/sh when running the configure command.

mkdir mozjs-build &&
cd    mozjs-build &&

../js/src/configure --prefix=/usr       \
                    --with-intl-api     \
                    --with-system-zlib  \
                    --with-system-icu   \
                    --disable-jemalloc  \
                    --enable-readline   &&

This package does not come with a working test suite.

Now, as the root user:

make install

Command Explanations

--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.

--disable-jemalloc: This switch disables the internal memory allocator used in JS60. jemalloc causes a conflict with glibc.


Installed Programs: js60 and js60-config
Installed Libraries: libmozjs-60.so and libjs_static.ajs
Installed Directories: /usr/include/mozjs-60

Short Descriptions


provides a command line interface to the JavaScript engine.


is used to find the JS compiler and linker flags.


contains the Mozilla JavaScript API functions.

Last updated on 2020-04-04 02:26:48 -0500