source: xsoft/graphweb/firefox.xml@ 04712f3

perl-modules
Last change on this file since 04712f3 was e628b536, checked in by Ken Moffat <ken@…>, 6 years ago

firefox-62.0

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

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