source: general/genlib/js78.xml@ 55a63862

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 55a63862 was 55a63862, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tag X Software and some dependencies

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

  • Property mode set to 100644
File size: 10.2 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 <caution>
195 <para>
196 An issue in the installation process causes any running program which
197 links to JS78 shared library (for example, GNOME Shell) to crash if
198 JS78 is upgraded or reinstalled. To work around this issue, remove
199 the old version of the JS78 shared library before installation:
200 </para>
201
202<screen role="root"><userinput>rm -fv /usr/lib/libmozjs-78.so</userinput></screen>
203 </caution>
204
205 <para>
206 Now, as the <systemitem class="username">root</systemitem> user:
207 </para>
208
209<screen role="root"><userinput>make install &amp;&amp;
210rm -v /usr/lib/libjs_static.ajs &amp;&amp;
211sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</userinput></screen>
212
213 </sect2>
214
215 <!-- Several gjs-1.65.90 tests fail with js78. Not sure why.
216 OTOH an "otherwise" GNOME-3.36 environment works fine. -->
217
218 <sect2 role="commands">
219 <title>Command Explanations</title>
220
221 <para>
222 <envar>CC=gcc CXX=g++</envar>: Upstream now prefers
223 <application>clang</application>, override it like other Mozilla
224 packages in BLFS book.
225 </para>
226
227 <para>
228 <parameter>--with-*</parameter>: These parameters allow the build system
229 to use system versions of the above libraries. These are required for
230 stability.
231 </para>
232
233 <para>
234 <parameter>--enable-readline</parameter>: This switch enables Readline
235 support in the JS shell.
236 </para>
237
238 <para>
239 <parameter>--disable-jemalloc</parameter>: This switch disables the
240 internal memory allocator used in JS78. jemalloc is only intended for
241 the Firefox browser environment. For other applications using JS78,
242 if JS78 uses jemalloc, the application may crash as items allocated
243 in jemalloc allocator are freed on system (glibc) allocator.
244 </para>
245
246 <para>
247 <parameter>--disable-debug-symbols</parameter>: Don't generate debug
248 symbols since they are very large and most users won't need it. Remove
249 it if you want to debug JS78.
250 </para>
251
252 <para>
253 <command>rm -v /usr/lib/libjs_static.ajs</command>: Remove a large
254 static library which is not used by any BLFS package.
255 </para>
256
257 <para>
258 <command>sed -i '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</command>:
259 Prevent <command>js78-config</command> from using buggy CFLAGS.
260 </para>
261
262 </sect2>
263
264 <sect2 role="content">
265 <title>Contents</title>
266
267 <segmentedlist>
268 <segtitle>Installed Programs</segtitle>
269 <segtitle>Installed Libraries</segtitle>
270 <segtitle>Installed Directories</segtitle>
271
272 <seglistitem>
273 <seg>
274 js78 and js78-config
275 </seg>
276 <seg>
277 libmozjs-78.so
278 </seg>
279 <seg>
280 /usr/include/mozjs-78
281 </seg>
282 </seglistitem>
283 </segmentedlist>
284
285 <variablelist>
286 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
287 <?dbfo list-presentation="list"?>
288 <?dbhtml list-presentation="table"?>
289
290 <varlistentry id="js6-js78">
291 <term><command>js78</command></term>
292 <listitem>
293 <para>
294 provides a command line interface to the
295 <application>JavaScript</application> engine
296 </para>
297 <indexterm zone="js78 js78">
298 <primary sortas="b-js78">js78</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="js78-config">
304 <term><command>js78-config</command></term>
305 <listitem>
306 <para>
307 is used to find the JS compiler and linker flags
308 </para>
309 <indexterm zone="js78 js78-config">
310 <primary sortas="b-js78-config">js78-config</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="libmozjs-78">
316 <term><filename class="libraryfile">libmozjs-78.so</filename></term>
317 <listitem>
318 <para>
319 contains the Mozilla JavaScript API functions
320 </para>
321 <indexterm zone="js78 libmozjs-78">
322 <primary sortas="c-libmozjs78">libmozjs-78.so</primary>
323 </indexterm>
324 </listitem>
325 </varlistentry>
326 </variablelist>
327 </sect2>
328
329</sect1>
Note: See TracBrowser for help on using the repository browser.