source: general/genlib/js78.xml@ 5156197

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 5156197 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

  • Property mode set to 100644
File size: 10.4 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 "b81fc212639eab6a20c0a262e2eee302">
17 <!ENTITY js78-size "320 MB">
18 <!ENTITY js78-buildsize "3.0 GB (36 MB installed after removing 34MB static lib)">
19 <!ENTITY js78-time "2.5 SBU (on a 4-core machine)">
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 </note>
163
164
165<screen><userinput>mkdir obj &amp;&amp;
166cd obj &amp;&amp;
167
168CC=gcc CXX=g++ \
169../js/src/configure --prefix=/usr \
170 --with-intl-api \
171 --with-system-zlib \
172 --with-system-icu \
173 --disable-jemalloc \
174 --disable-debug-symbols \
175 --enable-readline &amp;&amp;
176make</userinput></screen>
177
178 <para>
179 To run JS test suite, issue:
180 <command>make -C js/src check-jstests
181 JSTESTS_EXTRA_ARGS="--timeout 300 --wpt=disabled"</command>.
182 It's recommended to redirect the output into a log.
183 <!-- recheck when ICU gets upgraded -->
184 <!-- ken: removed "are known to fail' becasue there are
185 4096 known failures, these icu items are unexpected failures
186 and I found the wording confusing -->
187 <!-- ken : For 78.4 this was 14 failures, I changed it to 10 for 78.5.
188 On that machine with 78.6 still 10, but on another 14, both with similar
189 setup and locale. -->
190 Depending on the machine, either
191 ten or fourteen JS tests related to locale and timezone fail,
192 because of an issue in <xref linkend="icu"/>.
193 To run the JIT test suite, issue:
194 <command>make -C js/src check-jit-test
195 JITTEST_EXTRA_ARGS="--timeout 300"</command>. Again, a few tests
196 may show as unexpected failures.
197 </para>
198
199 <caution>
200 <para>
201 An issue in the installation process causes any running program which
202 links to JS78 shared library (for example, GNOME Shell) to crash if
203 JS78 is upgraded or reinstalled. To work around this issue, remove
204 the old version of the JS78 shared library before installation:
205 </para>
206
207<screen role="root"><userinput>rm -fv /usr/lib/libmozjs-78.so</userinput></screen>
208 </caution>
209
210 <para>
211 Now, as the <systemitem class="username">root</systemitem> user:
212 </para>
213
214<screen role="root"><userinput>make install &amp;&amp;
215rm -v /usr/lib/libjs_static.ajs &amp;&amp;
216sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</userinput></screen>
217
218 </sect2>
219
220 <!-- Several gjs-1.65.90 tests fail with js78. Not sure why.
221 OTOH an "otherwise" GNOME-3.36 environment works fine. -->
222
223 <sect2 role="commands">
224 <title>Command Explanations</title>
225
226 <para>
227 <envar>CC=gcc CXX=g++</envar>: Upstream now prefers
228 <application>clang</application>, override it like other Mozilla
229 packages in BLFS book.
230 </para>
231
232 <para>
233 <parameter>--with-*</parameter>: These parameters allow the build system
234 to use system versions of the above libraries. These are required for
235 stability.
236 </para>
237
238 <para>
239 <parameter>--enable-readline</parameter>: This switch enables Readline
240 support in the JS shell.
241 </para>
242
243 <para>
244 <parameter>--disable-jemalloc</parameter>: This switch disables the
245 internal memory allocator used in JS78. jemalloc is only intended for
246 the Firefox browser environment. For other applications using JS78,
247 if JS78 uses jemalloc, the application may crash as items allocated
248 in jemalloc allocator are freed on system (glibc) allocator.
249 </para>
250
251 <para>
252 <parameter>--disable-debug-symbols</parameter>: Don't generate debug
253 symbols since they are very large and most users won't need it. Remove
254 it if you want to debug JS78.
255 </para>
256
257 <para>
258 <command>rm -v /usr/lib/libjs_static.ajs</command>: Remove a large
259 static library which is not used by any BLFS package.
260 </para>
261
262 <para>
263 <command>sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</command>:
264 Prevent <command>js78-config</command> from using buggy CFLAGS.
265 </para>
266
267 </sect2>
268
269 <sect2 role="content">
270 <title>Contents</title>
271
272 <segmentedlist>
273 <segtitle>Installed Programs</segtitle>
274 <segtitle>Installed Libraries</segtitle>
275 <segtitle>Installed Directories</segtitle>
276
277 <seglistitem>
278 <seg>
279 js78 and js78-config
280 </seg>
281 <seg>
282 libmozjs-78.so
283 </seg>
284 <seg>
285 /usr/include/mozjs-78
286 </seg>
287 </seglistitem>
288 </segmentedlist>
289
290 <variablelist>
291 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
292 <?dbfo list-presentation="list"?>
293 <?dbhtml list-presentation="table"?>
294
295 <varlistentry id="js6-js78">
296 <term><command>js78</command></term>
297 <listitem>
298 <para>
299 provides a command line interface to the
300 <application>JavaScript</application> engine
301 </para>
302 <indexterm zone="js78 js78">
303 <primary sortas="b-js78">js78</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry id="js78-config">
309 <term><command>js78-config</command></term>
310 <listitem>
311 <para>
312 is used to find the JS compiler and linker flags
313 </para>
314 <indexterm zone="js78 js78-config">
315 <primary sortas="b-js78-config">js78-config</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319
320 <varlistentry id="libmozjs-78">
321 <term><filename class="libraryfile">libmozjs-78.so</filename></term>
322 <listitem>
323 <para>
324 contains the Mozilla JavaScript API functions
325 </para>
326 <indexterm zone="js78 libmozjs-78">
327 <primary sortas="c-libmozjs78">libmozjs-78.so</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331 </variablelist>
332 </sect2>
333
334</sect1>
Note: See TracBrowser for help on using the repository browser.