[f939f05] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[f939f05] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[2eae5bc] | 7 | <!ENTITY firefox-download-http "&mozilla-http;/firefox/releases/&firefox-version;esr/source/firefox-&firefox-version;esr.source.tar.xz">
|
---|
[8dfc5c3] | 8 | <!ENTITY firefox-download-ftp " ">
|
---|
[4040245] | 9 | <!ENTITY firefox-md5sum "d21112f6e2b482e3c3ce431682de5e7d">
|
---|
[c28e4a68] | 10 | <!ENTITY firefox-size "300 MB">
|
---|
[5c2b024] | 11 | <!-- NB with stylo, much of the build uses rust, and therefore cargo files.
|
---|
[9da4cc6f] | 12 | But the extra cached cargo files, if any, seem to be minimal -->
|
---|
[2eae5bc] | 13 | <!ENTITY firefox-buildsize "4.3 GB (166 MB installed) without tests">
|
---|
[9a469bc] | 14 | <!-- editors: with ff63 and rust-1.29, ./mach build -j4 is probably the
|
---|
[fe5f563d] | 15 | most practical way to get a timing on a machine with more cores, if taking
|
---|
| 16 | cores offline is not practical. If in doubt, round up -->
|
---|
[ec2353a] | 17 | <!ENTITY firefox-time "23 SBU (on a 4-core machine) without tests">
|
---|
[f939f05] | 18 | ]>
|
---|
| 19 |
|
---|
[ffe47ca2] | 20 | <sect1 id="firefox" xreflabel="Firefox-&firefox-version;">
|
---|
[b81991e1] | 21 | <?dbhtml filename="firefox.html" ?>
|
---|
| 22 |
|
---|
| 23 | <sect1info>
|
---|
| 24 | <othername>$LastChangedBy$</othername>
|
---|
| 25 | <date>$Date$</date>
|
---|
| 26 | </sect1info>
|
---|
| 27 |
|
---|
| 28 | <title>Firefox-&firefox-version;</title>
|
---|
| 29 |
|
---|
| 30 | <indexterm zone="firefox">
|
---|
| 31 | <primary sortas="a-Firefox">Firefox</primary>
|
---|
| 32 | </indexterm>
|
---|
| 33 |
|
---|
| 34 | <sect2 role="package">
|
---|
| 35 | <title>Introduction to Firefox</title>
|
---|
| 36 |
|
---|
[c1ae13c] | 37 | <para>
|
---|
| 38 | <application>Firefox</application> is a stand-alone browser based on the
|
---|
| 39 | <application>Mozilla</application> codebase.
|
---|
| 40 | </para>
|
---|
[b81991e1] | 41 |
|
---|
[73d98d49] | 42 | &lfs91_checked;
|
---|
[76ae9a2] | 43 |
|
---|
[b81991e1] | 44 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 45 | <itemizedlist spacing="compact">
|
---|
| 46 | <listitem>
|
---|
[c1ae13c] | 47 | <para>
|
---|
| 48 | Download (HTTP): <ulink url="&firefox-download-http;"/>
|
---|
| 49 | </para>
|
---|
[b81991e1] | 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
[c1ae13c] | 52 | <para>
|
---|
| 53 | Download (FTP): <ulink url="&firefox-download-ftp;"/>
|
---|
| 54 | </para>
|
---|
[b81991e1] | 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
[c1ae13c] | 57 | <para>
|
---|
| 58 | Download MD5 sum: &firefox-md5sum;
|
---|
| 59 | </para>
|
---|
[b81991e1] | 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
[c1ae13c] | 62 | <para>
|
---|
| 63 | Download size: &firefox-size;
|
---|
| 64 | </para>
|
---|
[b81991e1] | 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
[c1ae13c] | 67 | <para>
|
---|
| 68 | Estimated disk space required: &firefox-buildsize;
|
---|
| 69 | </para>
|
---|
[b81991e1] | 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
[c1ae13c] | 72 | <para>
|
---|
| 73 | Estimated build time: &firefox-time;
|
---|
| 74 | </para>
|
---|
[b81991e1] | 75 | </listitem>
|
---|
| 76 | </itemizedlist>
|
---|
| 77 |
|
---|
[14de4227] | 78 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 79 | <itemizedlist spacing="compact">
|
---|
| 80 | <listitem>
|
---|
| 81 | <para>
|
---|
| 82 | Optional patch to allow system versions of <xref linkend="graphite2"/>
|
---|
[ecffcbbc] | 83 | and <xref linkend="harfbuzz"/>:
|
---|
[2bfd23a] | 84 | <ulink url="&patch-root;/firefox-&firefox-version;esr-system_graphite2_harfbuzz-1.patch"/>
|
---|
[14de4227] | 85 | </para>
|
---|
| 86 | </listitem>
|
---|
| 87 | </itemizedlist>
|
---|
| 88 |
|
---|
[f06c692] | 89 | <note>
|
---|
[2eae5bc] | 90 | <para>
|
---|
| 91 | The directory name is firefox-&firefox-version;
|
---|
| 92 | </para>
|
---|
| 93 |
|
---|
[f06c692] | 94 | <para>
|
---|
[8d0bc761] | 95 | Extracting the tarball
|
---|
| 96 | will reset the permissions of the current directory to 0755 if you
|
---|
[765c2a7] | 97 | have permission to do that. If you do this in a directory where
|
---|
[37bf7b1] | 98 | the sticky bit is set, such
|
---|
[dc9a18a] | 99 | as <filename class="directory">/tmp</filename> it will end with error
|
---|
| 100 | messages:
|
---|
| 101 | </para>
|
---|
| 102 |
|
---|
| 103 | <literallayout>tar: .: Cannot utime: Operation not permitted
|
---|
| 104 | tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
|
---|
| 105 | tar: Exiting with failure status due to previous errors
|
---|
| 106 | </literallayout>
|
---|
| 107 |
|
---|
| 108 | <para>
|
---|
| 109 | This does finish with non-zero status, but it does
|
---|
| 110 | <emphasis>NOT</emphasis> mean there is a real problem.
|
---|
| 111 | Do not untar as the <systemitem class="username">root</systemitem> user
|
---|
| 112 | in a directory where the sticky bit is set - that will unset it.
|
---|
[f06c692] | 113 | </para>
|
---|
[8d0bc761] | 114 |
|
---|
| 115 | <para>
|
---|
[406e5ffe] | 116 | As with other large packages which use C++ (or rust), the SBU times
|
---|
[fe5f563d] | 117 | to build this vary more widely than you might expect. Also, 6GB
|
---|
[406e5ffe] | 118 | of real memory is used during the final link and the SBUs can increase
|
---|
[fe5f563d] | 119 | significantly if the machine has to swap.
|
---|
[8d0bc761] | 120 | </para>
|
---|
| 121 |
|
---|
[e628b536] | 122 | <para>
|
---|
| 123 | The mach build system (Python scripts) can be somewhat unreliable: if
|
---|
| 124 | the build fails and reports an Error, it can still return a status of
|
---|
| 125 | success, causing a scripted build to try to install (which does not rerun
|
---|
| 126 | the build), fail during the preparations for installing, but still exit
|
---|
| 127 | with a status of success. Also, on occasion it may limit itself to only
|
---|
| 128 | running one set of jobs - that will make the build take about 3 times as
|
---|
| 129 | long as running with four sets of jobs.
|
---|
| 130 | </para>
|
---|
| 131 |
|
---|
[8d0bc761] | 132 | <para>
|
---|
| 133 | Although upstream prefer to use <application>PulseAudio</application>,
|
---|
| 134 | for the moment <application>Alsa</application> can still be used. Both
|
---|
| 135 | may need runtime configuration to get sound working.
|
---|
| 136 | </para>
|
---|
[f06c692] | 137 | </note>
|
---|
| 138 |
|
---|
[b81991e1] | 139 | <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
|
---|
| 140 |
|
---|
| 141 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[c1ae13c] | 142 | <para role="required">
|
---|
[14de4227] | 143 | <xref linkend="autoconf213"/>,
|
---|
[44cd41e] | 144 | <xref linkend="cbindgen"/>,
|
---|
[703f0ce] | 145 | <!-- with ff-69.0 the configure system was happy to continue to disable
|
---|
| 146 | dbus-glib, but linking libxul.so failed because rust code uses it, so
|
---|
| 147 | make it required and remove from mozconfig : ken -->
|
---|
| 148 | <xref linkend="dbus-glib"/>,
|
---|
[ac105103] | 149 | both <xref linkend="gtk3"/> and
|
---|
[9da4cc6f] | 150 | <xref linkend="gtk2"/>,
|
---|
[326f830] | 151 | <xref linkend="libnotify"/>,
|
---|
[fe5f563d] | 152 | <xref linkend="nodejs"/>,
|
---|
[59a6b63] | 153 | <xref linkend="nss"/>,
|
---|
[be0bd12] | 154 | <xref linkend="pulseaudio"/>
|
---|
[81b3e7fd] | 155 | (or
|
---|
[9da4cc6f] | 156 | <xref linkend="alsa-lib"/> if you edit the mozconfig;
|
---|
[326f830] | 157 | now deprecated by mozilla), in either case please read the
|
---|
| 158 | Configuration Information,
|
---|
[4c6edac] | 159 | <xref linkend="rust"/>,
|
---|
[59a6b63] | 160 | <xref linkend="unzip"/>,
|
---|
[479e03a] | 161 | <xref linkend="yasm"/>, and
|
---|
| 162 | <xref linkend="zip"/>
|
---|
[c1ae13c] | 163 | </para>
|
---|
| 164 |
|
---|
[1555d3d] | 165 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[c1ae13c] | 166 | <para role="recommended">
|
---|
[b84fe71] | 167 | <xref linkend="icu"/>,
|
---|
[0e37869] | 168 | <xref linkend="libevent"/>,
|
---|
[e48053bd] | 169 | <!-- fails to build in 65.0 (headers changed)
|
---|
| 170 | <xref linkend="libvpx"/>, -->
|
---|
[e399c12] | 171 | <xref linkend="libwebp"/>,
|
---|
| 172 | <xref linkend="nasm"/>, and
|
---|
[a30a874] | 173 | <xref linkend="sqlite"/>
|
---|
[c1ae13c] | 174 | </para>
|
---|
[1555d3d] | 175 |
|
---|
[0e37869] | 176 | <note>
|
---|
| 177 | <para>
|
---|
[b9f61df] | 178 | If you don't install recommended dependencies, then internal copies of
|
---|
| 179 | those packages will be used. They might be tested to work, but they can
|
---|
| 180 | be out of date or contain security holes.
|
---|
[0e37869] | 181 | </para>
|
---|
| 182 | </note>
|
---|
[8d0bc761] | 183 |
|
---|
[b81991e1] | 184 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[c1ae13c] | 185 | <para role="optional">
|
---|
[6c64623f] | 186 | <xref linkend="curl"/>,
|
---|
[c1ae13c] | 187 | <xref linkend="doxygen"/>,
|
---|
[babf0a0] | 188 | <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
|
---|
[fe30eab] | 189 | <!-- <phrase revision="sysv"><ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink></phrase> -->
|
---|
| 190 | <xref linkend="liboauth"/>,
|
---|
[26fa7d2] | 191 | <xref linkend="openjdk"/>,
|
---|
[0e37869] | 192 | <xref linkend="startup-notification"/>,
|
---|
[566fcae] | 193 | <xref linkend="valgrind"/>,
|
---|
[6000a3e] | 194 | <xref linkend="wget"/>,
|
---|
[73b06df] | 195 | <xref linkend="wireless_tools"/>,
|
---|
[14de4227] | 196 | <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>,
|
---|
| 197 | and (with the patch)
|
---|
| 198 | <xref linkend="graphite2"/> and
|
---|
| 199 | <xref linkend="harfbuzz"/>
|
---|
[c1ae13c] | 200 | </para>
|
---|
| 201 |
|
---|
| 202 | <para condition="html" role="usernotes">
|
---|
| 203 | User Notes: <ulink url="&blfs-wiki;/firefox"/>
|
---|
| 204 | </para>
|
---|
[b81991e1] | 205 | </sect2>
|
---|
| 206 |
|
---|
| 207 | <sect2 role="installation">
|
---|
| 208 | <title>Installation of Firefox</title>
|
---|
| 209 |
|
---|
[f72a04a] | 210 | <para>
|
---|
[b9f61df] | 211 | The configuration of <application>Firefox</application> is accomplished
|
---|
| 212 | by creating a <filename>mozconfig</filename> file containing the desired
|
---|
| 213 | configuration options. A default <filename>mozconfig</filename> is
|
---|
| 214 | created below. To see the entire list of available configuration options
|
---|
[888e303] | 215 | (and an abbreviated description of some of them), issue <command>./mach
|
---|
| 216 | configure && ./configure --help | less</command>. You may also
|
---|
| 217 | wish to review the entire file and uncomment any other desired options.
|
---|
| 218 | Create the file by issuing the following command:
|
---|
[c1ae13c] | 219 | </para>
|
---|
[5a13c45] | 220 |
|
---|
[0e37869] | 221 | <screen><userinput>cat > mozconfig << "EOF"
|
---|
[dcb0fe6] | 222 | <literal># If you have a multicore machine, all cores will be used by default.
|
---|
| 223 |
|
---|
[703f0ce] | 224 | # If you have installed (or will install) wireless-tools, and you wish
|
---|
| 225 | # to use geolocation web services, comment out this line
|
---|
[6d1bf0e] | 226 | ac_add_options --disable-necko-wifi
|
---|
| 227 |
|
---|
[ad5a97d] | 228 | # API Keys for geolocation APIs - necko-wifi (above) is required for MLS
|
---|
| 229 | # Uncomment the following line if you wish to use Mozilla Location Service
|
---|
| 230 | #ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
|
---|
| 231 |
|
---|
| 232 | # Uncomment the following line if you wish to use Google's geolocaton API
|
---|
| 233 | # (needed for use with saved maps with Google Maps)
|
---|
[9116137c] | 234 | #ac_add_options --with-google-location-service-api-keyfile=$PWD/google-key
|
---|
[ad5a97d] | 235 |
|
---|
[ab8cd9be] | 236 | # Uncomment this line if you have installed startup-notification:
|
---|
[0e37869] | 237 | #ac_add_options --enable-startup-notification
|
---|
[495ebe07] | 238 |
|
---|
[81b3e7fd] | 239 | # Uncomment the following option if you have not installed PulseAudio
|
---|
| 240 | #ac_add_options --disable-pulseaudio
|
---|
[3507f80] | 241 | # or uncomment this if you installed alsa-lib instead of PulseAudio
|
---|
[81b3e7fd] | 242 | #ac_add_options --enable-alsa
|
---|
[89cdb63d] | 243 |
|
---|
[0e37869] | 244 | # Comment out following options if you have not installed
|
---|
| 245 | # recommended dependencies:
|
---|
| 246 | ac_add_options --enable-system-sqlite
|
---|
| 247 | ac_add_options --with-system-libevent
|
---|
[8df543f] | 248 | # firefox-65 understands webp and ships with an included copy
|
---|
| 249 | ac_add_options --with-system-webp
|
---|
[0e37869] | 250 | ac_add_options --with-system-nspr
|
---|
| 251 | ac_add_options --with-system-nss
|
---|
[b84fe71] | 252 | ac_add_options --with-system-icu
|
---|
[9a469bc] | 253 |
|
---|
[e399c12] | 254 | # Do not specify the gold linker which is not the default. It will take
|
---|
| 255 | # longer and use more disk space when debug symbols are disabled.
|
---|
[9a469bc] | 256 |
|
---|
[e399c12] | 257 | # libdavid (av1 decoder) requires nasm. Uncomment this if nasm
|
---|
| 258 | # has not been installed.
|
---|
| 259 | #ac_add_options --disable-av1
|
---|
[0a561d8] | 260 |
|
---|
[9a469bc] | 261 | # You cannot distribute the binary if you do this
|
---|
| 262 | ac_add_options --enable-official-branding
|
---|
[0e37869] | 263 |
|
---|
[14de4227] | 264 | # If you are going to apply the patch for system graphite
|
---|
| 265 | # and system harfbuzz, uncomment these lines:
|
---|
| 266 | #ac_add_options --with-system-graphite2
|
---|
| 267 | #ac_add_options --with-system-harfbuzz
|
---|
| 268 |
|
---|
| 269 | # Stripping is now enabled by default.
|
---|
| 270 | # Uncomment these lines if you need to run a debugger:
|
---|
| 271 | #ac_add_options --disable-strip
|
---|
| 272 | #ac_add_options --disable-install-strip
|
---|
| 273 |
|
---|
[e399c12] | 274 | # Disabling debug symbols makes the build much smaller and a little
|
---|
[ec54fa5b] | 275 | # faster. Comment this if you need to run a debugger. Note: This is
|
---|
| 276 | # required for compilation on i686.
|
---|
[e399c12] | 277 | ac_add_options --disable-debug-symbols
|
---|
| 278 |
|
---|
[7251b1d] | 279 | # The BLFS editors recommend not changing anything below this line:
|
---|
[495ebe07] | 280 | ac_add_options --prefix=/usr
|
---|
[0e37869] | 281 | ac_add_options --enable-application=browser
|
---|
[495ebe07] | 282 |
|
---|
[c9677a35] | 283 | # The elf-hack is reported to cause failed installs (after successful builds)
|
---|
| 284 | # on some machines. It is supposed to improve startup time and it shrinks
|
---|
| 285 | # libxul.so by a few MB - comment this if you know your machine is not affected.
|
---|
| 286 | ac_add_options --disable-elf-hack
|
---|
| 287 |
|
---|
[5f5dcc2] | 288 | ac_add_options --disable-crashreporter
|
---|
| 289 | ac_add_options --disable-updater
|
---|
[57a8df2] | 290 | # enabling the tests will use a lot more space and significantly
|
---|
| 291 | # increase the build time, for no obvious benefit.
|
---|
[0e37869] | 292 | ac_add_options --disable-tests
|
---|
| 293 |
|
---|
[e399c12] | 294 | # The default level of optimization again produces a working build with gcc.
|
---|
[8df543f] | 295 | ac_add_options --enable-optimize
|
---|
[0e37869] | 296 |
|
---|
[9da4cc6f] | 297 | # From firefox-61 system cairo is not supported
|
---|
| 298 |
|
---|
[41f2e90] | 299 | ac_add_options --enable-system-ffi
|
---|
[0e37869] | 300 | ac_add_options --enable-system-pixman
|
---|
| 301 |
|
---|
[e628b536] | 302 | # From firefox-62 --with-pthreads is not recognized
|
---|
[0e37869] | 303 |
|
---|
| 304 | ac_add_options --with-system-bz2
|
---|
[a0ace670] | 305 | ac_add_options --with-system-jpeg
|
---|
| 306 | ac_add_options --with-system-png
|
---|
| 307 | ac_add_options --with-system-zlib
|
---|
[aed37975] | 308 |
|
---|
[1b0a207] | 309 | # The following option unsets Telemetry Reporting. With the Addons Fiasco,
|
---|
| 310 | # Mozilla was found to be collecting user's data, including saved passwords and
|
---|
| 311 | # web form data, without users consent. Mozilla was also found shipping updates
|
---|
| 312 | # to systems without the user's knowledge or permission.
|
---|
| 313 | # As a result of this, use the following command to permanently disable
|
---|
| 314 | # telemetry reporting in Firefox.
|
---|
| 315 | unset MOZ_TELEMETRY_REPORTING
|
---|
| 316 |
|
---|
[4def8b6] | 317 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
|
---|
[0e37869] | 318 | EOF</userinput></screen>
|
---|
[b9b7146] | 319 |
|
---|
[c1ae13c] | 320 | <para>
|
---|
| 321 | Compile <application>Firefox</application> by issuing the following
|
---|
| 322 | commands:
|
---|
| 323 | </para>
|
---|
[9572e88] | 324 |
|
---|
[14de4227] | 325 | <para>
|
---|
| 326 | If you have installed system versions of graphite2 and harfbuzz and wish
|
---|
| 327 | firefox to use those instead of its shipped versions, apply the patch and
|
---|
| 328 | uncomment the appropriate entries in the <filename>mozconfig</filename>
|
---|
[346e269] | 329 | file.
|
---|
[14de4227] | 330 | </para>
|
---|
| 331 |
|
---|
[2bfd23a] | 332 | <screen><userinput>patch -Np1 -i ../firefox-&firefox-version;esr-system_graphite2_harfbuzz-1.patch</userinput></screen>
|
---|
[14de4227] | 333 |
|
---|
[ad5a97d] | 334 | <para>
|
---|
| 335 | If the geolocation APIs are needed:
|
---|
| 336 | </para>
|
---|
| 337 |
|
---|
[e5c8de01] | 338 | <note>
|
---|
| 339 | <para>
|
---|
| 340 | <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
|
---|
| 341 | The Google and Mozilla API Keys below are specific to LFS. If using
|
---|
| 342 | these instructions for another distro, or if you intend to distribute
|
---|
| 343 | binary copies of the software using these instructions, please obtain
|
---|
| 344 | your own keys following the instructions located at
|
---|
| 345 | <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/> and
|
---|
| 346 | <ulink url="https://location.services.mozilla.com/api"/> respectively.
|
---|
| 347 | <!-- BLFS Devs, register an account at Google with your
|
---|
| 348 | @linuxfromscratch.org email address, and I'll make you an administrator
|
---|
| 349 | for the 'Google APIs for LFS' project (where the API and OAuth keys
|
---|
| 350 | were created for use in the book).-->
|
---|
| 351 | </para>
|
---|
| 352 | </note>
|
---|
| 353 |
|
---|
[ad5a97d] | 354 | <screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
|
---|
[5f18b7a8] | 355 | echo "613364a7-9418-4c86-bcee-57e32fd70c23" > mozilla-key</userinput></screen>
|
---|
[ad5a97d] | 356 |
|
---|
[8b3a8979] | 357 | <note><para>
|
---|
[9572e88] | 358 | If you are compiling <application>Firefox</application> in chroot, make
|
---|
| 359 | sure you have <envar>$SHELL</envar> environment variable set or prepend
|
---|
[b84fe71] | 360 | <envar>SHELL=/bin/sh</envar>. Also ensure that <filename>/dev/shm</filename>
|
---|
| 361 | is mounted.
|
---|
[8b3a8979] | 362 | </para></note>
|
---|
[57feeb5] | 363 | <!--
|
---|
[ec54fa5b] | 364 | <para>
|
---|
| 365 | If you are building on i686, apply a fix to prevent Internal Compiler
|
---|
| 366 | Errors in GCC-7+:
|
---|
[e399c12] | 367 | </para>
|
---|
| 368 |
|
---|
[ec54fa5b] | 369 | <screen><userinput remap="pre">case $(uname -m) in
|
---|
| 370 | i?86) sed -i "562 s/mips64/i386/" gfx/skia/skia/third_party/skcms/src/Transform_inl.h ;;
|
---|
| 371 | esac</userinput></screen>
|
---|
[57feeb5] | 372 | -->
|
---|
[29b0395] | 373 |
|
---|
| 374 | <para>
|
---|
| 375 | Now invoke the Python2 script to compile the package.
|
---|
| 376 | </para>
|
---|
[e8d45427] | 377 |
|
---|
[29b0395] | 378 | <screen><userinput>export CC=gcc CXX=g++ &&
|
---|
[ec1d8ae] | 379 | export MOZBUILD_STATE_PATH=${PWD}/mozbuild &&
|
---|
[f0b7ae67] | 380 | ./mach build</userinput></screen>
|
---|
[3bdfc9fd] | 381 |
|
---|
[0e37869] | 382 | <para>
|
---|
[57a8df2] | 383 | The <filename>mozconfig</filename> above disables the tests because
|
---|
| 384 | they use a lot more time and disk space for no obvious benefit. If
|
---|
[ecffcbbc] | 385 | you have nevertheless enabled them, you can run the tests by executing
|
---|
| 386 | <command>./mach gtest</command>. This will require a network connection,
|
---|
| 387 | and to be run from within an Xorg session - there is a popup dialog
|
---|
| 388 | when it fails to connect to ALSA (that does not create a failed test).
|
---|
| 389 | One or two tests will fail. To see the details of the failure(s) you
|
---|
| 390 | will need to log the output from that command so that you can review it.
|
---|
[0e37869] | 391 | </para>
|
---|
[01ce75f8] | 392 |
|
---|
[495ebe07] | 393 | <para>
|
---|
[b9f61df] | 394 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
[c1ae13c] | 395 | </para>
|
---|
[5a13c45] | 396 |
|
---|
[326f830] | 397 | <screen role="root"><userinput>./mach install &&
|
---|
[5ee1266] | 398 |
|
---|
[326f830] | 399 | mkdir -pv /usr/lib/mozilla/plugins &&
|
---|
[8d0bc761] | 400 | ln -sfv ../../mozilla/plugins /usr/lib/firefox/browser/</userinput></screen>
|
---|
[fe5f563d] | 401 |
|
---|
[a5708ba] | 402 | <para>
|
---|
| 403 | Set environment variables back to their values:
|
---|
| 404 | </para>
|
---|
| 405 |
|
---|
[e399c12] | 406 | <screen><userinput>unset CC CXX MOZBUILD_STATE_PATH</userinput></screen>
|
---|
[01ce75f8] | 407 |
|
---|
[b81991e1] | 408 | </sect2>
|
---|
| 409 |
|
---|
[361df3e] | 410 | <sect2 role="commands">
|
---|
| 411 | <title>Command Explanations</title>
|
---|
[7d09fcb9] | 412 |
|
---|
[29b0395] | 413 | <!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 414 | href="../../xincludes/SIOCGSTAMP.xml"/>-->
|
---|
[e8d45427] | 415 |
|
---|
[b84fe71] | 416 | <para>
|
---|
| 417 | <command>sed -e 's/checkImpl/checkFFImpl/g' ...</command>: Although the
|
---|
[e399c12] | 418 | package ships with a modified version of <application>ICU-63</application>
|
---|
| 419 | and only tests that the system version, if used, is at least 63, changes
|
---|
| 420 | from upstream 63 cause builds with the system version to fail with an error
|
---|
| 421 | message <literal>no void JSContext::checkImpl_63 member function</literal>.
|
---|
| 422 | The sed renames the local function. Upstream ICU-64 works around this.
|
---|
[b84fe71] | 423 | </para>
|
---|
| 424 |
|
---|
[9a469bc] | 425 | <para>
|
---|
[e399c12] | 426 | <command>export CC=gcc CXX=g++ ...</command>: Upstream now prefer
|
---|
| 427 | <application>clang</application>, but gcc is a more secure compiler and
|
---|
| 428 | now produces reasonably-sized builds.
|
---|
[9a469bc] | 429 | </para>
|
---|
| 430 |
|
---|
[fe5f563d] | 431 | <para>
|
---|
| 432 | <command>export MOZBUILD_STATE_PATH=${PWD}/mozbuild</command>: The build
|
---|
| 433 | is now supposed to tell you that it intends to create <filename
|
---|
| 434 | class="directory">~/.mozbuild</filename>, and offer you an option to
|
---|
| 435 | press <ENTER> to accept this, or Ctrl-C to cancel and restart the
|
---|
| 436 | build after specifying the directory. In practice, the message may not
|
---|
| 437 | appear until after <ENTER> is keyed, i.e. the build stalls.
|
---|
| 438 | </para>
|
---|
| 439 |
|
---|
| 440 | <para>
|
---|
| 441 | That directory is used for a (probably random) telemetry identifier.
|
---|
| 442 | Creating this in the build directory, and deleting that after the
|
---|
| 443 | installation, prevents it being used. If you wish to participate in
|
---|
| 444 | telemetry, export MOZBUILD_STATE_PATH to point to its default directory.
|
---|
| 445 | </para>
|
---|
| 446 |
|
---|
[a0d558d] | 447 | <para>
|
---|
[326f830] | 448 | <command>./mach build</command>: <application>Firefox</application>
|
---|
| 449 | now uses this <application>python2</application> script to run the
|
---|
| 450 | build and install.
|
---|
[a0d558d] | 451 | </para>
|
---|
| 452 |
|
---|
[c1ae13c] | 453 | <para>
|
---|
[326f830] | 454 | <option>./mach build --verbose</option>: Use this alternative if you
|
---|
| 455 | need details of which files are being compiled, together with any C or
|
---|
| 456 | C++ flags being used.
|
---|
[c1ae13c] | 457 | </para>
|
---|
| 458 |
|
---|
[9a469bc] | 459 | <para>
|
---|
[fe5f563d] | 460 | <option>./mach build -jN</option>: The build should, by default, use
|
---|
| 461 | all the online CPU cores. There are two reasons to specify the number
|
---|
| 462 | of cores, e.g. -j4 for 4 cores: First, if using all the cores causes
|
---|
| 463 | the build to swap because you have insufficient memory (e.g. for 4 cores
|
---|
[e399c12] | 464 | a build without system graphite2 and harfbuzz now uses towards 8GB
|
---|
[fe5f563d] | 465 | of RAM). In such cases, using fewer cores can be faster. Second, on some
|
---|
| 466 | machines the middle part of the build can drag on as if only one core is
|
---|
| 467 | present. In those cases, specifying the number of cores may speed up the
|
---|
| 468 | build.
|
---|
[9a469bc] | 469 | </para>
|
---|
| 470 |
|
---|
[c1ae13c] | 471 | <para>
|
---|
[8d0bc761] | 472 | <command>mkdir -pv /usr/lib/mozilla/plugins</command>: This ensures
|
---|
| 473 | that <filename class="directory">/usr/lib/mozilla/plugins/</filename>
|
---|
[c1ae13c] | 474 | exists.
|
---|
| 475 | </para>
|
---|
| 476 |
|
---|
| 477 | <para>
|
---|
[8d0bc761] | 478 | <command>ln -sv ... /usr/lib/firefox/browser</command>:
|
---|
[24da103] | 479 | This command creates a symbolic link to <filename
|
---|
| 480 | class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
|
---|
| 481 | needed, as <application>Firefox</application> checks <filename
|
---|
| 482 | class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
|
---|
| 483 | symbolic link is made to keep all the plugins installed in one folder.
|
---|
[c1ae13c] | 484 | </para>
|
---|
[fa1bc3e] | 485 |
|
---|
[e399c12] | 486 | <para>
|
---|
| 487 | <option>export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib</option>:
|
---|
| 488 | Use this as an alternative to building with gcc and g++ if you wish to use
|
---|
| 489 | the clang toolchain. Remember to unset these variables after the build.
|
---|
| 490 | </para>
|
---|
| 491 |
|
---|
[b81991e1] | 492 | </sect2>
|
---|
| 493 |
|
---|
[88cec02] | 494 | <sect2 role="configuration">
|
---|
| 495 | <title>Configuring Firefox</title>
|
---|
| 496 |
|
---|
[c1ae13c] | 497 | <para>
|
---|
| 498 | If you use a desktop environment like <application>Gnome</application> or
|
---|
| 499 | <application>KDE</application> you may like to create a
|
---|
| 500 | <filename>firefox.desktop</filename> file so that
|
---|
| 501 | <application>Firefox</application> appears in the panel's menus. If you
|
---|
| 502 | didn't enable startup-notification in your mozconfig change the
|
---|
| 503 | StartupNotify line to false. As the
|
---|
| 504 | <systemitem class="username">root</systemitem> user:
|
---|
| 505 | </para>
|
---|
[31de6e7] | 506 |
|
---|
[eb5f847a] | 507 | <screen role="root"><userinput>mkdir -pv /usr/share/applications &&
|
---|
[0e37869] | 508 | mkdir -pv /usr/share/pixmaps &&
|
---|
[74f73ede] | 509 |
|
---|
[c099902d] | 510 | cat > /usr/share/applications/firefox.desktop << "EOF" &&
|
---|
[fcd66369] | 511 | <literal>[Desktop Entry]
|
---|
[31de6e7] | 512 | Encoding=UTF-8
|
---|
[0e37869] | 513 | Name=Firefox Web Browser
|
---|
| 514 | Comment=Browse the World Wide Web
|
---|
| 515 | GenericName=Web Browser
|
---|
| 516 | Exec=firefox %u
|
---|
| 517 | Terminal=false
|
---|
[31de6e7] | 518 | Type=Application
|
---|
| 519 | Icon=firefox
|
---|
[0e37869] | 520 | Categories=GNOME;GTK;Network;WebBrowser;
|
---|
| 521 | MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
|
---|
[fcd66369] | 522 | StartupNotify=true</literal>
|
---|
[31de6e7] | 523 | EOF
|
---|
[74f73ede] | 524 |
|
---|
[888e303] | 525 | ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
|
---|
[0e37869] | 526 | /usr/share/pixmaps/firefox.png</userinput></screen>
|
---|
| 527 |
|
---|
[326f830] | 528 | <sect3><title>Configuration Information</title>
|
---|
| 529 |
|
---|
| 530 | <para>
|
---|
| 531 | The application settings for firefox are accessible by keying
|
---|
| 532 | <command>about:config</command> in the address bar.
|
---|
| 533 | </para>
|
---|
| 534 |
|
---|
| 535 | <para>
|
---|
| 536 | With this version of <application>firefox</application>, getting
|
---|
| 537 | working sound can be a problem. Although upstream prefers pulseaudio,
|
---|
| 538 | on balance using <application>Alsa</application> may be easier.
|
---|
| 539 | </para>
|
---|
| 540 |
|
---|
| 541 | <para>
|
---|
| 542 | If you enabled <application>Alsa</application> for sound, you may need
|
---|
| 543 | to alter one variable to get working sound. If you run
|
---|
| 544 | <command>firefox</command> from a term and try to play something with
|
---|
| 545 | sound you might encounter error messages like:
|
---|
| 546 | </para>
|
---|
| 547 |
|
---|
| 548 | <para>
|
---|
| 549 | <literal>Sandbox: seccomp sandbox violation: pid 3941, tid 4030,
|
---|
| 550 | syscall 16, args 48 2147767296 139909894784796 0 0 0.</literal>
|
---|
| 551 | </para>
|
---|
| 552 |
|
---|
| 553 | <para>
|
---|
| 554 | That was on x86_64, on i686 the syscall number is 54. To allow this
|
---|
| 555 | syscall, in <command>about:config</command> change
|
---|
| 556 | <command>security.sandbox.content.syscall_whitelist</command> to 16
|
---|
| 557 | (or 54 if using i686).
|
---|
| 558 | </para>
|
---|
| 559 |
|
---|
| 560 | <para>
|
---|
| 561 | If you use <command>pulseaudio</command> in a Desktop Environment, it
|
---|
| 562 | might already be started by that DE. But if it is not, although
|
---|
[7ebe22e] | 563 | firefox-57 managed to start it, firefox-58 did not. If you run
|
---|
| 564 | <command>firefox</command> from a term and this problem is present,
|
---|
| 565 | trying to play sound will
|
---|
[326f830] | 566 | encounter error messages warning <literal>Can't get cubeb
|
---|
| 567 | context!</literal>
|
---|
| 568 | </para>
|
---|
| 569 |
|
---|
| 570 | <para>
|
---|
| 571 | The fix for this is to close firefox, start pulseaudio to check it
|
---|
| 572 | does start (if not, read the information on Configuring in <xref
|
---|
| 573 | linkend="pulseaudio"/>) and restart firefox to check it is working.
|
---|
| 574 | If it now works, add the following to your <filename>~/.xinitrc</filename>:
|
---|
| 575 | <phrase revision="sysv">
|
---|
| 576 | <literal>pulseaudio --verbose --log-target=syslog&</literal></phrase>
|
---|
| 577 | <phrase revision="systemd">
|
---|
| 578 | <literal>pulseaudio --verbose --log-target=journald&</literal></phrase>
|
---|
| 579 | (unfortunately, on some systems this does not work).
|
---|
| 580 | </para>
|
---|
| 581 |
|
---|
| 582 | <para>
|
---|
| 583 | You may wish to use multiple profiles within firefox. To do that, invoke
|
---|
| 584 | firefox as <command>firefox --ProfileManager</command>. You can also
|
---|
| 585 | check which profile is currently in use from
|
---|
| 586 | <command>about:profiles</command>.
|
---|
| 587 | </para>
|
---|
| 588 |
|
---|
| 589 | </sect3>
|
---|
[88cec02] | 590 | </sect2>
|
---|
| 591 |
|
---|
[b81991e1] | 592 | <sect2 role="content">
|
---|
| 593 | <title>Contents</title>
|
---|
| 594 |
|
---|
| 595 | <segmentedlist>
|
---|
| 596 | <segtitle>Installed Programs</segtitle>
|
---|
| 597 | <segtitle>Installed Libraries</segtitle>
|
---|
[c5f005b] | 598 | <segtitle>Installed Directory</segtitle>
|
---|
[b81991e1] | 599 |
|
---|
| 600 | <seglistitem>
|
---|
[0e37869] | 601 | <seg>
|
---|
| 602 | firefox
|
---|
| 603 | </seg>
|
---|
[c1ae13c] | 604 | <seg>
|
---|
| 605 | Numerous libraries, browser components, plugins, extensions, and
|
---|
[8d0bc761] | 606 | helper modules installed in /usr/lib/firefox
|
---|
[c1ae13c] | 607 | </seg>
|
---|
[7498751] | 608 | <seg>
|
---|
[54814bdd] | 609 | /usr/lib/firefox and /usr/lib/mozilla
|
---|
[7498751] | 610 | </seg>
|
---|
[b81991e1] | 611 | </seglistitem>
|
---|
| 612 | </segmentedlist>
|
---|
| 613 |
|
---|
| 614 | <variablelist>
|
---|
| 615 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 616 | <?dbfo list-presentation="list"?>
|
---|
| 617 | <?dbhtml list-presentation="table"?>
|
---|
| 618 |
|
---|
| 619 | <varlistentry id="firefox-prog">
|
---|
| 620 | <term><command>firefox</command></term>
|
---|
| 621 | <listitem>
|
---|
[c1ae13c] | 622 | <para>
|
---|
[7e1afc9] | 623 | is a <application>GTK+-3</application> internet browser that uses
|
---|
| 624 | the Mozilla Gecko rendering engine.
|
---|
[c1ae13c] | 625 | </para>
|
---|
[b81991e1] | 626 | <indexterm zone="firefox firefox-prog">
|
---|
| 627 | <primary sortas="b-firefox">firefox</primary>
|
---|
| 628 | </indexterm>
|
---|
| 629 | </listitem>
|
---|
| 630 | </varlistentry>
|
---|
[0e37869] | 631 |
|
---|
[b81991e1] | 632 | </variablelist>
|
---|
[0e37869] | 633 |
|
---|
[b81991e1] | 634 | </sect2>
|
---|
[0e37869] | 635 |
|
---|
[4d37129] | 636 | </sect1>
|
---|