source: xsoft/graphweb/firefox.xml@ 2bfd23a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 2bfd23a was 2bfd23a, checked in by Bruce Dubbs <bdubbs@…>, 5 years ago

Fix firefox patch name

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

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