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