[fcce89bc] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[433336d] | 7 | <!-- for when firefox and js78 use same version
|
---|
[fcce89bc] | 8 | <!ENTITY ff78-version "&firefox-version;">
|
---|
[433336d] | 9 | and when they are on differnet versions - keep this for when
|
---|
| 10 | we have moved to next firefox-esr (ff-91) and JS has not moved -->
|
---|
[72d8eb3] | 11 | <!ENTITY ff78-version "&firefox-version;">
|
---|
[fcce89bc] | 12 | <!ENTITY js78-download-http "&mozilla-http;/firefox/releases/&ff78-version;esr/source/firefox-&ff78-version;esr.source.tar.xz">
|
---|
| 13 | <!ENTITY js78-download-ftp " ">
|
---|
[72d8eb3] | 14 | <!ENTITY js78-md5sum "04858eb8431d560e62189878d1abb7bd">
|
---|
| 15 | <!ENTITY js78-size "316 MB">
|
---|
| 16 | <!ENTITY js78-buildsize "2.9 GB (36 MB installed after removing 35MB static lib)">
|
---|
| 17 | <!ENTITY js78-time "2.2 SBU (with parallelism = 4)">
|
---|
[fcce89bc] | 18 | ]>
|
---|
| 19 |
|
---|
| 20 | <sect1 id="js78" xreflabel="js78-&ff78-version;">
|
---|
| 21 | <?dbhtml filename="js78.html"?>
|
---|
| 22 |
|
---|
| 23 | <sect1info>
|
---|
| 24 | <othername>$LastChangedBy$</othername>
|
---|
| 25 | <date>$Date$</date>
|
---|
| 26 | </sect1info>
|
---|
| 27 |
|
---|
| 28 | <title>JS-&ff78-version;</title>
|
---|
| 29 |
|
---|
| 30 | <indexterm zone="js78">
|
---|
| 31 | <primary sortas="a-js78">js78</primary>
|
---|
| 32 | </indexterm>
|
---|
| 33 |
|
---|
| 34 | <sect2 role="package">
|
---|
| 35 | <title>Introduction to JS</title>
|
---|
| 36 |
|
---|
| 37 | <para>
|
---|
| 38 | <application>JS</application> is Mozilla's JavaScript engine
|
---|
| 39 | written in C. JS78 is taken from Firefox.
|
---|
| 40 | </para>
|
---|
| 41 |
|
---|
[6b063cc3] | 42 | &lfs101_checked;
|
---|
| 43 |
|
---|
[fcce89bc] | 44 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 45 | <itemizedlist spacing="compact">
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>
|
---|
| 48 | Download (HTTP): <ulink url="&js78-download-http;"/>
|
---|
| 49 | </para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>
|
---|
| 53 | Download (FTP): <ulink url="&js78-download-ftp;"/>
|
---|
| 54 | </para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>
|
---|
| 58 | Download MD5 sum: &js78-md5sum;
|
---|
| 59 | </para>
|
---|
| 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
| 62 | <para>
|
---|
| 63 | Download size: &js78-size;
|
---|
| 64 | </para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>
|
---|
| 68 | Estimated disk space required: &js78-buildsize;
|
---|
| 69 | </para>
|
---|
| 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
| 72 | <para>
|
---|
| 73 | Estimated build time: &js78-time;
|
---|
| 74 | </para>
|
---|
| 75 | </listitem>
|
---|
| 76 | </itemizedlist>
|
---|
[5d0f53c0] | 77 | <!--
|
---|
[fcce89bc] | 78 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 79 | <itemizedlist spacing="compact">
|
---|
| 80 | <listitem>
|
---|
| 81 | <para>
|
---|
| 82 | Required patch:
|
---|
| 83 | <ulink url="&patch-root;/js78-code_coverage-1.patch"/>
|
---|
| 84 | </para>
|
---|
| 85 | </listitem>
|
---|
| 86 | </itemizedlist>
|
---|
[5d0f53c0] | 87 | -->
|
---|
[fcce89bc] | 88 | <bridgehead renderas="sect3">JS78 Dependencies</bridgehead>
|
---|
| 89 |
|
---|
| 90 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 91 | <para role="required">
|
---|
| 92 | <xref linkend="autoconf213"/>,
|
---|
| 93 | <xref linkend="icu"/>,
|
---|
| 94 | <xref linkend="rust"/>, and
|
---|
| 95 | <xref linkend="which"/>
|
---|
[5d0f53c0] | 96 | <!-- Should we list llvm here? -->
|
---|
[fcce89bc] | 97 | </para>
|
---|
| 98 |
|
---|
| 99 | <!-- It seems nasm is only used for aarch64-win64. -->
|
---|
| 100 | <!--bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 101 | <para role="optional">
|
---|
| 102 | <xref linkend="nasm"/>
|
---|
| 103 | </para-->
|
---|
| 104 |
|
---|
| 105 | <para condition="html" role="usernotes">
|
---|
| 106 | User Notes: <ulink url="&blfs-wiki;/js78"/>
|
---|
| 107 | </para>
|
---|
| 108 | </sect2>
|
---|
| 109 |
|
---|
| 110 | <sect2 role="installation">
|
---|
| 111 | <title>Installation of JS</title>
|
---|
| 112 |
|
---|
| 113 | <note>
|
---|
| 114 | <para>
|
---|
| 115 | Unlike most other packages in BLFS, the instructions below require you
|
---|
| 116 | to untar <filename>firefox-&ff78-version;esr.tar.xz</filename> and
|
---|
| 117 | change into the <filename>firefox-&ff78-version;</filename> folder.
|
---|
| 118 | </para>
|
---|
| 119 |
|
---|
| 120 | <para>
|
---|
| 121 | Extracting the tarball
|
---|
| 122 | will reset the permissions of the current directory to 0755 if you
|
---|
| 123 | have permission to do that. If you do this in a directory where
|
---|
| 124 | the sticky bit is set, such
|
---|
| 125 | as <filename class="directory">/tmp</filename> it will end with error
|
---|
| 126 | messages:
|
---|
| 127 | </para>
|
---|
| 128 |
|
---|
| 129 | <literallayout>tar: .: Cannot utime: Operation not permitted
|
---|
| 130 | tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
|
---|
| 131 | tar: Exiting with failure status due to previous errors
|
---|
| 132 | </literallayout>
|
---|
| 133 |
|
---|
| 134 | <para>
|
---|
| 135 | This does finish with non-zero status, but it does
|
---|
| 136 | <emphasis>NOT</emphasis> mean there is a real problem.
|
---|
| 137 | Do not untar as the <systemitem class="username">root</systemitem> user
|
---|
| 138 | in a directory where the sticky bit is set - that will unset it.
|
---|
| 139 | </para>
|
---|
| 140 |
|
---|
| 141 | </note>
|
---|
| 142 |
|
---|
[5d0f53c0] | 143 | <!-- It's merged in 78.2.0.
|
---|
[fcce89bc] | 144 | <para>
|
---|
| 145 | Apply a patch required by <xref linkend="gjs"/>:
|
---|
| 146 | </para>
|
---|
| 147 |
|
---|
| 148 | <screen><userinput>patch -Np1 -i ../js78-code_coverage-1.patch</userinput></screen>
|
---|
[5d0f53c0] | 149 | -->
|
---|
[fcce89bc] | 150 | <para>
|
---|
| 151 | Install <application>JS</application> by running the following
|
---|
| 152 | commands:
|
---|
| 153 | </para>
|
---|
| 154 |
|
---|
| 155 | <note>
|
---|
| 156 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 157 | href="../../xincludes/mozshm.xml"/>
|
---|
| 158 |
|
---|
| 159 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 160 | href="../../xincludes/mozconfigure.xml"/>
|
---|
| 161 | </note>
|
---|
| 162 |
|
---|
| 163 |
|
---|
| 164 | <screen><userinput>mkdir obj &&
|
---|
| 165 | cd obj &&
|
---|
| 166 |
|
---|
| 167 | CC=gcc CXX=g++ \
|
---|
| 168 | ../js/src/configure --prefix=/usr \
|
---|
| 169 | --with-intl-api \
|
---|
| 170 | --with-system-zlib \
|
---|
| 171 | --with-system-icu \
|
---|
| 172 | --disable-jemalloc \
|
---|
| 173 | --disable-debug-symbols \
|
---|
| 174 | --enable-readline &&
|
---|
| 175 | make</userinput></screen>
|
---|
| 176 |
|
---|
| 177 | <para>
|
---|
[6a5717b] | 178 | To run JS test suite, issue:
|
---|
| 179 | <command>make -C js/src check-jstests
|
---|
| 180 | JSTESTS_EXTRA_ARGS="--timeout 300 --wpt=disabled"</command>.
|
---|
| 181 | It's recommended to redirect the output into a log.
|
---|
| 182 | <!-- recheck when ICU gets upgraded -->
|
---|
[393517d3] | 183 | <!-- ken: removed "are known to fail' becasue there are
|
---|
| 184 | 4096 known failures, these icu items are unexpected failures
|
---|
| 185 | and I found the wording confusing -->
|
---|
[27a7cc5] | 186 | <!-- ken : For 78.4 this was 14 failures, I changed it to 10 for 78.5.
|
---|
| 187 | On that machine with 78.6 still 10, but on another 14, both with similar
|
---|
| 188 | setup and locale. -->
|
---|
| 189 | Depending on the machine, either
|
---|
| 190 | ten or fourteen JS tests related to locale and timezone fail,
|
---|
[6a5717b] | 191 | because of an issue in <xref linkend="icu"/>.
|
---|
[393517d3] | 192 | To run the JIT test suite, issue:
|
---|
[fcce89bc] | 193 | <command>make -C js/src check-jit-test
|
---|
[393517d3] | 194 | JITTEST_EXTRA_ARGS="--timeout 300"</command>. Again, a few tests
|
---|
| 195 | may show as unexpected failures.
|
---|
[fcce89bc] | 196 | </para>
|
---|
| 197 |
|
---|
[55a63862] | 198 | <caution>
|
---|
| 199 | <para>
|
---|
| 200 | An issue in the installation process causes any running program which
|
---|
| 201 | links to JS78 shared library (for example, GNOME Shell) to crash if
|
---|
| 202 | JS78 is upgraded or reinstalled. To work around this issue, remove
|
---|
| 203 | the old version of the JS78 shared library before installation:
|
---|
| 204 | </para>
|
---|
[4af651f7] | 205 |
|
---|
| 206 | <screen role="root"><userinput>rm -fv /usr/lib/libmozjs-78.so</userinput></screen>
|
---|
[55a63862] | 207 | </caution>
|
---|
[4af651f7] | 208 |
|
---|
[fcce89bc] | 209 | <para>
|
---|
| 210 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 211 | </para>
|
---|
| 212 |
|
---|
| 213 | <screen role="root"><userinput>make install &&
|
---|
| 214 | rm -v /usr/lib/libjs_static.ajs &&
|
---|
[84283d45] | 215 | sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</userinput></screen>
|
---|
[fcce89bc] | 216 |
|
---|
| 217 | </sect2>
|
---|
| 218 |
|
---|
| 219 | <!-- Several gjs-1.65.90 tests fail with js78. Not sure why.
|
---|
| 220 | OTOH an "otherwise" GNOME-3.36 environment works fine. -->
|
---|
| 221 |
|
---|
| 222 | <sect2 role="commands">
|
---|
| 223 | <title>Command Explanations</title>
|
---|
| 224 |
|
---|
| 225 | <para>
|
---|
| 226 | <envar>CC=gcc CXX=g++</envar>: Upstream now prefers
|
---|
| 227 | <application>clang</application>, override it like other Mozilla
|
---|
| 228 | packages in BLFS book.
|
---|
| 229 | </para>
|
---|
| 230 |
|
---|
| 231 | <para>
|
---|
| 232 | <parameter>--with-*</parameter>: These parameters allow the build system
|
---|
| 233 | to use system versions of the above libraries. These are required for
|
---|
| 234 | stability.
|
---|
| 235 | </para>
|
---|
| 236 |
|
---|
| 237 | <para>
|
---|
| 238 | <parameter>--enable-readline</parameter>: This switch enables Readline
|
---|
| 239 | support in the JS shell.
|
---|
| 240 | </para>
|
---|
| 241 |
|
---|
| 242 | <para>
|
---|
| 243 | <parameter>--disable-jemalloc</parameter>: This switch disables the
|
---|
[50d9ed6] | 244 | internal memory allocator used in JS78. jemalloc is only intended for
|
---|
| 245 | the Firefox browser environment. For other applications using JS78,
|
---|
| 246 | if JS78 uses jemalloc, the application may crash as items allocated
|
---|
| 247 | in jemalloc allocator are freed on system (glibc) allocator.
|
---|
[fcce89bc] | 248 | </para>
|
---|
| 249 |
|
---|
| 250 | <para>
|
---|
| 251 | <parameter>--disable-debug-symbols</parameter>: Don't generate debug
|
---|
| 252 | symbols since they are very large and most users won't need it. Remove
|
---|
| 253 | it if you want to debug JS78.
|
---|
| 254 | </para>
|
---|
| 255 |
|
---|
| 256 | <para>
|
---|
| 257 | <command>rm -v /usr/lib/libjs_static.ajs</command>: Remove a large
|
---|
| 258 | static library which is not used by any BLFS package.
|
---|
| 259 | </para>
|
---|
| 260 |
|
---|
| 261 | <para>
|
---|
[84283d45] | 262 | <command>sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</command>:
|
---|
| 263 | Prevent <command>js78-config</command> from using buggy CFLAGS.
|
---|
[fcce89bc] | 264 | </para>
|
---|
| 265 |
|
---|
| 266 | </sect2>
|
---|
| 267 |
|
---|
| 268 | <sect2 role="content">
|
---|
| 269 | <title>Contents</title>
|
---|
| 270 |
|
---|
| 271 | <segmentedlist>
|
---|
| 272 | <segtitle>Installed Programs</segtitle>
|
---|
| 273 | <segtitle>Installed Libraries</segtitle>
|
---|
| 274 | <segtitle>Installed Directories</segtitle>
|
---|
| 275 |
|
---|
| 276 | <seglistitem>
|
---|
| 277 | <seg>
|
---|
| 278 | js78 and js78-config
|
---|
| 279 | </seg>
|
---|
| 280 | <seg>
|
---|
| 281 | libmozjs-78.so
|
---|
| 282 | </seg>
|
---|
| 283 | <seg>
|
---|
| 284 | /usr/include/mozjs-78
|
---|
| 285 | </seg>
|
---|
| 286 | </seglistitem>
|
---|
| 287 | </segmentedlist>
|
---|
| 288 |
|
---|
| 289 | <variablelist>
|
---|
| 290 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 291 | <?dbfo list-presentation="list"?>
|
---|
| 292 | <?dbhtml list-presentation="table"?>
|
---|
| 293 |
|
---|
| 294 | <varlistentry id="js6-js78">
|
---|
| 295 | <term><command>js78</command></term>
|
---|
| 296 | <listitem>
|
---|
| 297 | <para>
|
---|
| 298 | provides a command line interface to the
|
---|
[4c24eb0a] | 299 | <application>JavaScript</application> engine
|
---|
[fcce89bc] | 300 | </para>
|
---|
| 301 | <indexterm zone="js78 js78">
|
---|
| 302 | <primary sortas="b-js78">js78</primary>
|
---|
| 303 | </indexterm>
|
---|
| 304 | </listitem>
|
---|
| 305 | </varlistentry>
|
---|
| 306 |
|
---|
| 307 | <varlistentry id="js78-config">
|
---|
| 308 | <term><command>js78-config</command></term>
|
---|
| 309 | <listitem>
|
---|
| 310 | <para>
|
---|
[4c24eb0a] | 311 | is used to find the JS compiler and linker flags
|
---|
[fcce89bc] | 312 | </para>
|
---|
| 313 | <indexterm zone="js78 js78-config">
|
---|
| 314 | <primary sortas="b-js78-config">js78-config</primary>
|
---|
| 315 | </indexterm>
|
---|
| 316 | </listitem>
|
---|
| 317 | </varlistentry>
|
---|
| 318 |
|
---|
| 319 | <varlistentry id="libmozjs-78">
|
---|
| 320 | <term><filename class="libraryfile">libmozjs-78.so</filename></term>
|
---|
| 321 | <listitem>
|
---|
| 322 | <para>
|
---|
[4c24eb0a] | 323 | contains the Mozilla JavaScript API functions
|
---|
[fcce89bc] | 324 | </para>
|
---|
| 325 | <indexterm zone="js78 libmozjs-78">
|
---|
| 326 | <primary sortas="c-libmozjs78">libmozjs-78.so</primary>
|
---|
| 327 | </indexterm>
|
---|
| 328 | </listitem>
|
---|
| 329 | </varlistentry>
|
---|
| 330 | </variablelist>
|
---|
| 331 | </sect2>
|
---|
[4c24eb0a] | 332 |
|
---|
[fcce89bc] | 333 | </sect1>
|
---|