source: xsoft/graphweb/firefox.xml@ 4e207bb

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since 4e207bb was 4e207bb, checked in by Pierre Labastie <pierre.labastie@…>, 20 months ago

Replace tabs with spaces (except in Makefile :)

  • Property mode set to 100644
File size: 22.8 KB
Line 
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 "dd6b04f0972a2256b8e2d66ae6b855e3">
10 <!ENTITY firefox-size "458 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.0 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 "26 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<!-- indicate this is the ESR variant,
28 The point was that the 102.0 stable release differed slightly.
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 &lfs112_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
111tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
112tar: 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 <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>
133 </note>
134
135 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
136
137 <bridgehead renderas="sect4">Required</bridgehead>
138 <para role="required">
139 <xref linkend="autoconf213"/>,
140 <xref linkend="cbindgen"/>,
141 <xref linkend="dbus-glib"/>,
142 <xref linkend="gtk3"/>,
143 <xref linkend="libnotify"/>,
144 <xref linkend="llvm"/> (with clang, used for bindgen even if using gcc),
145 <xref linkend="nodejs"/>,
146 <xref linkend="pulseaudio"/>
147 (or
148 <xref linkend="alsa-lib"/> if you edit the mozconfig;
149 now deprecated by mozilla), in either case please read the
150 Configuration Information,
151 <xref linkend="python3"/> (rebuilt after installing <xref linkend="sqlite"/>),
152 <xref linkend="startup-notification"/>,
153 <xref linkend="unzip"/>,
154 <xref linkend="yasm"/>, and
155 <xref linkend="zip"/>
156 </para>
157
158 <bridgehead renderas="sect4">Recommended</bridgehead>
159 <para role="recommended">
160 <xref linkend="icu"/>,
161 <xref linkend="libevent"/>,
162 <xref linkend="libvpx"/>,
163 <xref linkend="libwebp"/>,
164 <xref linkend="nasm"/>,
165 <xref linkend="nss"/>
166 </para>
167
168 <note>
169 <para>
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.
173 </para>
174 </note>
175
176 <bridgehead renderas="sect4">Optional</bridgehead>
177 <para role="optional">
178 <xref linkend="curl"/>,
179 <xref linkend="doxygen"/>,
180 <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
181 <xref linkend="liboauth"/>,
182 <xref linkend="valgrind"/>,
183 <xref linkend="wget"/>,
184 <xref linkend="wireless_tools"/>,
185 <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>
186 </para>
187
188 <para condition="html" role="usernotes">
189 User Notes: <ulink url="&blfs-wiki;/firefox"/>
190 </para>
191 </sect2>
192
193 <sect2 role="installation">
194 <title>Installation of Firefox</title>
195
196 <para>
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
201 (and an abbreviated description of some of them), issue <command>./mach
202 configure &amp;&amp; ./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:
205 </para>
206
207<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
208<literal># If you have a multicore machine, all cores will be used by default.
209
210# If you have installed (or will install) wireless-tools, and you wish
211# to use geolocation web services, comment out this line
212ac_add_options --disable-necko-wifi
213
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
218# Uncomment the following line if you wish to use Google's geolocation API
219# (needed for use with saved maps with Google Maps)
220#ac_add_options --with-google-location-service-api-keyfile=$PWD/google-key
221
222# startup-notification is required since firefox-78
223
224# Uncomment the following option if you have not installed PulseAudio and
225# want to use alsa instead
226#ac_add_options --enable-audio-backends=alsa
227
228# Comment out following options if you have not installed
229# recommended dependencies:
230ac_add_options --with-system-icu
231ac_add_options --with-system-libevent
232ac_add_options --with-system-libvpx
233ac_add_options --with-system-nspr
234ac_add_options --with-system-nss
235ac_add_options --with-system-webp
236
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.
240
241# libdavid (av1 decoder) requires nasm. Uncomment this if nasm
242# has not been installed. Do not uncomment this if you have
243# ffmpeg-5 installed.
244#ac_add_options --disable-av1
245
246# You cannot distribute the binary if you do this
247ac_add_options --enable-official-branding
248
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
254# Disabling debug symbols makes the build much smaller and a little
255# faster. Comment this if you need to run a debugger. Note: This is
256# required for compilation on i686.
257ac_add_options --disable-debug-symbols
258
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.
262ac_add_options --disable-elf-hack
263
264# The BLFS editors recommend not changing anything below this line:
265ac_add_options --prefix=/usr
266ac_add_options --enable-application=browser
267ac_add_options --disable-crashreporter
268ac_add_options --disable-updater
269# enabling the tests will use a lot more space and significantly
270# increase the build time, for no obvious benefit.
271ac_add_options --disable-tests
272
273# The default level of optimization again produces a working build with gcc.
274ac_add_options --enable-optimize
275
276ac_add_options --enable-system-ffi
277ac_add_options --enable-system-pixman
278
279ac_add_options --with-system-jpeg
280ac_add_options --with-system-png
281ac_add_options --with-system-zlib
282
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.
286ac_add_options --without-wasm-sandboxed-libraries
287
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.
294unset MOZ_TELEMETRY_REPORTING
295
296mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
297EOF</userinput></screen>
298
299 <para>
300 Compile <application>Firefox</application> by issuing the following
301 commands:
302 </para>
303
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
307 prevents the build from eventually failing:
308 </para>
309
310<screen><userinput>sed -i '/ROOT_CLIP_CHAIN/d' gfx/webrender_bindings/webrender_ffi.h</userinput></screen>
311
312<!-- Not needed with clang. Upstream bug at
313 https://bugzilla.mozilla.org/show_bug.cgi?id=1729459
314
315 <para>
316 If building on a 32 bit machine, the following sed works around
317 an issue with an incompatible <quote>double</quote> type in one
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 ;;
324esac</userinput></screen>
325-->
326 <para>
327 If the geolocation APIs are needed:
328 </para>
329
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
346<screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
347echo "613364a7-9418-4c86-bcee-57e32fd70c23" > mozilla-key</userinput></screen>
348
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>
358
359 <para>
360 Now invoke the Python <command>mach</command> script to compile the package.
361 </para>
362
363<screen><userinput>export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system &amp;&amp;
364export MOZBUILD_STATE_PATH=${PWD}/mozbuild &amp;&amp;
365./mach configure &amp;&amp;
366./mach build</userinput></screen>
367
368 <para>
369 The <filename>mozconfig</filename> above disables the tests because
370 they use a lot more time and disk space for no obvious benefit. If
371 you have nevertheless enabled them, you can run the tests by executing
372 <command>./mach gtest</command>. This will require a network connection,
373 and to be run from within an Xorg session - there is a popup dialog
374 when it fails to connect to ALSA (that does not create a failed test).
375 One or two tests will fail. To see the details of the failure(s) you
376 will need to log the output from that command so that you can review it.
377 </para>
378
379 <para>
380 Now, as the <systemitem class="username">root</systemitem> user:
381 </para>
382
383<screen role="root"><userinput>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system ./mach install</userinput></screen>
384
385 <para>
386 Empty the environment variables which were set above:
387 </para>
388
389<screen><userinput>unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE MOZBUILD_STATE_PATH</userinput></screen>
390
391 </sect2>
392
393 <sect2 role="commands">
394 <title>Command Explanations</title>
395
396<!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
397 href="../../xincludes/SIOCGSTAMP.xml"/>-->
398
399 <para>
400 <command>export MOZBUILD_STATE_PATH=${PWD}/mozbuild</command>: The build
401 is now supposed to tell you that it intends to create <filename
402 class="directory">~/.mozbuild</filename>, and offer you an option to
403 press &lt;ENTER&gt; to accept this, or Ctrl-C to cancel and restart the
404 build after specifying the directory. In practice, the message may not
405 appear until after &lt;ENTER&gt; is keyed, i.e. the build stalls.
406 </para>
407
408 <para>
409 That directory is used for a (probably random) telemetry identifier.
410 Creating this in the build directory, and deleting that after the
411 installation, prevents it being used. If you wish to participate in
412 telemetry, export MOZBUILD_STATE_PATH to point to its default directory
413 and remove the entry from the <filename>mozconfig</filename>.
414 </para>
415
416 <para>
417 <command>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system</command>: Use the
418 system python to create a virtual environment for <command>mach</command>
419 without downloading any python wheels.
420 </para>
421
422 <para>
423 <command>./mach configure</command>: This validates the supplied
424 dependencies and the <filename>mozconfig</filename>.
425 </para>
426
427 <para>
428 <option>./mach build --verbose</option>: Use this alternative if you
429 need details of which files are being compiled, together with any C or
430 C++ flags being used. But do not add '--verbose' to the install command
431 since it is not accepted there.
432 </para>
433
434 <para>
435 <option>./mach build -jN</option>: The build should, by default, use
436 all the online CPU cores. If using all the cores causes the build to swap
437 because you have insufficient memory, using fewer cores can be faster.
438 </para>
439
440 <para>
441 <option><envar>CC=gcc CXX=g++</envar></option>: BLFS used to
442 prefer to use gcc and g++ instead of upstream's defaults of the
443 <application>clang</application> programs. With the release of
444 gcc-12 the build takes longer with gcc and g++, primarily because
445 of extra warnings, and is bigger. Set these environment variables
446 <emphasis>before you run the configure script</emphasis>
447 if you wish to continue to use gcc, g++. Building
448 with GCC on i?86 is currently broken.
449 </para>
450
451 </sect2>
452
453 <sect2 role="configuration">
454 <title>Configuring Firefox</title>
455
456 <para>
457 If you use a desktop environment like <application>Gnome</application> or
458 <application>KDE</application> you may want to create a
459 <filename>firefox.desktop</filename> file so that
460 <application>Firefox</application> appears in the panel's menus.
461 As the &root; user:
462 </para>
463
464<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
465mkdir -pv /usr/share/pixmaps &amp;&amp;
466
467MIMETYPE="text/xml;text/mml;text/html;" &amp;&amp;
468MIMETYPE+="application/xhtml+xml;application/vnd.mozilla.xul+xml;" &amp;&amp;
469MIMETYPE+="x-scheme-handler/http;x-scheme-handler/https" &amp;&amp;
470
471cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; EOF &amp;&amp;
472<literal>[Desktop Entry]
473Encoding=UTF-8
474Name=Firefox Web Browser
475Comment=Browse the World Wide Web
476GenericName=Web Browser
477Exec=firefox %u
478Terminal=false
479Type=Application
480Icon=firefox
481Categories=GNOME;GTK;Network;WebBrowser;
482MimeType=$MIMETYPE
483StartupNotify=true</literal>
484EOF
485
486unset MIMETYPE &amp;&amp;
487
488ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
489 /usr/share/pixmaps/firefox.png</userinput></screen>
490
491 <sect3><title>Configuration Information</title>
492
493 <para>
494 The application settings for firefox are accessible by keying
495 <command>about:config</command> in the address bar.
496 </para>
497
498 <para>
499 Occasionally, getting working sound in
500 <application>firefox</application> can be a problem. Although upstream
501 prefers pulseaudio,
502 on balance using <application>Alsa</application> may be easier.
503 </para>
504
505 <para>
506 If you enabled <application>Alsa</application> for sound, you may need
507 to alter one variable to get working sound. If you run
508 <command>firefox</command> from a terminal and try to play something
509 with sound you might encounter error messages like:
510 </para>
511
512 <para>
513 <literal>Sandbox: seccomp sandbox violation: pid 3941, tid 4030,
514 syscall 16, args 48 2147767296 139909894784796 0 0 0.</literal>
515 </para>
516
517 <para>
518 That was on x86_64, on i686 the syscall number is 54. To allow this
519 syscall, in <command>about:config</command> change
520 <command>security.sandbox.content.syscall_whitelist</command> to 16
521 (or 54 if using i686).
522 </para>
523
524 <para>
525 If you use <command>pulseaudio</command> in a Desktop Environment, it
526 might already be started by that DE. But if it is not, although
527 firefox-57 managed to start it, firefox-58 did not. If you run
528 <command>firefox</command> from a terminal and this problem is present,
529 trying to play sound will
530 encounter error messages warning <literal>Can't get cubeb
531 context!</literal>
532 </para>
533
534 <para>
535 The fix for this is to close firefox, start pulseaudio to check it
536 does start (if not, read the information on Configuring in <xref
537 linkend="pulseaudio"/>) and restart firefox to check it is working.
538 If it now works, add the following to your <filename>~/.xinitrc</filename>:
539<phrase revision="sysv">
540<literal>pulseaudio --verbose --log-target=syslog&amp;</literal></phrase>
541<phrase revision="systemd">
542<literal>pulseaudio --verbose --log-target=journald&amp;</literal></phrase>
543 (unfortunately, on some systems this does not work).
544 </para>
545
546 <para>
547 You may wish to use multiple profiles within firefox. To do that, invoke
548 firefox as <command>firefox --ProfileManager</command>. You can also
549 check which profile is currently in use from
550 <command>about:profiles</command>.
551 </para>
552
553 <para>
554 Although WebRender (using the GPU for compositing) is not used by
555 default, it now appears to work well on supported hardware (ATI, Nvidia
556 and Intel GPUs with Mesa-18 or later). For an explanation, please see
557 <ulink
558 url="https://hacks.mozilla.org/2017/10/the-whole-web-at-maximum-fps-how-webrender-gets-rid-of-jank/">hacks.mozilla.org</ulink>.
559 The only downside seems to be that on a machine with limited RAM it might
560 use more RAM.
561 </para>
562
563 <para>
564 To check if WebRender is being used, look in about:support. In the Graphics
565 section, Compositing will either show 'Basic' (i.e. not in use) or
566 'WebRender'. To enable it, go to about:config and change gfx.webrender.all
567 to True. You will need to restart firefox.
568 </para>
569
570 <para>
571 It may be useful to mention the processes from firefox which can appear in
572 <command>top</command> - as well as firefox itself, there may be multiple
573 Web Content processes, and now an RDD Process (Remote Data Decoder) which
574 appears when playing web videos encoded with av1 (libdav1d). If WebRender
575 has been enabled, a GPU Process will also appear when firefox has to
576 repaint (e.g. scrolling, opening a new tab, or playing a video).
577 </para>
578
579 </sect3>
580 </sect2>
581
582 <sect2 role="content">
583 <title>Contents</title>
584
585 <segmentedlist>
586 <segtitle>Installed Programs</segtitle>
587 <segtitle>Installed Libraries</segtitle>
588 <segtitle>Installed Directory</segtitle>
589
590 <seglistitem>
591 <seg>
592 firefox
593 </seg>
594 <seg>
595 Numerous libraries, browser components, plugins, extensions, and
596 helper modules installed in /usr/lib/firefox
597 </seg>
598 <seg>
599 /usr/lib/firefox
600 </seg>
601 </seglistitem>
602 </segmentedlist>
603
604 <variablelist>
605 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
606 <?dbfo list-presentation="list"?>
607 <?dbhtml list-presentation="table"?>
608
609 <varlistentry id="firefox-prog">
610 <term><command>firefox</command></term>
611 <listitem>
612 <para>
613 is a <application>GTK+-3</application> internet browser that uses
614 the Mozilla Gecko rendering engine
615 </para>
616 <indexterm zone="firefox firefox-prog">
617 <primary sortas="b-firefox">firefox</primary>
618 </indexterm>
619 </listitem>
620 </varlistentry>
621
622 </variablelist>
623
624 </sect2>
625
626</sect1>
Note: See TracBrowser for help on using the repository browser.