source: xsoft/graphweb/firefox.xml@ 1159b21

10.0 10.1 11.0 11.1 11.2 9.0 9.1 lazarus qt5new trunk upgradedb xry111/intltool xry111/soup3 xry111/test-20220226
Last change on this file since 1159b21 was 1159b21, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago


git-svn-id: svn:// af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 23.8 KB
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
7 <!ENTITY firefox-download-http "&mozilla-http;/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.xz">
8 <!ENTITY firefox-download-ftp " ">
9 <!ENTITY firefox-md5sum "efb501a4e8100991d90c589cb6837798">
10 <!ENTITY firefox-size "297 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 "4.1 GB (162 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 "25 SBU (with parallelism=4) without tests">
20<sect1 id="firefox" xreflabel="Firefox-&firefox-version;">
21 <?dbhtml filename="firefox.html" ?>
23 <sect1info>
24 <othername>$LastChangedBy$</othername>
25 <date>$Date$</date>
26 </sect1info>
28 <title>Firefox-&firefox-version;</title>
30 <indexterm zone="firefox">
31 <primary sortas="a-Firefox">Firefox</primary>
32 </indexterm>
34 <sect2 role="package">
35 <title>Introduction to Firefox</title>
37 <para>
38 <application>Firefox</application> is a stand-alone browser based on the
39 <application>Mozilla</application> codebase.
40 </para>
42 &lfs90_checked;
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>
48 Download (HTTP): <ulink url="&firefox-download-http;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download (FTP): <ulink url="&firefox-download-ftp;"/>
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download MD5 sum: &firefox-md5sum;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Download size: &firefox-size;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated disk space required: &firefox-buildsize;
69 </para>
70 </listitem>
71 <listitem>
72 <para>
73 Estimated build time: &firefox-time;
74 </para>
75 </listitem>
76 </itemizedlist>
78 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
79 <itemizedlist spacing="compact">
80 <listitem>
81 <para>
82 Optional patch to allow system versions of <xref linkend="graphite2"/>
83 and <xref linkend="harfbuzz"/>:
84 <ulink url="&patch-root;/firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch"/>
85 </para>
86 </listitem>
87 </itemizedlist>
89 <note>
90 <para>
91 Extracting the tarball
92 will reset the permissions of the current directory to 0755 if you
93 have permission to do that. If you do this in a directory where
94 the sticky bit is set, such
95 as <filename class="directory">/tmp</filename> it will end with error
96 messages:
97 </para>
99<literallayout>tar: .: Cannot utime: Operation not permitted
100tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
101tar: Exiting with failure status due to previous errors
104 <para>
105 This does finish with non-zero status, but it does
106 <emphasis>NOT</emphasis> mean there is a real problem.
107 Do not untar as the <systemitem class="username">root</systemitem> user
108 in a directory where the sticky bit is set - that will unset it.
109 </para>
111 <para>
112 As with other large packages which use C++ (or rust), the SBU times
113 to build this vary more widely than you might expect. Also, 6GB
114 of real memory is used during the final link and the SBUs can increase
115 significantly if the machine has to swap.
116 </para>
118 <para>
119 The mach build system (Python scripts) can be somewhat unreliable: if
120 the build fails and reports an Error, it can still return a status of
121 success, causing a scripted build to try to install (which does not rerun
122 the build), fail during the preparations for installing, but still exit
123 with a status of success. Also, on occasion it may limit itself to only
124 running one set of jobs - that will make the build take about 3 times as
125 long as running with four sets of jobs.
126 </para>
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>
135 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
137 <bridgehead renderas="sect4">Required</bridgehead>
138 <para role="required">
139 <xref linkend="autoconf213"/>,
140 <xref linkend="cbindgen"/>,
141 both <xref linkend="gtk3"/> and
142 <xref linkend="gtk2"/>,
143 <xref linkend="libnotify"/>,
144 <xref linkend="nodejs"/>,
145 <xref linkend="nss"/>,
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="rust"/>,
152 <xref linkend="unzip"/>,
153 <xref linkend="yasm"/>, and
154 <xref linkend="zip"/>
155 </para>
157 <bridgehead renderas="sect4">Recommended</bridgehead>
158 <para role="recommended">
159 <xref linkend="icu"/>,
160 <xref linkend="libevent"/>,
161<!-- fails to build in 65.0 (headers changed)
162 <xref linkend="libvpx"/>, -->
163 <xref linkend="libwebp"/>,
164 <xref linkend="nasm"/>, and
165 <xref linkend="sqlite"/>
166 </para>
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>
176 <bridgehead renderas="sect4">Optional</bridgehead>
177 <para role="optional">
178 <xref linkend="curl"/>,
179 <xref linkend="dbus-glib"/>,
180 <xref linkend="doxygen"/>,
181 <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
182 <!-- <phrase revision="sysv"><ulink url="">liboauth</ulink></phrase> -->
183 <xref linkend="liboauth"/>,
184 <xref linkend="openjdk"/>,
185 <xref linkend="startup-notification"/>,
186 <xref linkend="valgrind"/>,
187 <xref linkend="wget"/>,
188 <xref linkend="wireless_tools"/>,
189 <ulink url="">libproxy</ulink>,
190 and (with the patch)
191 <xref linkend="graphite2"/> and
192 <xref linkend="harfbuzz"/>
193 </para>
195 <para condition="html" role="usernotes">
196 User Notes: <ulink url="&blfs-wiki;/firefox"/>
197 </para>
198 </sect2>
200 <sect2 role="installation">
201 <title>Installation of Firefox</title>
203 <para>
204 The configuration of <application>Firefox</application> is accomplished
205 by creating a <filename>mozconfig</filename> file containing the desired
206 configuration options. A default <filename>mozconfig</filename> is
207 created below. To see the entire list of available configuration options
208 (and an abbreviated description of some of them), issue <command>./mach
209 configure &amp;&amp; ./configure --help | less</command>. You may also
210 wish to review the entire file and uncomment any other desired options.
211 Create the file by issuing the following command:
212 </para>
214<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
215<literal># If you have a multicore machine, all cores will be used by default.
217# If you have installed dbus-glib, comment out this line:
218ac_add_options --disable-dbus
220# If you have installed dbus-glib, and you have installed (or will install)
221# wireless-tools, and you wish to use geolocation web services, comment out
222# this line
223ac_add_options --disable-necko-wifi
225# API Keys for geolocation APIs - necko-wifi (above) is required for MLS
226# Uncomment the following line if you wish to use Mozilla Location Service
227#ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
229# Uncomment the following line if you wish to use Google's geolocaton API
230# (needed for use with saved maps with Google Maps)
231#ac_add_options --with-google-location-service-api-keyfile=$PWD/google-key
233# Uncomment this line if you have installed startup-notification:
234#ac_add_options --enable-startup-notification
236# Uncomment the following option if you have not installed PulseAudio
237#ac_add_options --disable-pulseaudio
238# or uncomment this if you installed alsa-lib instead of PulseAudio
239#ac_add_options --enable-alsa
241# Comment out following options if you have not installed
242# recommended dependencies:
243ac_add_options --enable-system-sqlite
244ac_add_options --with-system-libevent
245# firefox-65 understands webp and ships with an included copy
246ac_add_options --with-system-webp
247ac_add_options --with-system-nspr
248ac_add_options --with-system-nss
249ac_add_options --with-system-icu
251# Do not specify the gold linker which is not the default. It will take
252# longer and use more disk space when debug symbols are disabled.
254# libdavid (av1 decoder) requires nasm. Uncomment this if nasm
255# has not been installed.
256#ac_add_options --disable-av1
258# You cannot distribute the binary if you do this
259ac_add_options --enable-official-branding
261# If you are going to apply the patch for system graphite
262# and system harfbuzz, uncomment these lines:
263#ac_add_options --with-system-graphite2
264#ac_add_options --with-system-harfbuzz
266# Stripping is now enabled by default.
267# Uncomment these lines if you need to run a debugger:
268#ac_add_options --disable-strip
269#ac_add_options --disable-install-strip
271# Disabling debug symbols makes the build much smaller and a little
272# faster. Comment this if you need to run a debugger. Note: This is
273# required for compilation on i686.
274ac_add_options --disable-debug-symbols
276# The BLFS editors recommend not changing anything below this line:
277ac_add_options --prefix=/usr
278ac_add_options --enable-application=browser
280# The elf-hack is reported to cause failed installs (after successful builds)
281# on some machines. It is supposed to improve startup time and it shrinks
282# by a few MB - comment this if you know your machine is not affected.
283ac_add_options --disable-elf-hack
285ac_add_options --disable-crashreporter
286ac_add_options --disable-updater
287# enabling the tests will use a lot more space and significantly
288# increase the build time, for no obvious benefit.
289ac_add_options --disable-tests
291# The default level of optimization again produces a working build with gcc.
292ac_add_options --enable-optimize
294# From firefox-61 system cairo is not supported
296ac_add_options --enable-system-ffi
297ac_add_options --enable-system-pixman
299# From firefox-62 --with-pthreads is not recognized
301ac_add_options --with-system-bz2
302ac_add_options --with-system-jpeg
303ac_add_options --with-system-png
304ac_add_options --with-system-zlib
306# The following option unsets Telemetry Reporting. With the Addons Fiasco,
307# Mozilla was found to be collecting user's data, including saved passwords and
308# web form data, without users consent. Mozilla was also found shipping updates
309# to systems without the user's knowledge or permission.
310# As a result of this, use the following command to permanently disable
311# telemetry reporting in Firefox.
314mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
317 <para>
318 Compile <application>Firefox</application> by issuing the following
319 commands:
320 </para>
322 <para>
323 If you have installed system versions of graphite2 and harfbuzz and wish
324 firefox to use those instead of its shipped versions, apply the patch and
325 uncomment the appropriate entries in the <filename>mozconfig</filename>
326 file.
327 </para>
329<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch</userinput></screen>
331 <para>
332 If the geolocation APIs are needed:
333 </para>
335 <note>
336 <para>
337 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
338 The Google and Mozilla API Keys below are specific to LFS. If using
339 these instructions for another distro, or if you intend to distribute
340 binary copies of the software using these instructions, please obtain
341 your own keys following the instructions located at
342 <ulink url=""/> and
343 <ulink url=""/> respectively.
344 <!-- BLFS Devs, register an account at Google with your
345 email address, and I'll make you an administrator
346 for the 'Google APIs for LFS' project (where the API and OAuth keys
347 were created for use in the book).-->
348 </para>
349 </note>
351<screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
352echo "d2284a20-0505-4927-a809-7ffaf4d91e55" > mozilla-key</userinput></screen>
354 <note><para>
355 If you are compiling <application>Firefox</application> in chroot, make
356 sure you have <envar>$SHELL</envar> environment variable set or prepend
357 <envar>SHELL=/bin/sh</envar>. Also ensure that <filename>/dev/shm</filename>
358 is mounted.
359 </para></note>
361 <para>
362 If you are still using ICU-63, run a sed to avoid a conflict between
363 upstream ICU's use of <literal>CheckImpl()</literal> in their public headers
364 and firefox's internal use of a different <literal>CheckImpl()</literal>.
365 </para>
367<screen role="nodump"><userinput>sed -e 's/checkImpl/checkFFImpl/g' -i js/src/vm/JSContext*.h</userinput></screen>
369 <para>
370 If you are building on i686, apply a fix to prevent Internal Compiler
371 Errors in GCC-7+:
372 </para>
374<screen><userinput remap="pre">case $(uname -m) in
375 i?86) sed -i "562 s/mips64/i386/" gfx/skia/skia/third_party/skcms/src/Transform_inl.h ;;
378 <para>
379 Now invoke the Python2 script to compile the package.
380 </para>
382<screen><userinput>export CC=gcc CXX=g++ &amp;&amp;
383export MOZBUILD_STATE_PATH=${PWD}/mozbuild &amp;&amp;
384./mach build</userinput></screen>
386 <para>
387 The <filename>mozconfig</filename> above disables the tests because
388 they use a lot more time and disk space for no obvious benefit. If
389 you have nevertheless enabled them, you can run the tests by executing
390 <command>./mach gtest</command>. This will require a network connection,
391 and to be run from within an Xorg session - there is a popup dialog
392 when it fails to connect to ALSA (that does not create a failed test).
393 One or two tests will fail. To see the details of the failure(s) you
394 will need to log the output from that command so that you can review it.
395 </para>
397 <para>
398 Now, as the <systemitem class="username">root</systemitem> user:
399 </para>
401<screen role="root"><userinput>./mach install &amp;&amp;
403mkdir -pv /usr/lib/mozilla/plugins &amp;&amp;
404ln -sfv ../../mozilla/plugins /usr/lib/firefox/browser/</userinput></screen>
406 <para>
407 Set environment variables back to their values:
408 </para>
410<screen><userinput>unset CC CXX MOZBUILD_STATE_PATH</userinput></screen>
412 </sect2>
414 <sect2 role="commands">
415 <title>Command Explanations</title>
417<!--<xi:include xmlns:xi=""
418 href="../../xincludes/SIOCGSTAMP.xml"/>-->
420 <para>
421 <command>sed -e 's/checkImpl/checkFFImpl/g' ...</command>: Although the
422 package ships with a modified version of <application>ICU-63</application>
423 and only tests that the system version, if used, is at least 63, changes
424 from upstream 63 cause builds with the system version to fail with an error
425 message <literal>no void JSContext::checkImpl_63 member function</literal>.
426 The sed renames the local function. Upstream ICU-64 works around this.
427 </para>
429 <para>
430 <command>export CC=gcc CXX=g++ ...</command>: Upstream now prefer
431 <application>clang</application>, but gcc is a more secure compiler and
432 now produces reasonably-sized builds.
433 </para>
435 <para>
436 <command>export MOZBUILD_STATE_PATH=${PWD}/mozbuild</command>: The build
437 is now supposed to tell you that it intends to create <filename
438 class="directory">~/.mozbuild</filename>, and offer you an option to
439 press &lt;ENTER&gt; to accept this, or Ctrl-C to cancel and restart the
440 build after specifying the directory. In practice, the message may not
441 appear until after &lt;ENTER&gt; is keyed, i.e. the build stalls.
442 </para>
444 <para>
445 That directory is used for a (probably random) telemetry identifier.
446 Creating this in the build directory, and deleting that after the
447 installation, prevents it being used. If you wish to participate in
448 telemetry, export MOZBUILD_STATE_PATH to point to its default directory.
449 </para>
451 <para>
452 <command>./mach build</command>: <application>Firefox</application>
453 now uses this <application>python2</application> script to run the
454 build and install.
455 </para>
457 <para>
458 <option>./mach build --verbose</option>: Use this alternative if you
459 need details of which files are being compiled, together with any C or
460 C++ flags being used.
461 </para>
463 <para>
464 <option>./mach build -jN</option>: The build should, by default, use
465 all the online CPU cores. There are two reasons to specify the number
466 of cores, e.g. -j4 for 4 cores: First, if using all the cores causes
467 the build to swap because you have insufficient memory (e.g. for 4 cores
468 a build without system graphite2 and harfbuzz now uses towards 8GB
469 of RAM). In such cases, using fewer cores can be faster. Second, on some
470 machines the middle part of the build can drag on as if only one core is
471 present. In those cases, specifying the number of cores may speed up the
472 build.
473 </para>
475 <para>
476 <command>mkdir -pv /usr/lib/mozilla/plugins</command>: This ensures
477 that <filename class="directory">/usr/lib/mozilla/plugins/</filename>
478 exists.
479 </para>
481 <para>
482 <command>ln -sv ... /usr/lib/firefox/browser</command>:
483 This command creates a symbolic link to <filename
484 class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
485 needed, as <application>Firefox</application> checks <filename
486 class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
487 symbolic link is made to keep all the plugins installed in one folder.
488 </para>
490 <para>
491 <option>export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib</option>:
492 Use this as an alternative to building with gcc and g++ if you wish to use
493 the clang toolchain. Remember to unset these variables after the build.
494 </para>
496 </sect2>
498 <sect2 role="configuration">
499 <title>Configuring Firefox</title>
501 <para>
502 If you use a desktop environment like <application>Gnome</application> or
503 <application>KDE</application> you may like to create a
504 <filename>firefox.desktop</filename> file so that
505 <application>Firefox</application> appears in the panel's menus. If you
506 didn't enable startup-notification in your mozconfig change the
507 StartupNotify line to false. As the
508 <systemitem class="username">root</systemitem> user:
509 </para>
511<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
512mkdir -pv /usr/share/pixmaps &amp;&amp;
514cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
515<literal>[Desktop Entry]
517Name=Firefox Web Browser
518Comment=Browse the World Wide Web
519GenericName=Web Browser
520Exec=firefox %u
529ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
530 /usr/share/pixmaps/firefox.png</userinput></screen>
532 <sect3><title>Configuration Information</title>
534 <para>
535 The application settings for firefox are accessible by keying
536 <command>about:config</command> in the address bar.
537 </para>
539 <para>
540 With this version of <application>firefox</application>, getting
541 working sound can be a problem. Although upstream prefers pulseaudio,
542 on balance using <application>Alsa</application> may be easier.
543 </para>
545 <para>
546 If you enabled <application>Alsa</application> for sound, you may need
547 to alter one variable to get working sound. If you run
548 <command>firefox</command> from a term and try to play something with
549 sound you might encounter error messages like:
550 </para>
552 <para>
553 <literal>Sandbox: seccomp sandbox violation: pid 3941, tid 4030,
554 syscall 16, args 48 2147767296 139909894784796 0 0 0.</literal>
555 </para>
557 <para>
558 That was on x86_64, on i686 the syscall number is 54. To allow this
559 syscall, in <command>about:config</command> change
560 <command>security.sandbox.content.syscall_whitelist</command> to 16
561 (or 54 if using i686).
562 </para>
564 <para>
565 If you use <command>pulseaudio</command> in a Desktop Environment, it
566 might already be started by that DE. But if it is not, although
567 firefox-57 managed to start it, firefox-58 did not. If you run
568 <command>firefox</command> from a term and this problem is present,
569 trying to play sound will
570 encounter error messages warning <literal>Can't get cubeb
571 context!</literal>
572 </para>
574 <para>
575 The fix for this is to close firefox, start pulseaudio to check it
576 does start (if not, read the information on Configuring in <xref
577 linkend="pulseaudio"/>) and restart firefox to check it is working.
578 If it now works, add the following to your <filename>~/.xinitrc</filename>:
579<phrase revision="sysv">
580<literal>pulseaudio --verbose --log-target=syslog&amp;</literal></phrase>
581<phrase revision="systemd">
582<literal>pulseaudio --verbose --log-target=journald&amp;</literal></phrase>
583 (unfortunately, on some systems this does not work).
584 </para>
586 <para>
587 You may wish to use multiple profiles within firefox. To do that, invoke
588 firefox as <command>firefox --ProfileManager</command>. You can also
589 check which profile is currently in use from
590 <command>about:profiles</command>.
591 </para>
593 </sect3>
594 </sect2>
596 <sect2 role="content">
597 <title>Contents</title>
599 <segmentedlist>
600 <segtitle>Installed Programs</segtitle>
601 <segtitle>Installed Libraries</segtitle>
602 <segtitle>Installed Directory</segtitle>
604 <seglistitem>
605 <seg>
606 firefox
607 </seg>
608 <seg>
609 Numerous libraries, browser components, plugins, extensions, and
610 helper modules installed in /usr/lib/firefox
611 </seg>
612 <seg>
613 /usr/lib/firefox and /usr/lib/mozilla
614 </seg>
615 </seglistitem>
616 </segmentedlist>
618 <variablelist>
619 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
620 <?dbfo list-presentation="list"?>
621 <?dbhtml list-presentation="table"?>
623 <varlistentry id="firefox-prog">
624 <term><command>firefox</command></term>
625 <listitem>
626 <para>
627 is a <application>GTK+-3</application> internet browser that uses
628 the Mozilla Gecko rendering engine.
629 </para>
630 <indexterm zone="firefox firefox-prog">
631 <primary sortas="b-firefox">firefox</primary>
632 </indexterm>
633 </listitem>
634 </varlistentry>
636 </variablelist>
638 </sect2>
Note: See TracBrowser for help on using the repository browser.