JS is Mozilla's JavaScript engine written in C.
This package is known to build and work properly using an LFS-8.1 platform.
Download (HTTP): https://people.mozilla.org/~sstangl/mozjs-38.2.1.rc0.tar.bz2
Download MD5 sum: cb602e21f5fc798b88163a3aa4e03e0a
Download size: 24 MB
Estimated disk space required: 896 MB
Estimated build time: 3.3 SBU
Autoconf-2.13, ICU-59.1, libffi-3.2.1, NSPR-4.16, Python-2.7.13, and Zip-3.0
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/js38
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
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.
Last updated on 2017-08-20 20:24:54 -0700