source: general/genlib/js91.xml@ 60caf48

11.2 11.3 12.0 12.1 12.2 gimp3 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/for-12.3 xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/xf86-video-removal
Last change on this file since 60caf48 was b5b1af68, checked in by Xi Ruoyao <xry111@…>, 3 years ago

update to JS91 (#15368)

  • js-78 -> js-91.6.0
  • gjs-1.70.1 -> gjs-1.71.90: it's a development release, but works fine

with GNOME 41

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