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