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