source: general/genlib/js78.xml@ 6b063cc3

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

Tag xorg

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@24250 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 <caution>
110 <para>
111 If you are upgrading JS78 from a previously installed old version,
112 save all work and exit your GNOME Session if you have one running.
113 Replacing the JS78 binary will cause the GNOME Shell to crash and
114 return you to your display manager or TTY. After installing the new
115 version, if GNOME Shell still doesn't work, reinstall
116 <xref linkend="gjs"/>.
117 </para>
118 </caution>
119
120 <note>
121 <para>
122 Unlike most other packages in BLFS, the instructions below require you
123 to untar <filename>firefox-&ff78-version;esr.tar.xz</filename> and
124 change into the <filename>firefox-&ff78-version;</filename> folder.
125 </para>
126
127 <para>
128 Extracting the tarball
129 will reset the permissions of the current directory to 0755 if you
130 have permission to do that. If you do this in a directory where
131 the sticky bit is set, such
132 as <filename class="directory">/tmp</filename> it will end with error
133 messages:
134 </para>
135
136<literallayout>tar: .: Cannot utime: Operation not permitted
137tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
138tar: Exiting with failure status due to previous errors
139</literallayout>
140
141 <para>
142 This does finish with non-zero status, but it does
143 <emphasis>NOT</emphasis> mean there is a real problem.
144 Do not untar as the <systemitem class="username">root</systemitem> user
145 in a directory where the sticky bit is set - that will unset it.
146 </para>
147
148 </note>
149
150<!-- It's merged in 78.2.0.
151 <para>
152 Apply a patch required by <xref linkend="gjs"/>:
153 </para>
154
155<screen><userinput>patch -Np1 -i ../js78-code_coverage-1.patch</userinput></screen>
156-->
157 <para>
158 Install <application>JS</application> by running the following
159 commands:
160 </para>
161
162 <note>
163 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
164 href="../../xincludes/mozshm.xml"/>
165
166 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
167 href="../../xincludes/mozconfigure.xml"/>
168 </note>
169
170
171<screen><userinput>mkdir obj &amp;&amp;
172cd obj &amp;&amp;
173
174CC=gcc CXX=g++ \
175../js/src/configure --prefix=/usr \
176 --with-intl-api \
177 --with-system-zlib \
178 --with-system-icu \
179 --disable-jemalloc \
180 --disable-debug-symbols \
181 --enable-readline &amp;&amp;
182make</userinput></screen>
183
184 <para>
185 To run JS test suite, issue:
186 <command>make -C js/src check-jstests
187 JSTESTS_EXTRA_ARGS="--timeout 300 --wpt=disabled"</command>.
188 It's recommended to redirect the output into a log.
189 <!-- recheck when ICU gets upgraded -->
190 <!-- ken: removed "are known to fail' becasue there are
191 4096 known failures, these icu items are unexpected failures
192 and I found the wording confusing -->
193 <!-- ken : For 78.4 this was 14 failures, I changed it to 10 for 78.5.
194 On that machine with 78.6 still 10, but on another 14, both with similar
195 setup and locale. -->
196 Depending on the machine, either
197 ten or fourteen JS tests related to locale and timezone fail,
198 because of an issue in <xref linkend="icu"/>.
199 To run the JIT test suite, issue:
200 <command>make -C js/src check-jit-test
201 JITTEST_EXTRA_ARGS="--timeout 300"</command>. Again, a few tests
202 may show as unexpected failures.
203 </para>
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.