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