source: xsoft/graphweb/firefox.xml@ dd34c3df

10.0 10.1 11.0 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind ken/refactor-virt lazarus perl-modules qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since dd34c3df was dd34c3df, checked in by Ken Moffat <ken@…>, 4 years ago

firefox-58.0.1

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

  • Property mode set to 100644
File size: 20.4 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 "e76bf01025d093e8383bffbfc3084f68">
10 <!ENTITY firefox-size "238 MB">
11 <!-- NB with stylo, much of the build uses rust, and therefore cargo files.
12 But when building 58.0 on rustc-1.22.1 the extra files, if any, seem to be minimal -->
13 <!ENTITY firefox-buildsize "7.4 GB (152 MB installed) without tests">
14 <!ENTITY firefox-time "20 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 &lfs81_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 <note>
76 <para>
77 The build times for this version of firefox (using stylo, the new CSS
78 rendering code) seem to vary widely between different machines. On one
79 old Intel i3 the build took considerably longer. The reason for this is
80 not understood. A build with stylo disabled is typically 1 or 2 SBU
81 quicker and needs 0.8GB less disk space.
82 </para>
83
84 <para>
85 Although upstream prefer to use <application>PulseAudio</application>,
86 for the moment <application>Alsa</application> can still be used. Both
87 may need runtime configuration to get sound working.
88 </para>
89 </note>
90
91 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
92 <itemizedlist spacing="compact">
93 <listitem>
94 <para>
95 Optional patch to allow system versions of <xref linkend="graphite2"/>
96 and <xref linkend="harfbuzz"/>:
97 <ulink url="&patch-root;/firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch"/>
98 </para>
99 </listitem>
100 </itemizedlist>
101
102 <note>
103 <para>
104 The tarball <emphasis>firefox-&firefox-version;.source.tar.xz</emphasis>
105 will untar to <emphasis>firefox-&firefox-version;</emphasis> directory.
106 It will also reset the permissions of the current directory to 0755 if you
107 have permission to do that. If you do this in a directory where
108 the sticky bit is set, such
109 as <filename class="directory">/tmp</filename> it will end with error
110 messages:
111 </para>
112
113<literallayout>tar: .: Cannot utime: Operation not permitted
114tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
115tar: Exiting with failure status due to previous errors
116</literallayout>
117
118 <para>
119 This does finish with non-zero status, but it does
120 <emphasis>NOT</emphasis> mean there is a real problem.
121 Do not untar as the <systemitem class="username">root</systemitem> user
122 in a directory where the sticky bit is set - that will unset it.
123 </para>
124 </note>
125
126 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
127
128 <bridgehead renderas="sect4">Required</bridgehead>
129 <para role="required">
130 <xref linkend="autoconf213"/>,
131 both <xref linkend="gtk3"/> and
132 <xref linkend="gtk2"/>,
133 <xref linkend="libnotify"/>,
134 <xref linkend="nss"/>,
135 <xref linkend="pulseaudio"/>
136 (or
137 <xref linkend="alsa-lib"/> if you edit the mozconfig;
138 now deprecated by mozilla), in either case please read the
139 Configuration Information,
140 <xref linkend="rust"/>,
141 <xref linkend="unzip"/>,
142 <xref linkend="yasm"/>, and
143 <xref linkend="zip"/>
144 </para>
145
146 <bridgehead renderas="sect4">Recommended</bridgehead>
147 <para role="recommended">
148 <xref linkend="icu"/>,
149 <xref linkend="libevent"/>,
150 <xref linkend="libvpx"/>,
151 <package>clang</package> from <xref linkend="llvm"/> (for stylo), and
152 <xref linkend="sqlite"/>
153 </para>
154
155 <note>
156 <para>
157 If you don't install recommended dependencies, then internal copies of
158 those packages will be used. They might be tested to work, but they can
159 be out of date or contain security holes.
160 </para>
161 </note>
162
163 <note>
164 <para>
165 With <application>Firefox-31.0</application> and later versions, you
166 must have installed <application>Openssl</application> before
167 <application>Python 2</application> or the build system will quickly
168 fail with output including "ImportError: cannot import name
169 HTTPSHandler". If you are in any doubt about this (e.g. upgrading from
170 an older version of Firefox), check if
171 <filename>/usr/lib/python&python2-majorver;/lib-dynload/_ssl.so</filename>
172 exists. If it does not, reinstall <xref linkend="python2"/> (after
173 installing <xref linkend="openssl"/>). The latest version of any
174 <emphasis>currently maintained</emphasis> version of Openssl should be
175 satisfactory if already installed.
176 </para>
177 </note>
178
179 <bridgehead renderas="sect4">Optional</bridgehead>
180 <para role="optional">
181 <xref linkend="curl"/>,
182 <xref linkend="dbus-glib"/>,
183 <xref linkend="doxygen"/>,
184 <xref linkend="GConf"/>,
185 <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
186 <xref linkend="libwebp"/>,
187 <xref linkend="openjdk"/>,
188 <xref linkend="startup-notification"/>,
189 <xref linkend="valgrind"/>,
190 <xref linkend="wget"/>,
191 <xref linkend="wireless_tools"/>,
192 <ulink url="https://hunspell.github.io/">Hunspell</ulink>,
193 <phrase revision="sysv"><ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink></phrase>
194 <phrase revision="systemd"><xref linkend="liboauth"/></phrase>,
195 <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>,
196 and (with the patch)
197 <xref linkend="graphite2"/> and
198 <xref linkend="harfbuzz"/>
199 </para>
200
201 <para condition="html" role="usernotes">
202 User Notes: <ulink url="&blfs-wiki;/firefox"/>
203 </para>
204 </sect2>
205
206 <sect2 role="installation">
207 <title>Installation of Firefox</title>
208
209 <para>
210 The configuration of <application>Firefox</application> is accomplished
211 by creating a <filename>mozconfig</filename> file containing the desired
212 configuration options. A default <filename>mozconfig</filename> is
213 created below. To see the entire list of available configuration options
214 (and an abbreviated description of some of them), issue <command>./configure
215 --help</command>. You may also wish to review the entire file and
216 uncomment any other desired options. Create the file by issuing the
217 following command:
218 </para>
219
220<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
221<literal># If you have a multicore machine, all cores will be used by default.
222# You can change the number of non-rust jobs by setting a valid number
223# of cores in this option, but when rust crates are being compiled
224# jobs will be scheduled for all the online CPU cores.
225#mk_add_options MOZ_MAKE_FLAGS="-j1"
226
227# If you have installed dbus-glib, comment out this line:
228ac_add_options --disable-dbus
229
230# If you have installed dbus-glib, and you have installed (or will install)
231# wireless-tools, and you wish to use geolocation web services, comment out
232# this line
233ac_add_options --disable-necko-wifi
234
235# API Keys for geolocation APIs - necko-wifi (above) is required for MLS
236# Uncomment the following line if you wish to use Mozilla Location Service
237#ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
238
239# Uncomment the following line if you wish to use Google's geolocaton API
240# (needed for use with saved maps with Google Maps)
241#ac_add_options --with-google-api-keyfile=$PWD/google-key
242
243# Uncomment these lines if you have installed optional dependencies:
244#ac_add_options --enable-system-hunspell
245#ac_add_options --enable-startup-notification
246
247# Uncomment the following option if you have not installed PulseAudio
248#ac_add_options --disable-pulseaudio
249# and uncomment this if you installed alsa-lib instead of PulseAudio
250#ac_add_options --enable-alsa
251
252# If you have installed GConf, comment out this line
253ac_add_options --disable-gconf
254
255# Stylo is the new CSS code, including the rust 'style'
256# package. It is enabled by default but requires clang.
257# Uncomment this if you do not wish to use stylo.
258#ac_add_options --disable-stylo
259
260# Comment out following options if you have not installed
261# recommended dependencies:
262ac_add_options --enable-system-sqlite
263ac_add_options --with-system-libevent
264ac_add_options --with-system-libvpx
265ac_add_options --with-system-nspr
266ac_add_options --with-system-nss
267ac_add_options --with-system-icu
268
269# If you are going to apply the patch for system graphite
270# and system harfbuzz, uncomment these lines:
271#ac_add_options --with-system-graphite2
272#ac_add_options --with-system-harfbuzz
273
274# Stripping is now enabled by default.
275# Uncomment these lines if you need to run a debugger:
276#ac_add_options --disable-strip
277#ac_add_options --disable-install-strip
278
279# The BLFS editors recommend not changing anything below this line:
280ac_add_options --prefix=/usr
281ac_add_options --enable-application=browser
282
283ac_add_options --disable-crashreporter
284ac_add_options --disable-updater
285# enabling the tests will use a lot more space and significantly
286# increase the build time, for no obvious benefit.
287ac_add_options --disable-tests
288
289# Optimization for size is broken with gcc7
290ac_add_options --enable-optimize="-O2"
291
292ac_add_options --enable-official-branding
293
294# From firefox-40, using system cairo caused firefox to crash
295# frequently when it was doing background rendering in a tab.
296# This appears to again work in firefox-56
297ac_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-&firefox-version;/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 -p /usr/lib/mozilla/plugins</command>: This checks
409 that <filename class="directory">/usr/lib/mozilla/plugins</filename>
410 exists.
411 </para>
412
413 <para>
414 <command>ln -sv ... /usr/lib/firefox-&firefox-version;/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-&firefox-version;/browser/icons/mozicon128.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-&firefox-version;
536 </seg>
537 <seg>
538 /usr/lib/firefox-&firefox-version; 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.