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