source: xsoft/graphweb/firefox.xml@ fd5ee81

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gimp3 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since fd5ee81 was 406e5ffe, checked in by Ken Moffat <ken@…>, 6 years ago

Firefox-59.0.2 and reword its note on how the SBUs vary, also extend the SBU comments in the Conventions section.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@20044 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 20.2 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<!--
8 <!ENTITY firefox-download-http "&mozilla-http;/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.xz">
9-->
10 <!ENTITY firefox-hgversion "239e434d6d2b8e1e2b697c3416d1e96d48fe98e5">
11 <!-- use tinyurl to get a much shorter link for the wget example -->
12 <!ENTITY firefox-tiny "https://tinyurl.com/firefox-59-0-2-tar-bz2">
13 <!ENTITY firefox-download-http "&mozilla-hg;&firefox-hgversion;.tar.bz2">
14 <!ENTITY firefox-download-ftp " ">
15 <!ENTITY firefox-md5sum "fa4f7a5a7e2b2c7900369530b396b74a">
16 <!ENTITY firefox-size "291 MB">
17 <!-- NB with stylo, much of the build uses rust, and therefore cargo files.
18 But when building 58.0 on rustc-1.22.1 the extra files, if any, seem to be minimal -->
19 <!ENTITY firefox-buildsize "7.5 GB (157 MB installed) without tests">
20 <!ENTITY firefox-time "21 SBU (with parallelism=4) without tests">
21]>
22
23<sect1 id="firefox" xreflabel="Firefox-&firefox-version;">
24 <?dbhtml filename="firefox.html" ?>
25
26 <sect1info>
27 <othername>$LastChangedBy$</othername>
28 <date>$Date$</date>
29 </sect1info>
30
31 <title>Firefox-&firefox-version;</title>
32
33 <indexterm zone="firefox">
34 <primary sortas="a-Firefox">Firefox</primary>
35 </indexterm>
36
37 <sect2 role="package">
38 <title>Introduction to Firefox</title>
39
40 <para>
41 <application>Firefox</application> is a stand-alone browser based on the
42 <application>Mozilla</application> codebase.
43 </para>
44
45 &lfs82_checked;
46
47 <bridgehead renderas="sect3">Package Information</bridgehead>
48 <itemizedlist spacing="compact">
49 <listitem>
50 <para>
51 Download (HTTP): <ulink url="&firefox-download-http;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download (FTP): <ulink url="&firefox-download-ftp;"/>
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download MD5 sum: &firefox-md5sum;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download size: &firefox-size;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated disk space required: &firefox-buildsize;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Estimated build time: &firefox-time;
77 </para>
78 </listitem>
79 </itemizedlist>
80
81 <note>
82 <para>
83 Upstream now only provide tarballs named with 40-character mercurial
84 commit hashes.
85 <!--
86 This will untar to <emphasis>mozilla-release-&firefox-hgversion;/</emphasis>,
87 but it will build firefox-&firefox-version; - you may prefer to rename the
88 -->
89 You may prefer to rename the
90 downloaded tarball, either to firefox-&firefox-version;.tar.bz2 or to
91 mozilla-release-&firefox-hgversion;.tar.bz2, or to use wget, e.g.
92<screen><userinput>wget -c &firefox-tiny; \
93 -O mozilla-release-&firefox-hgversion;.tar.bz2</userinput></screen>
94 </para>
95 </note>
96
97 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
98 <itemizedlist spacing="compact">
99 <listitem>
100 <para>
101 Optional patch to allow system versions of <xref linkend="graphite2"/>
102 and <xref linkend="harfbuzz"/>:
103 <ulink url="&patch-root;/firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch"/>
104 </para>
105 </listitem>
106 </itemizedlist>
107
108 <note>
109 <para>
110 Extracting the tarball
111 will reset the permissions of the current directory to 0755 if you
112 have permission to do that. If you do this in a directory where
113 the sticky bit is set, such
114 as <filename class="directory">/tmp</filename> it will end with error
115 messages:
116 </para>
117
118<literallayout>tar: .: Cannot utime: Operation not permitted
119tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
120tar: Exiting with failure status due to previous errors
121</literallayout>
122
123 <para>
124 This does finish with non-zero status, but it does
125 <emphasis>NOT</emphasis> mean there is a real problem.
126 Do not untar as the <systemitem class="username">root</systemitem> user
127 in a directory where the sticky bit is set - that will unset it.
128 </para>
129
130 <para>
131 As with other large packages which use C++ (or rust), the SBU times
132 to build this vary more widely than you might expect. Also, almost 6GB
133 of real memory is used during the final link and the SBUs can increase
134 significantly if the machine has to swap to do this.
135 </para>
136
137 <para>
138 Although upstream prefer to use <application>PulseAudio</application>,
139 for the moment <application>Alsa</application> can still be used. Both
140 may need runtime configuration to get sound working.
141 </para>
142 </note>
143
144 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
145
146 <bridgehead renderas="sect4">Required</bridgehead>
147 <para role="required">
148 <xref linkend="autoconf213"/>,
149 both <xref linkend="gtk3"/> and
150 <xref linkend="gtk2"/>,
151 <xref linkend="libnotify"/>,
152 <xref linkend="nss"/>,
153 <xref linkend="pulseaudio"/>
154 (or
155 <xref linkend="alsa-lib"/> if you edit the mozconfig;
156 now deprecated by mozilla), in either case please read the
157 Configuration Information,
158 <xref linkend="rust"/>,
159 <xref linkend="unzip"/>,
160 <xref linkend="yasm"/>, and
161 <xref linkend="zip"/>
162 </para>
163
164 <bridgehead renderas="sect4">Recommended</bridgehead>
165 <para role="recommended">
166 <xref linkend="icu"/>,
167 <xref linkend="libevent"/>,
168 <xref linkend="libvpx"/>,
169 <package>clang</package> from <xref linkend="llvm"/> (for stylo), and
170 <xref linkend="sqlite"/>
171 </para>
172
173 <note>
174 <para>
175 If you don't install recommended dependencies, then internal copies of
176 those packages will be used. They might be tested to work, but they can
177 be out of date or contain security holes.
178 </para>
179 </note>
180
181 <bridgehead renderas="sect4">Optional</bridgehead>
182 <para role="optional">
183 <xref linkend="curl"/>,
184 <xref linkend="dbus-glib"/>,
185 <xref linkend="doxygen"/>,
186 <xref linkend="GConf"/>,
187 <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
188 <xref linkend="libwebp"/>,
189 <xref linkend="openjdk"/>,
190 <xref linkend="startup-notification"/>,
191 <xref linkend="valgrind"/>,
192 <xref linkend="wget"/>,
193 <xref linkend="wireless_tools"/>,
194 <ulink url="https://hunspell.github.io/">Hunspell</ulink>,
195 <phrase revision="sysv"><ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink></phrase>
196 <phrase revision="systemd"><xref linkend="liboauth"/></phrase>,
197 <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>,
198 and (with the patch)
199 <xref linkend="graphite2"/> and
200 <xref linkend="harfbuzz"/>
201 </para>
202
203 <para condition="html" role="usernotes">
204 User Notes: <ulink url="&blfs-wiki;/firefox"/>
205 </para>
206 </sect2>
207
208 <sect2 role="installation">
209 <title>Installation of Firefox</title>
210
211 <para>
212 The configuration of <application>Firefox</application> is accomplished
213 by creating a <filename>mozconfig</filename> file containing the desired
214 configuration options. A default <filename>mozconfig</filename> is
215 created below. To see the entire list of available configuration options
216 (and an abbreviated description of some of them), issue <command>./mach
217 configure &amp;&amp; ./configure --help | less</command>. You may also
218 wish to review the entire file and uncomment any other desired options.
219 Create the file by issuing the following command:
220 </para>
221
222<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
223<literal># If you have a multicore machine, all cores will be used by default.
224# You can change the number of non-rust jobs by setting a valid number
225# of cores in this option, but when rust crates are being compiled
226# jobs will be scheduled for all the available CPU cores.
227#mk_add_options MOZ_MAKE_FLAGS="-j1"
228
229# If you have installed dbus-glib, comment out this line:
230ac_add_options --disable-dbus
231
232# If you have installed dbus-glib, and you have installed (or will install)
233# wireless-tools, and you wish to use geolocation web services, comment out
234# this line
235ac_add_options --disable-necko-wifi
236
237# API Keys for geolocation APIs - necko-wifi (above) is required for MLS
238# Uncomment the following line if you wish to use Mozilla Location Service
239#ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
240
241# Uncomment the following line if you wish to use Google's geolocaton API
242# (needed for use with saved maps with Google Maps)
243#ac_add_options --with-google-api-keyfile=$PWD/google-key
244
245# Uncomment these lines if you have installed optional dependencies:
246#ac_add_options --enable-system-hunspell
247#ac_add_options --enable-startup-notification
248
249# Uncomment the following option if you have not installed PulseAudio
250#ac_add_options --disable-pulseaudio
251# and uncomment this if you installed alsa-lib instead of PulseAudio
252#ac_add_options --enable-alsa
253
254# If you have installed GConf, comment out this line
255ac_add_options --disable-gconf
256
257# Stylo is the new CSS code, including the rust 'style'
258# package. It is enabled by default but requires clang.
259# Uncomment this if you do not wish to use stylo.
260#ac_add_options --disable-stylo
261
262# Comment out following options if you have not installed
263# recommended dependencies:
264ac_add_options --enable-system-sqlite
265ac_add_options --with-system-libevent
266ac_add_options --with-system-libvpx
267ac_add_options --with-system-nspr
268ac_add_options --with-system-nss
269ac_add_options --with-system-icu
270
271# If you are going to apply the patch for system graphite
272# and system harfbuzz, uncomment these lines:
273#ac_add_options --with-system-graphite2
274#ac_add_options --with-system-harfbuzz
275
276# Stripping is now enabled by default.
277# Uncomment these lines if you need to run a debugger:
278#ac_add_options --disable-strip
279#ac_add_options --disable-install-strip
280
281# The BLFS editors recommend not changing anything below this line:
282ac_add_options --prefix=/usr
283ac_add_options --enable-application=browser
284
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
290
291# Optimization for size is broken with gcc7
292ac_add_options --enable-optimize="-O2"
293
294ac_add_options --enable-official-branding
295
296# In firefox-59.0 system cairo breaks the build, so comment it.
297#ac_add_options --enable-system-cairo
298ac_add_options --enable-system-ffi
299ac_add_options --enable-system-pixman
300
301ac_add_options --with-pthreads
302
303ac_add_options --with-system-bz2
304ac_add_options --with-system-jpeg
305ac_add_options --with-system-png
306ac_add_options --with-system-zlib
307
308mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
309EOF</userinput></screen>
310
311 <para>
312 Compile <application>Firefox</application> by issuing the following
313 commands:
314 </para>
315
316 <para>
317 If you have installed system versions of graphite2 and harfbuzz and wish
318 firefox to use those instead of its shipped versions, apply the patch and
319 uncomment the appropriate entries in the <filename>mozconfig</filename>
320 file.
321 </para>
322
323<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch</userinput></screen>
324
325 <para>
326 If the geolocation APIs are needed:
327 </para>
328
329 <note>
330 <para>
331 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
332 The Google and Mozilla API Keys below are specific to LFS. If using
333 these instructions for another distro, or if you intend to distribute
334 binary copies of the software using these instructions, please obtain
335 your own keys following the instructions located at
336 <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/> and
337 <ulink url="https://location.services.mozilla.com/api"/> respectively.
338 <!-- BLFS Devs, register an account at Google with your
339 @linuxfromscratch.org email address, and I'll make you an administrator
340 for the 'Google APIs for LFS' project (where the API and OAuth keys
341 were created for use in the book).-->
342 </para>
343 </note>
344
345<screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
346echo "d2284a20-0505-4927-a809-7ffaf4d91e55" > mozilla-key</userinput></screen>
347
348 <note><para>
349 If you are compiling <application>Firefox</application> in chroot, make
350 sure you have <envar>$SHELL</envar> environment variable set or prepend
351 <envar>SHELL=/bin/sh</envar>.
352 </para></note>
353
354<!-- the BINDGEN_CFLAGS are to work around
355 https://bugzilla.mozilla.org/show_bug.cgi?id=1341234
356 which is reported to be fixed in ff58 -->
357<screen><userinput>
358./mach build
359</userinput></screen>
360
361 <para>
362 The <filename>mozconfig</filename> above disables the tests because
363 they use a lot more time and disk space for no obvious benefit. If
364 you have nevertheless enabled them, you can run the tests by executing
365 <command>./mach gtest</command>. This will require a network connection,
366 and to be run from within an Xorg session - there is a popup dialog
367 when it fails to connect to ALSA (that does not create a failed test).
368 One or two tests will fail. To see the details of the failure(s) you
369 will need to log the output from that command so that you can review it.
370 </para>
371
372 <para>
373 Now, as the <systemitem class="username">root</systemitem> user:
374 </para>
375
376<screen role="root"><userinput>./mach install &amp;&amp;
377
378mkdir -pv /usr/lib/mozilla/plugins &amp;&amp;
379ln -sfv ../../mozilla/plugins /usr/lib/firefox/browser/</userinput></screen>
380<!--
381 <para>
382 Set environment variables back to their values:
383 </para>
384
385<screen><userinput>export CFLAGS=$CFLAGS_HOLD &amp;&amp;
386export CXXFLAGS=$CXXFLAGS_HOLD &amp;&amp;
387unset CFLAGS_HOLD CXXFLAGS_HOLD</userinput></screen>
388-->
389
390 </sect2>
391
392 <sect2 role="commands">
393 <title>Command Explanations</title>
394
395 <para>
396 <command>./mach build</command>: <application>Firefox</application>
397 now uses this <application>python2</application> script to run the
398 build and install.
399 </para>
400
401 <para>
402 <option>./mach build --verbose</option>: Use this alternative if you
403 need details of which files are being compiled, together with any C or
404 C++ flags being used.
405 </para>
406
407 <para>
408 <command>mkdir -pv /usr/lib/mozilla/plugins</command>: This ensures
409 that <filename class="directory">/usr/lib/mozilla/plugins/</filename>
410 exists.
411 </para>
412
413 <para>
414 <command>ln -sv ... /usr/lib/firefox/browser</command>:
415 This command creates a symbolic link to <filename
416 class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
417 needed, as <application>Firefox</application> checks <filename
418 class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
419 symbolic link is made to keep all the plugins installed in one folder.
420 </para>
421
422 </sect2>
423
424 <sect2 role="configuration">
425 <title>Configuring Firefox</title>
426
427 <para>
428 If you use a desktop environment like <application>Gnome</application> or
429 <application>KDE</application> you may like to create a
430 <filename>firefox.desktop</filename> file so that
431 <application>Firefox</application> appears in the panel's menus. If you
432 didn't enable startup-notification in your mozconfig change the
433 StartupNotify line to false. As the
434 <systemitem class="username">root</systemitem> user:
435 </para>
436
437<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
438mkdir -pv /usr/share/pixmaps &amp;&amp;
439
440cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
441<literal>[Desktop Entry]
442Encoding=UTF-8
443Name=Firefox Web Browser
444Comment=Browse the World Wide Web
445GenericName=Web Browser
446Exec=firefox %u
447Terminal=false
448Type=Application
449Icon=firefox
450Categories=GNOME;GTK;Network;WebBrowser;
451MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
452StartupNotify=true</literal>
453EOF
454
455ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
456 /usr/share/pixmaps/firefox.png</userinput></screen>
457
458 <sect3><title>Configuration Information</title>
459
460 <para>
461 The application settings for firefox are accessible by keying
462 <command>about:config</command> in the address bar.
463 </para>
464
465 <para>
466 With this version of <application>firefox</application>, getting
467 working sound can be a problem. Although upstream prefers pulseaudio,
468 on balance using <application>Alsa</application> may be easier.
469 </para>
470
471 <para>
472 If you enabled <application>Alsa</application> for sound, you may need
473 to alter one variable to get working sound. If you run
474 <command>firefox</command> from a term and try to play something with
475 sound you might encounter error messages like:
476 </para>
477
478 <para>
479 <literal>Sandbox: seccomp sandbox violation: pid 3941, tid 4030,
480 syscall 16, args 48 2147767296 139909894784796 0 0 0.</literal>
481 </para>
482
483 <para>
484 That was on x86_64, on i686 the syscall number is 54. To allow this
485 syscall, in <command>about:config</command> change
486 <command>security.sandbox.content.syscall_whitelist</command> to 16
487 (or 54 if using i686).
488 </para>
489
490 <para>
491 If you use <command>pulseaudio</command> in a Desktop Environment, it
492 might already be started by that DE. But if it is not, although
493 firefox-57 managed to start it, firefox-58 does not. If you run
494 <command>firefox</command> from a term, trying to play sound will
495 encounter error messages warning <literal>Can't get cubeb
496 context!</literal>
497 </para>
498
499 <para>
500 The fix for this is to close firefox, start pulseaudio to check it
501 does start (if not, read the information on Configuring in <xref
502 linkend="pulseaudio"/>) and restart firefox to check it is working.
503 If it now works, add the following to your <filename>~/.xinitrc</filename>:
504<phrase revision="sysv">
505<literal>pulseaudio --verbose --log-target=syslog&amp;</literal></phrase>
506<phrase revision="systemd">
507<literal>pulseaudio --verbose --log-target=journald&amp;</literal></phrase>
508 (unfortunately, on some systems this does not work).
509 </para>
510
511 <para>
512 You may wish to use multiple profiles within firefox. To do that, invoke
513 firefox as <command>firefox --ProfileManager</command>. You can also
514 check which profile is currently in use from
515 <command>about:profiles</command>.
516 </para>
517
518 </sect3>
519 </sect2>
520
521 <sect2 role="content">
522 <title>Contents</title>
523
524 <segmentedlist>
525 <segtitle>Installed Programs</segtitle>
526 <segtitle>Installed Libraries</segtitle>
527 <segtitle>Installed Directory</segtitle>
528
529 <seglistitem>
530 <seg>
531 firefox
532 </seg>
533 <seg>
534 Numerous libraries, browser components, plugins, extensions, and
535 helper modules installed in /usr/lib/firefox
536 </seg>
537 <seg>
538 /usr/lib/firefox and /usr/lib/mozilla
539 </seg>
540 </seglistitem>
541 </segmentedlist>
542
543 <variablelist>
544 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
545 <?dbfo list-presentation="list"?>
546 <?dbhtml list-presentation="table"?>
547
548 <varlistentry id="firefox-prog">
549 <term><command>firefox</command></term>
550 <listitem>
551 <para>
552 is a <application>GTK+-3</application> internet browser that uses
553 the Mozilla Gecko rendering engine.
554 </para>
555 <indexterm zone="firefox firefox-prog">
556 <primary sortas="b-firefox">firefox</primary>
557 </indexterm>
558 </listitem>
559 </varlistentry>
560
561 </variablelist>
562
563 </sect2>
564
565</sect1>
Note: See TracBrowser for help on using the repository browser.