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