source: general/genlib/js78.xml@ fcce89bc

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

draft mozjs-78

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

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