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