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