source: general/genlib/js91.xml@ 67cd226

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 67cd226 was 67cd226, checked in by Douglas R. Reno <renodr@…>, 20 months ago

Package updates:

Update to gc-8.2.2
Update to mozjs-91.13.0
Update to libqalculate-4.3.0
Update to nghttp2-1.49.0

  • Property mode set to 100644
File size: 12.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 "63f84a77e8266256428c77895ecfb481">
17 <!ENTITY js91-size "362 MB">
18 <!ENTITY js91-buildsize "3.0 GB (38 MB installed after removing 33MB static lib)">
19 <!ENTITY js91-time "2.1 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 &lfs112_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 </para>
99
100 <bridgehead renderas="sect4">Recommended</bridgehead>
101 <para role="recommended">
102 <!-- If clang is installed, it will be used instead of gcc.
103 gcc does not work for 32-bit system w/o -msse2 -mfpmath=sse:
104 https://bugzilla.mozilla.org/show_bug.cgi?id=1729459 -->
105 <xref linkend="llvm"/> (with <application>Clang</application>,
106 required for 32-bit system without SSE2 capability)
107 </para>
108
109 <!-- It seems nasm is only used for aarch64-win64. -->
110 <!--bridgehead renderas="sect4">Optional</bridgehead>
111 <para role="optional">
112 <xref linkend="nasm"/>
113 </para-->
114
115 <para condition="html" role="usernotes">
116 User Notes: <ulink url="&blfs-wiki;/js91"/>
117 </para>
118 </sect2>
119
120 <sect2 role="installation">
121 <title>Installation of JS</title>
122
123 <note>
124 <para>
125 Unlike most other packages in BLFS, the instructions below require you
126 to untar <filename>firefox-&JS91-version;esr.tar.xz</filename> and
127 change into the <filename>firefox-&JS91-version;</filename> folder.
128 </para>
129
130 <para>
131 Extracting the tarball
132 will reset the permissions of the current directory to 0755 if you
133 have permission to do that. If you do this in a directory where
134 the sticky bit is set, such
135 as <filename class="directory">/tmp</filename> it will end with error
136 messages:
137 </para>
138
139<literallayout>tar: .: Cannot utime: Operation not permitted
140tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
141tar: Exiting with failure status due to previous errors
142</literallayout>
143
144 <para>
145 This does finish with non-zero status, but it does
146 <emphasis>NOT</emphasis> mean there is a real problem.
147 Do not untar as the <systemitem class="username">root</systemitem> user
148 in a directory where the sticky bit is set - that will unset it.
149 </para>
150
151 </note>
152<!-- not needed when using clang. Upstream bug at
153 https://bugzilla.mozilla.org/show_bug.cgi?id=1729459
154
155 <para>
156 If building on a 32 bit machine, the following sed works around an issue
157 with an incompatible <quote>double</quote> type in one header file:
158 </para>
159
160<screen><userinput>case "$(uname -m)" in
161 i?86) sed -e '/typedef[ ]*double/s/double/long double/' \
162 -i modules/fdlibm/src/math_private.h ;;
163esac</userinput></screen>
164-->
165 <para>
166 Install <application>JS</application> by running the following
167 commands:
168 </para>
169
170 <note>
171 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
172 href="../../xincludes/mozshm.xml"/>
173
174 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
175 href="../../xincludes/mozconfigure.xml"/>
176
177 <para>
178 Compiling the C++ code respects $MAKEFLAGS and defaults to 'j1',
179 the rust code will use all processors.
180 </para>
181 </note>
182
183
184<screen><userinput>mkdir obj &amp;&amp;
185cd obj &amp;&amp;
186
187sh ../js/src/configure.in --prefix=/usr \
188 --with-intl-api \
189 --with-system-zlib \
190 --with-system-icu \
191 --disable-jemalloc \
192 --disable-debug-symbols \
193 --enable-readline &amp;&amp;
194make</userinput></screen>
195
196 <para>
197 To run the JS test suite, issue:
198 <command>make -C js/src check-jstests
199 JSTESTS_EXTRA_ARGS="--timeout 300 --wpt=disabled"</command>.
200 It's recommended to redirect the output into a log.
201 <!-- recheck when ICU gets upgraded -->
202 Because we are building with system ICU, more than one hundred tests
203 (out of a total of more than 40,000) are known to fail.
204 </para>
205 <para>
206 To run the JIT test suite, issue:
207 <command>make -C js/src check-jit-test
208 JITTEST_EXTRA_ARGS="--timeout 300"</command>.
209 </para>
210
211 <caution>
212 <para>
213 An issue in the installation process causes any running program which
214 links to JS91 shared library (for example, GNOME Shell) to crash if
215 JS91 is upgraded or reinstalled. To work around this issue, remove
216 the old version of the JS91 shared library before installation:
217 </para>
218
219<screen role="root"><userinput>rm -fv /usr/lib/libmozjs-91.so</userinput></screen>
220 </caution>
221
222 <para>
223 Now, as the <systemitem class="username">root</systemitem> user:
224 </para>
225
226<screen role="root"><userinput>make install &amp;&amp;
227rm -v /usr/lib/libjs_static.ajs &amp;&amp;
228sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js91-config</userinput></screen>
229
230 </sect2>
231
232 <!-- Several gjs-1.65.90 tests fail with js91. Not sure why.
233 OTOH an "otherwise" GNOME-3.36 environment works fine. -->
234
235 <sect2 role="commands">
236 <title>Command Explanations</title>
237
238 <para>
239 <command>sh ../js/src/configure.in</command>:
240 <filename>configure.in</filename> is actually a shell script, but
241 the executable bit is not set in its permission mode so it's needed
242 to explicitly run it with <command>sh</command>.
243 </para>
244
245 <para>
246 <parameter>--with-intl-api</parameter>: This enables the
247 internationalization functions required by
248 <application>Gjs</application>.
249 </para>
250
251 <para>
252 <parameter>--with-system-*</parameter>: These parameters allow the build system
253 to use system versions of the above libraries. These are required for
254 stability.
255 </para>
256
257 <para>
258 <parameter>--enable-readline</parameter>: This switch enables Readline
259 support in the JS shell.
260 </para>
261
262 <para>
263 <parameter>--disable-jemalloc</parameter>: This switch disables the
264 internal memory allocator used in JS91. jemalloc is only intended for
265 the Firefox browser environment. For other applications using JS91,
266 if JS91 uses jemalloc, the application may crash as items allocated
267 in jemalloc allocator are freed on system (glibc) allocator.
268 </para>
269
270 <para>
271 <parameter>--disable-debug-symbols</parameter>: Don't generate debug
272 symbols since they are very large and most users won't need it. Remove
273 it if you want to debug JS91.
274 </para>
275
276 <para>
277 <command>rm -v /usr/lib/libjs_static.ajs</command>: Remove a large
278 static library which is not used by any BLFS package.
279 </para>
280
281 <para>
282 <command>sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js91-config</command>:
283 Prevent <command>js91-config</command> from using buggy CFLAGS.
284 </para>
285
286 <para>
287 <option><envar>CC=gcc CXX=g++</envar></option>: BLFS used to
288 prefer to use gcc and g++ instead of upstream's defaults of the
289 <application>clang</application> programs. With the release of
290 gcc-12 the build takes longer with gcc and g++, primarily because
291 of extra warnings, and is bigger. Pass these environment variables
292 to the configure script if you wish to continue to use gcc, g++
293 (by exporting them and unset them after the installation, or simply
294 prepending them before the
295 <command>sh ../js/src/configure.in</command> command). If you are
296 building on a 32-bit system, also see below.
297 </para>
298
299 <para>
300 <option><envar>CXXFLAGS="-msse2 -mfpmath=sse"</envar></option>:
301 Use SSE2 instead of 387 for double-precision floating-point
302 operations. It's needed by GCC to satisfy the expectations of
303 upstream (Mozilla) developers with floating-point arithmetic.
304 Use it if you are building this package on a 32-bit system with
305 GCC (if Clang is not installed or GCC is explicitly specified).
306 Note that this will cause JS to crash on a processor without SSE2
307 capability. If you are running the system on such an old processor,
308 Clang is strictly needed. This setting is not needed on 64-bit
309 systems because all 64-bit x86 processors support SSE2 and the 64-bit
310 compilers (both Clang and GCC) use SSE2 by default.
311 </para>
312 </sect2>
313
314 <sect2 role="content">
315 <title>Contents</title>
316
317 <segmentedlist>
318 <segtitle>Installed Programs</segtitle>
319 <segtitle>Installed Libraries</segtitle>
320 <segtitle>Installed Directories</segtitle>
321
322 <seglistitem>
323 <seg>
324 js91 and js91-config
325 </seg>
326 <seg>
327 libmozjs-91.so
328 </seg>
329 <seg>
330 /usr/include/mozjs-91
331 </seg>
332 </seglistitem>
333 </segmentedlist>
334
335 <variablelist>
336 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
337 <?dbfo list-presentation="list"?>
338 <?dbhtml list-presentation="table"?>
339
340 <varlistentry id="js91-js91">
341 <term><command>js91</command></term>
342 <listitem>
343 <para>
344 provides a command line interface to the
345 <application>JavaScript</application> engine
346 </para>
347 <indexterm zone="js91 js91">
348 <primary sortas="b-js91">js91</primary>
349 </indexterm>
350 </listitem>
351 </varlistentry>
352
353 <varlistentry id="js91-config">
354 <term><command>js91-config</command></term>
355 <listitem>
356 <para>
357 is used to find the JS compiler and linker flags
358 </para>
359 <indexterm zone="js91 js91-config">
360 <primary sortas="b-js91-config">js91-config</primary>
361 </indexterm>
362 </listitem>
363 </varlistentry>
364
365 <varlistentry id="libmozjs-91">
366 <term><filename class="libraryfile">libmozjs-91.so</filename></term>
367 <listitem>
368 <para>
369 contains the Mozilla JavaScript API functions
370 </para>
371 <indexterm zone="js91 libmozjs-91">
372 <primary sortas="c-libmozjs91">libmozjs-91.so</primary>
373 </indexterm>
374 </listitem>
375 </varlistentry>
376 </variablelist>
377 </sect2>
378
379</sect1>
Note: See TracBrowser for help on using the repository browser.