%general-entities; ]> $Date$ JS-&JS68-version; js68 Introduction to JS JS is Mozilla's JavaScript engine written in C. JS68 is taken from Firefox. &lfs10_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &js68-md5sum; Download size: &js68-size; Estimated disk space required: &js68-buildsize; Estimated build time: &js68-time; JS68 Dependencies Required , , , and Optional (with Clang), , and (for documentation) User Notes: Installation of JS If you are upgrading JS68 from a previously installed old version, save all work and exit your GNOME Session if you have one running. Replacing the JS68 binary will cause the GNOME Shell to crash and return you to your display manager or TTY. After installing the new version, if GNOME Shell still doesn't work, reinstall . Unlike most other packages in BLFS, the instructions below require you to untar firefox-&JS68-version;esr.tar.xz and change into the firefox-&JS68-version; folder. Extracting the tarball will reset the permissions of the current directory to 0755 if you have permission to do that. If you do this in a directory where the sticky bit is set, such as /tmp it will end with error messages: tar: .: Cannot utime: Operation not permitted tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted tar: Exiting with failure status due to previous errors This does finish with non-zero status, but it does NOT mean there is a real problem. Do not untar as the root user in a directory where the sticky bit is set - that will unset it. Install JS by running the following commands: sed '21,+4d' -i js/moz.configure && mkdir obj && cd obj && CC=gcc CXX=g++ LLVM_OBJDUMP=/bin/false \ ../js/src/configure --prefix=/usr \ --with-intl-api \ --with-system-zlib \ --with-system-icu \ --disable-jemalloc \ --disable-debug-symbols \ --enable-readline \ --enable-unaligned-private-values && make This package does not come with a working test suite. Now, as the root user: make install && rm -v /usr/lib/libjs_static.ajs Command Explanations sed '21,+4d' js/moz.configure: Firefox building system searches for rustc and cargo. Since we are building the standalone JS engine instead of the entire browser, they are not actually used. Remove the reference to them so we can build JS68 without installed. CC=gcc CXX=g++: Upstream now prefers clang, override it like other Mozilla packages in BLFS book. LLVM_OBJDUMP=/bin/false: The firefox build system searches for llvm-objdump. Since we are building the standalone JS engine instead of the entire browser, they are not actually used. Override it so we can build JS68 without installed. --with-*: These parameters allow the build system to use system versions of the above libraries. 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 JS68. jemalloc causes a conflict with glibc. --disable-debug-symbols: Don't generate debug symbols since they are very large and most users won't need it. Remove it if you want to debug JS68. --enable-unaligned-private-values: This switch allows the code using JS68 not to align all pointers in the same way JS68 does. requires JS68 to be built with this switch. rm -v /usr/lib/libjs_static.ajs: Remove a large static library which is not used by any BLFS package. Contents Installed Programs Installed Libraries Installed Directories js68 and js68-config libmozjs-68.so /usr/include/mozjs-68 Short Descriptions js68 provides a command line interface to the JavaScript engine. js68 js68-config is used to find the JS compiler and linker flags. js68-config libmozjs-68.so contains the Mozilla JavaScript API functions. libmozjs-68.so