source: general/genlib/js78.xml@ 923952b

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

js78: remove llvm dependency

Ken said a rustc with shipped llvm will work.

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

  • Property mode set to 100644
File size: 9.4 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.9 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="rust"/>, and
94 <xref linkend="which"/>
95 </para>
96
97 <!-- It seems nasm is only used for aarch64-win64. -->
98 <!--bridgehead renderas="sect4">Optional</bridgehead>
99 <para role="optional">
100 <xref linkend="nasm"/>
101 </para-->
102
103 <para condition="html" role="usernotes">
104 User Notes: <ulink url="&blfs-wiki;/js78"/>
105 </para>
106 </sect2>
107
108 <sect2 role="installation">
109 <title>Installation of JS</title>
110
111 <caution>
112 <para>
113 If you are upgrading JS78 from a previously installed old version,
114 save all work and exit your GNOME Session if you have one running.
115 Replacing the JS78 binary will cause the GNOME Shell to crash and
116 return you to your display manager or TTY. After installing the new
117 version, if GNOME Shell still doesn't work, reinstall
118 <xref linkend="gjs"/>.
119 </para>
120 </caution>
121
122 <note>
123 <para>
124 Unlike most other packages in BLFS, the instructions below require you
125 to untar <filename>firefox-&ff78-version;esr.tar.xz</filename> and
126 change into the <filename>firefox-&ff78-version;</filename> folder.
127 </para>
128
129 <para>
130 Extracting the tarball
131 will reset the permissions of the current directory to 0755 if you
132 have permission to do that. If you do this in a directory where
133 the sticky bit is set, such
134 as <filename class="directory">/tmp</filename> it will end with error
135 messages:
136 </para>
137
138<literallayout>tar: .: Cannot utime: Operation not permitted
139tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
140tar: Exiting with failure status due to previous errors
141</literallayout>
142
143 <para>
144 This does finish with non-zero status, but it does
145 <emphasis>NOT</emphasis> mean there is a real problem.
146 Do not untar as the <systemitem class="username">root</systemitem> user
147 in a directory where the sticky bit is set - that will unset it.
148 </para>
149
150 </note>
151
152 <!-- It's likely to be merged in 78.2.0. -->
153 <para>
154 Apply a patch required by <xref linkend="gjs"/>:
155 </para>
156
157<screen><userinput>patch -Np1 -i ../js78-code_coverage-1.patch</userinput></screen>
158
159 <para>
160 Install <application>JS</application> by running the following
161 commands:
162 </para>
163
164 <note>
165 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
166 href="../../xincludes/mozshm.xml"/>
167
168 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
169 href="../../xincludes/mozconfigure.xml"/>
170 </note>
171
172
173<screen><userinput>mkdir obj &amp;&amp;
174cd obj &amp;&amp;
175
176CC=gcc CXX=g++ \
177../js/src/configure --prefix=/usr \
178 --with-intl-api \
179 --with-system-zlib \
180 --with-system-icu \
181 --disable-jemalloc \
182 --disable-debug-symbols \
183 --enable-readline &amp;&amp;
184make</userinput></screen>
185
186 <para>
187 <!-- All JIT tests pass with 78.1.0 and GNOME patch. -->
188 To run JIT test suite, issue:
189 <command>make -C js/src check-jit-test
190 JITTEST_EXTRA_ARGS="--timeout 300"</command>.
191 The other parts of test suite are not functional on BLFS.
192 </para>
193
194 <para>
195 Now, as the <systemitem class="username">root</systemitem> user:
196 </para>
197
198<screen role="root"><userinput>make install &amp;&amp;
199rm -v /usr/lib/libjs_static.ajs &amp;&amp;
200sed '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</userinput></screen>
201
202 </sect2>
203
204 <!-- Several gjs-1.65.90 tests fail with js78. Not sure why.
205 OTOH an "otherwise" GNOME-3.36 environment works fine. -->
206
207 <sect2 role="commands">
208 <title>Command Explanations</title>
209
210 <para>
211 <envar>CC=gcc CXX=g++</envar>: Upstream now prefers
212 <application>clang</application>, override it like other Mozilla
213 packages in BLFS book.
214 </para>
215
216 <para>
217 <parameter>--with-*</parameter>: These parameters allow the build system
218 to use system versions of the above libraries. These are required for
219 stability.
220 </para>
221
222 <para>
223 <parameter>--enable-readline</parameter>: This switch enables Readline
224 support in the JS shell.
225 </para>
226
227 <para>
228 <parameter>--disable-jemalloc</parameter>: This switch disables the
229 internal memory allocator used in JS78. jemalloc causes a conflict with glibc.
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>
244 <!-- recheck on 78.2.0 -->
245 <command>sed '/@NSPR_CFLAGS@/d' /usr/bin/js78-config</command>:
246 Prevent <command>js78-config</command> to print buggy CFLAGS.
247 </para>
248
249 </sect2>
250
251 <sect2 role="content">
252 <title>Contents</title>
253
254 <segmentedlist>
255 <segtitle>Installed Programs</segtitle>
256 <segtitle>Installed Libraries</segtitle>
257 <segtitle>Installed Directories</segtitle>
258
259 <seglistitem>
260 <seg>
261 js78 and js78-config
262 </seg>
263 <seg>
264 libmozjs-78.so
265 </seg>
266 <seg>
267 /usr/include/mozjs-78
268 </seg>
269 </seglistitem>
270 </segmentedlist>
271
272 <variablelist>
273 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
274 <?dbfo list-presentation="list"?>
275 <?dbhtml list-presentation="table"?>
276
277 <varlistentry id="js6-js78">
278 <term><command>js78</command></term>
279 <listitem>
280 <para>
281 provides a command line interface to the
282 <application>JavaScript</application> engine.
283 </para>
284 <indexterm zone="js78 js78">
285 <primary sortas="b-js78">js78</primary>
286 </indexterm>
287 </listitem>
288 </varlistentry>
289
290 <varlistentry id="js78-config">
291 <term><command>js78-config</command></term>
292 <listitem>
293 <para>
294 is used to find the JS compiler and linker flags.
295 </para>
296 <indexterm zone="js78 js78-config">
297 <primary sortas="b-js78-config">js78-config</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
302 <varlistentry id="libmozjs-78">
303 <term><filename class="libraryfile">libmozjs-78.so</filename></term>
304 <listitem>
305 <para>
306 contains the Mozilla JavaScript API functions.
307 </para>
308 <indexterm zone="js78 libmozjs-78">
309 <primary sortas="c-libmozjs78">libmozjs-78.so</primary>
310 </indexterm>
311 </listitem>
312 </varlistentry>
313 </variablelist>
314 </sect2>
315</sect1>
Note: See TracBrowser for help on using the repository browser.