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