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