source: general/genlib/js78.xml@ 6c815f9

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 6c815f9 was 07c5c2ec, checked in by Ken Moffat <ken@…>, 3 years ago

Update to firefox-78.12.0 and JS-78.12.0.

  • Property mode set to 100644
File size: 10.6 KB
Line 
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 different 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 "9bcaaa0482703530c5d6429ad8862148">
17 <!ENTITY js78-size "319 MB">
18 <!ENTITY js78-buildsize "3.0 GB (36 MB installed after removing 34MB static lib)">
19 <!ENTITY js78-time "2.6 SBU (on a 4-core machine with parallelism=4)">
20]>
21
22<sect1 id="js78" xreflabel="js78-&ff78-version;">
23 <?dbhtml filename="js78.html"?>
24
25 <sect1info>
26 <date>$Date$</date>
27 </sect1info>
28
29 <title>JS-&ff78-version;</title>
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
43 &lfs101_checked;
44
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>
78<!--
79 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
80 <itemizedlist spacing="compact">
81 <listitem>
82 <para>
83 Required patch:
84 <ulink url="&patch-root;/js78-code_coverage-1.patch"/>
85 </para>
86 </listitem>
87 </itemizedlist>
88-->
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"/>
97 <!-- Should we list llvm here? -->
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
117 to untar <filename>firefox-&ff78-version;esr.tar.xz</filename> and
118 change into the <filename>firefox-&ff78-version;</filename> folder.
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
131tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
132tar: 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<!-- It's merged in 78.2.0.
145 <para>
146 Apply a patch required by <xref linkend="gjs"/>:
147 </para>
148
149<screen><userinput>patch -Np1 -i ../js78-code_coverage-1.patch</userinput></screen>
150-->
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"/>
162
163 <para>
164 Compiling the C++ code respects $MAKEFLAGS and defaults to 'j1',
165 the rust code will use all processors.
166 </para>
167 </note>
168
169
170<screen><userinput>mkdir obj &amp;&amp;
171cd obj &amp;&amp;
172
173CC=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 &amp;&amp;
181make</userinput></screen>
182
183 <para>
184 To run the 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 <!-- ken: removed "are known to fail' becasue there are
190 4096 known failures, these icu items are unexpected failures
191 and I found the wording confusing -->
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
194 setup and locale. -->
195 Depending on the machine, either
196 ten or fourteen JS tests related to locale and timezone fail,
197 because of an issue with recent versions of <xref linkend="icu"/>.
198 </para>
199 <para>
200 To run the JIT test suite, issue:
201 <command>make -C js/src check-jit-test
202 JITTEST_EXTRA_ARGS="--timeout 300"</command>. One test may fail.
203 </para>
204
205 <caution>
206 <para>
207 An issue in the installation process causes any running program which
208 links to JS78 shared library (for example, GNOME Shell) to crash if
209 JS78 is upgraded or reinstalled. To work around this issue, remove
210 the old version of the JS78 shared library before installation:
211 </para>
212
213<screen role="root"><userinput>rm -fv /usr/lib/libmozjs-78.so</userinput></screen>
214 </caution>
215
216 <para>
217 Now, as the <systemitem class="username">root</systemitem> user:
218 </para>
219
220<screen role="root"><userinput>make install &amp;&amp;
221rm -v /usr/lib/libjs_static.ajs &amp;&amp;
222sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</userinput></screen>
223
224 </sect2>
225
226 <!-- Several gjs-1.65.90 tests fail with js78. Not sure why.
227 OTOH an "otherwise" GNOME-3.36 environment works fine. -->
228
229 <sect2 role="commands">
230 <title>Command Explanations</title>
231
232 <para>
233 <envar>CC=gcc CXX=g++</envar>: Upstream now prefers
234 <application>clang</application>, override it like other Mozilla
235 packages in BLFS book.
236 </para>
237
238 <para>
239 <parameter>--with-*</parameter>: These parameters allow the build system
240 to use system versions of the above libraries. These are required for
241 stability.
242 </para>
243
244 <para>
245 <parameter>--enable-readline</parameter>: This switch enables Readline
246 support in the JS shell.
247 </para>
248
249 <para>
250 <parameter>--disable-jemalloc</parameter>: This switch disables the
251 internal memory allocator used in JS78. jemalloc is only intended for
252 the Firefox browser environment. For other applications using JS78,
253 if JS78 uses jemalloc, the application may crash as items allocated
254 in jemalloc allocator are freed on system (glibc) allocator.
255 </para>
256
257 <para>
258 <parameter>--disable-debug-symbols</parameter>: Don't generate debug
259 symbols since they are very large and most users won't need it. Remove
260 it if you want to debug JS78.
261 </para>
262
263 <para>
264 <command>rm -v /usr/lib/libjs_static.ajs</command>: Remove a large
265 static library which is not used by any BLFS package.
266 </para>
267
268 <para>
269 <command>sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</command>:
270 Prevent <command>js78-config</command> from using buggy CFLAGS.
271 </para>
272
273 </sect2>
274
275 <sect2 role="content">
276 <title>Contents</title>
277
278 <segmentedlist>
279 <segtitle>Installed Programs</segtitle>
280 <segtitle>Installed Libraries</segtitle>
281 <segtitle>Installed Directories</segtitle>
282
283 <seglistitem>
284 <seg>
285 js78 and js78-config
286 </seg>
287 <seg>
288 libmozjs-78.so
289 </seg>
290 <seg>
291 /usr/include/mozjs-78
292 </seg>
293 </seglistitem>
294 </segmentedlist>
295
296 <variablelist>
297 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
298 <?dbfo list-presentation="list"?>
299 <?dbhtml list-presentation="table"?>
300
301 <varlistentry id="js6-js78">
302 <term><command>js78</command></term>
303 <listitem>
304 <para>
305 provides a command line interface to the
306 <application>JavaScript</application> engine
307 </para>
308 <indexterm zone="js78 js78">
309 <primary sortas="b-js78">js78</primary>
310 </indexterm>
311 </listitem>
312 </varlistentry>
313
314 <varlistentry id="js78-config">
315 <term><command>js78-config</command></term>
316 <listitem>
317 <para>
318 is used to find the JS compiler and linker flags
319 </para>
320 <indexterm zone="js78 js78-config">
321 <primary sortas="b-js78-config">js78-config</primary>
322 </indexterm>
323 </listitem>
324 </varlistentry>
325
326 <varlistentry id="libmozjs-78">
327 <term><filename class="libraryfile">libmozjs-78.so</filename></term>
328 <listitem>
329 <para>
330 contains the Mozilla JavaScript API functions
331 </para>
332 <indexterm zone="js78 libmozjs-78">
333 <primary sortas="c-libmozjs78">libmozjs-78.so</primary>
334 </indexterm>
335 </listitem>
336 </varlistentry>
337 </variablelist>
338 </sect2>
339
340</sect1>
Note: See TracBrowser for help on using the repository browser.