source: general/genlib/js78.xml@ 50d9ed6

10.1 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 50d9ed6 was 50d9ed6, checked in by Xi Ruoyao <xry111@…>, 4 years ago

js78: rephrase the desc of --disable-jemalloc

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23750 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 9.5 KB
RevLine 
[fcce89bc]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 <!ENTITY ff78-version "&firefox-version;">
8 <!ENTITY js78-download-http "&mozilla-http;/firefox/releases/&ff78-version;esr/source/firefox-&ff78-version;esr.source.tar.xz">
9 <!ENTITY js78-download-ftp " ">
[5d0f53c0]10 <!-- 78.2.0 -->
11 <!ENTITY js78-md5sum "e071f6c9bea8344d4556323f02bf6125">
[fcce89bc]12 <!ENTITY js78-size "317 MB">
[923952b]13 <!ENTITY js78-buildsize "2.9 GB (30 MB installed after removing 31MB static lib)">
[fcce89bc]14 <!ENTITY js78-time "2.2 SBU (with parallelism = 4)">
15]>
16
17<sect1 id="js78" xreflabel="js78-&ff78-version;">
18 <?dbhtml filename="js78.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>JS-&ff78-version;</title>
26
27 <indexterm zone="js78">
28 <primary sortas="a-js78">js78</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to JS</title>
33
34 <para>
35 <application>JS</application> is Mozilla's JavaScript engine
36 written in C. JS78 is taken from Firefox.
37 </para>
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>
43 Download (HTTP): <ulink url="&js78-download-http;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download (FTP): <ulink url="&js78-download-ftp;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download MD5 sum: &js78-md5sum;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download size: &js78-size;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated disk space required: &js78-buildsize;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated build time: &js78-time;
69 </para>
70 </listitem>
71 </itemizedlist>
[5d0f53c0]72<!--
[fcce89bc]73 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
74 <itemizedlist spacing="compact">
75 <listitem>
76 <para>
77 Required patch:
78 <ulink url="&patch-root;/js78-code_coverage-1.patch"/>
79 </para>
80 </listitem>
81 </itemizedlist>
[5d0f53c0]82-->
[fcce89bc]83 <bridgehead renderas="sect3">JS78 Dependencies</bridgehead>
84
85 <bridgehead renderas="sect4">Required</bridgehead>
86 <para role="required">
87 <xref linkend="autoconf213"/>,
88 <xref linkend="icu"/>,
89 <xref linkend="rust"/>, and
90 <xref linkend="which"/>
[5d0f53c0]91 <!-- Should we list llvm here? -->
[fcce89bc]92 </para>
93
94 <!-- It seems nasm is only used for aarch64-win64. -->
95 <!--bridgehead renderas="sect4">Optional</bridgehead>
96 <para role="optional">
97 <xref linkend="nasm"/>
98 </para-->
99
100 <para condition="html" role="usernotes">
101 User Notes: <ulink url="&blfs-wiki;/js78"/>
102 </para>
103 </sect2>
104
105 <sect2 role="installation">
106 <title>Installation of JS</title>
107
108 <caution>
109 <para>
110 If you are upgrading JS78 from a previously installed old version,
111 save all work and exit your GNOME Session if you have one running.
112 Replacing the JS78 binary will cause the GNOME Shell to crash and
113 return you to your display manager or TTY. After installing the new
114 version, if GNOME Shell still doesn't work, reinstall
115 <xref linkend="gjs"/>.
116 </para>
117 </caution>
118
119 <note>
120 <para>
121 Unlike most other packages in BLFS, the instructions below require you
122 to untar <filename>firefox-&ff78-version;esr.tar.xz</filename> and
123 change into the <filename>firefox-&ff78-version;</filename> folder.
124 </para>
125
126 <para>
127 Extracting the tarball
128 will reset the permissions of the current directory to 0755 if you
129 have permission to do that. If you do this in a directory where
130 the sticky bit is set, such
131 as <filename class="directory">/tmp</filename> it will end with error
132 messages:
133 </para>
134
135<literallayout>tar: .: Cannot utime: Operation not permitted
136tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
137tar: Exiting with failure status due to previous errors
138</literallayout>
139
140 <para>
141 This does finish with non-zero status, but it does
142 <emphasis>NOT</emphasis> mean there is a real problem.
143 Do not untar as the <systemitem class="username">root</systemitem> user
144 in a directory where the sticky bit is set - that will unset it.
145 </para>
146
147 </note>
148
[5d0f53c0]149<!-- It's merged in 78.2.0.
[fcce89bc]150 <para>
151 Apply a patch required by <xref linkend="gjs"/>:
152 </para>
153
154<screen><userinput>patch -Np1 -i ../js78-code_coverage-1.patch</userinput></screen>
[5d0f53c0]155-->
[fcce89bc]156 <para>
157 Install <application>JS</application> by running the following
158 commands:
159 </para>
160
161 <note>
162 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
163 href="../../xincludes/mozshm.xml"/>
164
165 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
166 href="../../xincludes/mozconfigure.xml"/>
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>
[5d0f53c0]184 <!-- All JIT tests pass with 78.2.0. -->
[fcce89bc]185 To run JIT test suite, issue:
186 <command>make -C js/src check-jit-test
187 JITTEST_EXTRA_ARGS="--timeout 300"</command>.
188 The other parts of test suite are not functional on BLFS.
189 </para>
190
191 <para>
192 Now, as the <systemitem class="username">root</systemitem> user:
193 </para>
194
195<screen role="root"><userinput>make install &amp;&amp;
196rm -v /usr/lib/libjs_static.ajs &amp;&amp;
[84283d4]197sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</userinput></screen>
[fcce89bc]198
199 </sect2>
200
201 <!-- Several gjs-1.65.90 tests fail with js78. Not sure why.
202 OTOH an "otherwise" GNOME-3.36 environment works fine. -->
203
204 <sect2 role="commands">
205 <title>Command Explanations</title>
206
207 <para>
208 <envar>CC=gcc CXX=g++</envar>: Upstream now prefers
209 <application>clang</application>, override it like other Mozilla
210 packages in BLFS book.
211 </para>
212
213 <para>
214 <parameter>--with-*</parameter>: These parameters allow the build system
215 to use system versions of the above libraries. These are required for
216 stability.
217 </para>
218
219 <para>
220 <parameter>--enable-readline</parameter>: This switch enables Readline
221 support in the JS shell.
222 </para>
223
224 <para>
225 <parameter>--disable-jemalloc</parameter>: This switch disables the
[50d9ed6]226 internal memory allocator used in JS78. jemalloc is only intended for
227 the Firefox browser environment. For other applications using JS78,
228 if JS78 uses jemalloc, the application may crash as items allocated
229 in jemalloc allocator are freed on system (glibc) allocator.
[fcce89bc]230 </para>
231
232 <para>
233 <parameter>--disable-debug-symbols</parameter>: Don't generate debug
234 symbols since they are very large and most users won't need it. Remove
235 it if you want to debug JS78.
236 </para>
237
238 <para>
239 <command>rm -v /usr/lib/libjs_static.ajs</command>: Remove a large
240 static library which is not used by any BLFS package.
241 </para>
242
243 <para>
[84283d4]244 <command>sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</command>:
245 Prevent <command>js78-config</command> from using buggy CFLAGS.
[fcce89bc]246 </para>
247
248 </sect2>
249
250 <sect2 role="content">
251 <title>Contents</title>
252
253 <segmentedlist>
254 <segtitle>Installed Programs</segtitle>
255 <segtitle>Installed Libraries</segtitle>
256 <segtitle>Installed Directories</segtitle>
257
258 <seglistitem>
259 <seg>
260 js78 and js78-config
261 </seg>
262 <seg>
263 libmozjs-78.so
264 </seg>
265 <seg>
266 /usr/include/mozjs-78
267 </seg>
268 </seglistitem>
269 </segmentedlist>
270
271 <variablelist>
272 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
273 <?dbfo list-presentation="list"?>
274 <?dbhtml list-presentation="table"?>
275
276 <varlistentry id="js6-js78">
277 <term><command>js78</command></term>
278 <listitem>
279 <para>
280 provides a command line interface to the
281 <application>JavaScript</application> engine.
282 </para>
283 <indexterm zone="js78 js78">
284 <primary sortas="b-js78">js78</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="js78-config">
290 <term><command>js78-config</command></term>
291 <listitem>
292 <para>
293 is used to find the JS compiler and linker flags.
294 </para>
295 <indexterm zone="js78 js78-config">
296 <primary sortas="b-js78-config">js78-config</primary>
297 </indexterm>
298 </listitem>
299 </varlistentry>
300
301 <varlistentry id="libmozjs-78">
302 <term><filename class="libraryfile">libmozjs-78.so</filename></term>
303 <listitem>
304 <para>
305 contains the Mozilla JavaScript API functions.
306 </para>
307 <indexterm zone="js78 libmozjs-78">
308 <primary sortas="c-libmozjs78">libmozjs-78.so</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312 </variablelist>
313 </sect2>
314</sect1>
Note: See TracBrowser for help on using the repository browser.