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