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