source: general/genlib/js78.xml@ 4af651f7

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

js78: add workaround for reinstallation

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

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