source: general/genlib/js91.xml@ 342453f

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 xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since 342453f was 0adb684, checked in by Ken Moffat <ken@…>, 2 years ago

Update for firefox-91.7.1 and js91.7.1.

The js code is unchanged.

  • Property mode set to 100644
File size: 10.7 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 js91 use same version
8 <!ENTITY ff91-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 ff91-version "&JS91-version;"> -->
12
13<!-- <!ENTITY ff91-version "&firefox-version;">-->
14 <!ENTITY js91-download-http "&mozilla-http;/firefox/releases/&JS91-version;esr/source/firefox-&JS91-version;esr.source.tar.xz">
15 <!ENTITY js91-download-ftp " ">
16 <!ENTITY js91-md5sum "5bed22ca5921850b0fe250c512945f6f">
17 <!ENTITY js91-size "364 MB">
18 <!ENTITY js91-buildsize "3.1 GB (38 MB installed after removing 36MB static lib)">
19 <!ENTITY js91-time "2.4 SBU (with parallelism=4)">
20]>
21
22<sect1 id="js91" xreflabel="JS-&JS91-version;">
23 <?dbhtml filename="js91.html"?>
24
25 <sect1info>
26 <date>$Date$</date>
27 </sect1info>
28
29 <title>JS-&JS91-version;</title>
30
31 <indexterm zone="js91">
32 <primary sortas="a-js91">js91</primary>
33 </indexterm>
34
35 <sect2 role="package">
36 <title>Introduction to JS</title>
37
38 <para>
39 <application>JS</application> (also referred as
40 <application>SpiderMonkey</application>) is Mozilla's JavaScript and
41 WebAssembly Engine, written in C++ and Rust.
42 In BLFS, the source code of JS is taken from Firefox.
43 </para>
44
45 &lfs111_checked;
46
47 <bridgehead renderas="sect3">Package Information</bridgehead>
48 <itemizedlist spacing="compact">
49 <listitem>
50 <para>
51 Download (HTTP): <ulink url="&js91-download-http;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download (FTP): <ulink url="&js91-download-ftp;"/>
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download MD5 sum: &js91-md5sum;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download size: &js91-size;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated disk space required: &js91-buildsize;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Estimated build time: &js91-time;
77 </para>
78 </listitem>
79 </itemizedlist>
80<!--
81 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
82 <itemizedlist spacing="compact">
83 <listitem>
84 <para>
85 Required patch:
86 <ulink url="&patch-root;/js-&JS91-version;-python_3_10-1.patch"/>
87 </para>
88 </listitem>
89 </itemizedlist>
90-->
91 <bridgehead renderas="sect3">JS91 Dependencies</bridgehead>
92
93 <bridgehead renderas="sect4">Required</bridgehead>
94 <para role="required">
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;/js91"/>
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-&JS91-version;esr.tar.xz</filename> and
119 change into the <filename>firefox-&JS91-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
132tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
133tar: 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 <para>
146 Apply a patch to allow building this package with Python-3.10 or
147 later:
148 </para>
149
150<screen><userinput>patch -Np1 -i ../js-&JS91-version;-python_3_10-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
164 <para>
165 Compiling the C++ code respects $MAKEFLAGS and defaults to 'j1',
166 the rust code will use all processors.
167 </para>
168 </note>
169
170
171<screen><userinput>mkdir obj &amp;&amp;
172cd obj &amp;&amp;
173
174CC=gcc CXX=g++ \
175sh ../js/src/configure.in --prefix=/usr \
176 --with-intl-api \
177 --with-system-zlib \
178 --with-system-icu \
179 --disable-jemalloc \
180 --disable-debug-symbols \
181 --enable-readline &amp;&amp;
182make</userinput></screen>
183
184 <para>
185 To run the JS test suite, issue:
186 <command>make -C js/src check-jstests
187 JSTESTS_EXTRA_ARGS="--timeout 300 --wpt=disabled"</command>.
188 It's recommended to redirect the output into a log.
189 <!-- recheck when ICU gets upgraded -->
190 Because we are building with system ICU, more than one hundred tests
191 (out of a total of more than 40,000) are known to fail.
192 </para>
193 <para>
194 To run the JIT test suite, issue:
195 <command>make -C js/src check-jit-test
196 JITTEST_EXTRA_ARGS="--timeout 300"</command>.
197 </para>
198
199 <caution>
200 <para>
201 An issue in the installation process causes any running program which
202 links to JS91 shared library (for example, GNOME Shell) to crash if
203 JS91 is upgraded or reinstalled. To work around this issue, remove
204 the old version of the JS91 shared library before installation:
205 </para>
206
207<screen role="root"><userinput>rm -fv /usr/lib/libmozjs-91.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/js91-config</userinput></screen>
217
218 </sect2>
219
220 <!-- Several gjs-1.65.90 tests fail with js91. 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 <command>sh ../js/src/configure.in</command>:
234 <filename>configure.in</filename> is actually a shell script, but
235 the executable bit is not set in its permission mode so it's needed
236 to explicitly run it with <command>sh</command>.
237 </para>
238
239 <para>
240 <parameter>--with-intl-api</parameter>: This enables the
241 internationalization functions required by
242 <application>Gjs</application>.
243 </para>
244
245 <para>
246 <parameter>--with-system-*</parameter>: These parameters allow the build system
247 to use system versions of the above libraries. These are required for
248 stability.
249 </para>
250
251 <para>
252 <parameter>--enable-readline</parameter>: This switch enables Readline
253 support in the JS shell.
254 </para>
255
256 <para>
257 <parameter>--disable-jemalloc</parameter>: This switch disables the
258 internal memory allocator used in JS91. jemalloc is only intended for
259 the Firefox browser environment. For other applications using JS91,
260 if JS91 uses jemalloc, the application may crash as items allocated
261 in jemalloc allocator are freed on system (glibc) allocator.
262 </para>
263
264 <para>
265 <parameter>--disable-debug-symbols</parameter>: Don't generate debug
266 symbols since they are very large and most users won't need it. Remove
267 it if you want to debug JS91.
268 </para>
269
270 <para>
271 <command>rm -v /usr/lib/libjs_static.ajs</command>: Remove a large
272 static library which is not used by any BLFS package.
273 </para>
274
275 <para>
276 <command>sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js91-config</command>:
277 Prevent <command>js91-config</command> from using buggy CFLAGS.
278 </para>
279
280 </sect2>
281
282 <sect2 role="content">
283 <title>Contents</title>
284
285 <segmentedlist>
286 <segtitle>Installed Programs</segtitle>
287 <segtitle>Installed Libraries</segtitle>
288 <segtitle>Installed Directories</segtitle>
289
290 <seglistitem>
291 <seg>
292 js91 and js91-config
293 </seg>
294 <seg>
295 libmozjs-91.so
296 </seg>
297 <seg>
298 /usr/include/mozjs-91
299 </seg>
300 </seglistitem>
301 </segmentedlist>
302
303 <variablelist>
304 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
305 <?dbfo list-presentation="list"?>
306 <?dbhtml list-presentation="table"?>
307
308 <varlistentry id="js91-js91">
309 <term><command>js91</command></term>
310 <listitem>
311 <para>
312 provides a command line interface to the
313 <application>JavaScript</application> engine
314 </para>
315 <indexterm zone="js91 js91">
316 <primary sortas="b-js91">js91</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="js91-config">
322 <term><command>js91-config</command></term>
323 <listitem>
324 <para>
325 is used to find the JS compiler and linker flags
326 </para>
327 <indexterm zone="js91 js91-config">
328 <primary sortas="b-js91-config">js91-config</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
333 <varlistentry id="libmozjs-91">
334 <term><filename class="libraryfile">libmozjs-91.so</filename></term>
335 <listitem>
336 <para>
337 contains the Mozilla JavaScript API functions
338 </para>
339 <indexterm zone="js91 libmozjs-91">
340 <primary sortas="c-libmozjs91">libmozjs-91.so</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344 </variablelist>
345 </sect2>
346
347</sect1>
Note: See TracBrowser for help on using the repository browser.