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 js68-download-http "&mozilla-http;/firefox/releases/&JS68-version;esr/source/firefox-&JS68-version;esr.source.tar.xz">
|
---|
8 | <!ENTITY js68-download-ftp " ">
|
---|
9 | <!ENTITY js68-md5sum "80ae7816399f20cc61c9b15495b2341d">
|
---|
10 | <!ENTITY js68-size "299 MB">
|
---|
11 | <!ENTITY js68-buildsize "2.8 GB (30 MB installed after removing 31MB static lib)">
|
---|
12 | <!ENTITY js68-time "2.1 SBU (with parallelism = 4)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="js68" xreflabel="js68-&JS68-version;">
|
---|
16 | <?dbhtml filename="js68.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>JS-&JS68-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="js68">
|
---|
22 | <primary sortas="a-js68">js68</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to JS</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | <application>JS</application> is Mozilla's JavaScript engine
|
---|
30 | written in C. JS68 is taken from Firefox.
|
---|
31 | </para>
|
---|
32 |
|
---|
33 | &lfs10_checked;
|
---|
34 |
|
---|
35 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
36 | <itemizedlist spacing="compact">
|
---|
37 | <listitem>
|
---|
38 | <para>
|
---|
39 | Download (HTTP): <ulink url="&js68-download-http;"/>
|
---|
40 | </para>
|
---|
41 | </listitem>
|
---|
42 | <listitem>
|
---|
43 | <para>
|
---|
44 | Download (FTP): <ulink url="&js68-download-ftp;"/>
|
---|
45 | </para>
|
---|
46 | </listitem>
|
---|
47 | <listitem>
|
---|
48 | <para>
|
---|
49 | Download MD5 sum: &js68-md5sum;
|
---|
50 | </para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>
|
---|
54 | Download size: &js68-size;
|
---|
55 | </para>
|
---|
56 | </listitem>
|
---|
57 | <listitem>
|
---|
58 | <para>
|
---|
59 | Estimated disk space required: &js68-buildsize;
|
---|
60 | </para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>
|
---|
64 | Estimated build time: &js68-time;
|
---|
65 | </para>
|
---|
66 | </listitem>
|
---|
67 | </itemizedlist>
|
---|
68 |
|
---|
69 | <bridgehead renderas="sect3">JS68 Dependencies</bridgehead>
|
---|
70 |
|
---|
71 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
72 | <para role="required">
|
---|
73 | <xref linkend="autoconf213"/>,
|
---|
74 | <xref linkend="icu"/>,
|
---|
75 | <xref linkend="python2"/>, and
|
---|
76 | <xref linkend="which"/>
|
---|
77 | </para>
|
---|
78 |
|
---|
79 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
80 | <para role="optional">
|
---|
81 | <xref linkend="llvm"/> (with <application>Clang</application>),
|
---|
82 | <xref linkend="nasm"/>, and
|
---|
83 | <xref linkend="doxygen"/> (for documentation)
|
---|
84 | </para>
|
---|
85 |
|
---|
86 | <para condition="html" role="usernotes">
|
---|
87 | User Notes: <ulink url="&blfs-wiki;/js68"/>
|
---|
88 | </para>
|
---|
89 | </sect2>
|
---|
90 |
|
---|
91 | <sect2 role="installation">
|
---|
92 | <title>Installation of JS</title>
|
---|
93 |
|
---|
94 | <caution>
|
---|
95 | <para>
|
---|
96 | If you are upgrading JS68 from a previously installed old version,
|
---|
97 | save all work and exit your GNOME Session if you have one running.
|
---|
98 | Replacing the JS68 binary will cause the GNOME Shell to crash and
|
---|
99 | return you to your display manager or TTY. After installing the new
|
---|
100 | version, if GNOME Shell still doesn't work, reinstall
|
---|
101 | <xref linkend="gjs"/>.
|
---|
102 | </para>
|
---|
103 | </caution>
|
---|
104 |
|
---|
105 | <note>
|
---|
106 | <para>
|
---|
107 | Unlike most other packages in BLFS, the instructions below require you
|
---|
108 | to untar <filename>firefox-&JS68-version;esr.tar.xz</filename> and
|
---|
109 | change into the <filename>firefox-&JS68-version;</filename> folder.
|
---|
110 | </para>
|
---|
111 |
|
---|
112 | <para>
|
---|
113 | Extracting the tarball
|
---|
114 | will reset the permissions of the current directory to 0755 if you
|
---|
115 | have permission to do that. If you do this in a directory where
|
---|
116 | the sticky bit is set, such
|
---|
117 | as <filename class="directory">/tmp</filename> it will end with error
|
---|
118 | messages:
|
---|
119 | </para>
|
---|
120 |
|
---|
121 | <literallayout>tar: .: Cannot utime: Operation not permitted
|
---|
122 | tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
|
---|
123 | tar: Exiting with failure status due to previous errors
|
---|
124 | </literallayout>
|
---|
125 |
|
---|
126 | <para>
|
---|
127 | This does finish with non-zero status, but it does
|
---|
128 | <emphasis>NOT</emphasis> mean there is a real problem.
|
---|
129 | Do not untar as the <systemitem class="username">root</systemitem> user
|
---|
130 | in a directory where the sticky bit is set - that will unset it.
|
---|
131 | </para>
|
---|
132 |
|
---|
133 | </note>
|
---|
134 |
|
---|
135 | <para>
|
---|
136 | Install <application>JS</application> by running the following
|
---|
137 | commands:
|
---|
138 | </para>
|
---|
139 |
|
---|
140 | <note>
|
---|
141 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
142 | href="../../xincludes/mozshm.xml"/>
|
---|
143 |
|
---|
144 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
145 | href="../../xincludes/mozconfigure.xml"/>
|
---|
146 | </note>
|
---|
147 |
|
---|
148 |
|
---|
149 | <screen><userinput>sed '21,+4d' -i js/moz.configure &&
|
---|
150 |
|
---|
151 | mkdir obj &&
|
---|
152 | cd obj &&
|
---|
153 |
|
---|
154 | CC=gcc CXX=g++ LLVM_OBJDUMP=/bin/false \
|
---|
155 | ../js/src/configure --prefix=/usr \
|
---|
156 | --with-intl-api \
|
---|
157 | --with-system-zlib \
|
---|
158 | --with-system-icu \
|
---|
159 | --disable-jemalloc \
|
---|
160 | --disable-debug-symbols \
|
---|
161 | --enable-readline \
|
---|
162 | --enable-unaligned-private-values &&
|
---|
163 | make</userinput></screen>
|
---|
164 |
|
---|
165 | <para>
|
---|
166 | This package does not come with a working test suite.
|
---|
167 | </para>
|
---|
168 |
|
---|
169 | <para>
|
---|
170 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
171 | </para>
|
---|
172 |
|
---|
173 | <screen role="root"><userinput>make install &&
|
---|
174 | rm -v /usr/lib/libjs_static.ajs</userinput></screen>
|
---|
175 |
|
---|
176 | </sect2>
|
---|
177 |
|
---|
178 | <sect2 role="commands">
|
---|
179 | <title>Command Explanations</title>
|
---|
180 |
|
---|
181 | <para>
|
---|
182 | <command>sed '21,+4d' js/moz.configure</command>: Firefox building
|
---|
183 | system searches for <command>rustc</command> and
|
---|
184 | <command>cargo</command>.
|
---|
185 | Since we are building the standalone JS engine instead of the entire
|
---|
186 | browser, they are not actually used.
|
---|
187 | Remove the reference to them so we can
|
---|
188 | build JS68 without <xref role="nodep" linkend="rust"/> installed.
|
---|
189 | </para>
|
---|
190 |
|
---|
191 | <para>
|
---|
192 | <envar>CC=gcc CXX=g++</envar>: Upstream now prefers
|
---|
193 | <application>clang</application>, override it like other Mozilla
|
---|
194 | packages in BLFS book.
|
---|
195 | </para>
|
---|
196 |
|
---|
197 | <para>
|
---|
198 | <envar>LLVM_OBJDUMP=/bin/false</envar>: The firefox build system
|
---|
199 | searches for <command>llvm-objdump</command>.
|
---|
200 | Since we are building the standalone JS engine instead of the entire
|
---|
201 | browser, they are not actually used.
|
---|
202 | Override it so we can build JS68 without
|
---|
203 | <xref role="nodep" linkend="llvm"/> installed.
|
---|
204 | </para>
|
---|
205 |
|
---|
206 | <para>
|
---|
207 | <parameter>--with-*</parameter>: These parameters allow the build system
|
---|
208 | to use system versions of the above libraries. These are required for
|
---|
209 | stability.
|
---|
210 | </para>
|
---|
211 |
|
---|
212 | <para>
|
---|
213 | <parameter>--enable-readline</parameter>: This switch enables Readline
|
---|
214 | support in the JS shell.
|
---|
215 | </para>
|
---|
216 |
|
---|
217 | <para>
|
---|
218 | <parameter>--disable-jemalloc</parameter>: This switch disables the
|
---|
219 | internal memory allocator used in JS68. jemalloc causes a conflict with glibc.
|
---|
220 | </para>
|
---|
221 |
|
---|
222 | <para>
|
---|
223 | <parameter>--disable-debug-symbols</parameter>: Don't generate debug
|
---|
224 | symbols since they are very large and most users won't need it. Remove
|
---|
225 | it if you want to debug JS68.
|
---|
226 | </para>
|
---|
227 |
|
---|
228 | <para>
|
---|
229 | <parameter>--enable-unaligned-private-values</parameter>: This switch
|
---|
230 | allows the code using JS68 not to align all pointers in the same way
|
---|
231 | JS68 does. <xref linkend="gjs"/> requires JS68 to be built with this
|
---|
232 | switch.
|
---|
233 | </para>
|
---|
234 |
|
---|
235 | <para>
|
---|
236 | <command>rm -v /usr/lib/libjs_static.ajs</command>: Remove a large
|
---|
237 | static library which is not used by any BLFS package.
|
---|
238 | </para>
|
---|
239 |
|
---|
240 | </sect2>
|
---|
241 |
|
---|
242 | <sect2 role="content">
|
---|
243 | <title>Contents</title>
|
---|
244 |
|
---|
245 | <segmentedlist>
|
---|
246 | <segtitle>Installed Programs</segtitle>
|
---|
247 | <segtitle>Installed Libraries</segtitle>
|
---|
248 | <segtitle>Installed Directories</segtitle>
|
---|
249 |
|
---|
250 | <seglistitem>
|
---|
251 | <seg>
|
---|
252 | js68 and js68-config
|
---|
253 | </seg>
|
---|
254 | <seg>
|
---|
255 | libmozjs-68.so
|
---|
256 | </seg>
|
---|
257 | <seg>
|
---|
258 | /usr/include/mozjs-68
|
---|
259 | </seg>
|
---|
260 | </seglistitem>
|
---|
261 | </segmentedlist>
|
---|
262 |
|
---|
263 | <variablelist>
|
---|
264 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
265 | <?dbfo list-presentation="list"?>
|
---|
266 | <?dbhtml list-presentation="table"?>
|
---|
267 |
|
---|
268 | <varlistentry id="js6-js68">
|
---|
269 | <term><command>js68</command></term>
|
---|
270 | <listitem>
|
---|
271 | <para>
|
---|
272 | provides a command line interface to the
|
---|
273 | <application>JavaScript</application> engine.
|
---|
274 | </para>
|
---|
275 | <indexterm zone="js68 js68">
|
---|
276 | <primary sortas="b-js68">js68</primary>
|
---|
277 | </indexterm>
|
---|
278 | </listitem>
|
---|
279 | </varlistentry>
|
---|
280 |
|
---|
281 | <varlistentry id="js68-config">
|
---|
282 | <term><command>js68-config</command></term>
|
---|
283 | <listitem>
|
---|
284 | <para>
|
---|
285 | is used to find the JS compiler and linker flags.
|
---|
286 | </para>
|
---|
287 | <indexterm zone="js68 js68-config">
|
---|
288 | <primary sortas="b-js68-config">js68-config</primary>
|
---|
289 | </indexterm>
|
---|
290 | </listitem>
|
---|
291 | </varlistentry>
|
---|
292 |
|
---|
293 | <varlistentry id="libmozjs-68">
|
---|
294 | <term><filename class="libraryfile">libmozjs-68.so</filename></term>
|
---|
295 | <listitem>
|
---|
296 | <para>
|
---|
297 | contains the Mozilla JavaScript API functions.
|
---|
298 | </para>
|
---|
299 | <indexterm zone="js68 libmozjs-68">
|
---|
300 | <primary sortas="c-libmozjs68">libmozjs-68.so</primary>
|
---|
301 | </indexterm>
|
---|
302 | </listitem>
|
---|
303 | </varlistentry>
|
---|
304 | </variablelist>
|
---|
305 | </sect2>
|
---|
306 | </sect1>
|
---|