source: xsoft/graphweb/firefox.xml@ 3bdfc9fd

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind 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/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 3bdfc9fd was 3bdfc9fd, checked in by Ken Moffat <ken@…>, 6 years ago

Update to firefox-61.0.2 and reinstate its './mach build' command which I accidentally deleted on 26th June.

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

  • Property mode set to 100644
File size: 19.0 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 "f8ad78a0dfa6fa5dc67563785d62a25b">
10 <!ENTITY firefox-size "254 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.2 GB (139 MB installed) without tests">
14 <!ENTITY firefox-time "31 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 &lfs82_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 Although upstream prefer to use <application>PulseAudio</application>,
117 for the moment <application>Alsa</application> can still be used. Both
118 may need runtime configuration to get sound working.
119 </para>
120 </note>
121
122 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
123
124 <bridgehead renderas="sect4">Required</bridgehead>
125 <para role="required">
126 <xref linkend="autoconf213"/>,
127 <application>Clang</application> (from <xref linkend="llvm"/>),
128 both <xref linkend="gtk3"/> and
129 <xref linkend="gtk2"/>,
130 <xref linkend="libnotify"/>,
131 <xref linkend="nss"/>,
132 <xref linkend="pulseaudio"/>
133 (or
134 <xref linkend="alsa-lib"/> if you edit the mozconfig;
135 now deprecated by mozilla), in either case please read the
136 Configuration Information,
137 <xref linkend="rust"/>,
138 <xref linkend="unzip"/>,
139 <xref linkend="yasm"/>, and
140 <xref linkend="zip"/>
141 </para>
142
143 <bridgehead renderas="sect4">Recommended</bridgehead>
144 <para role="recommended">
145 <xref linkend="icu"/>,
146 <xref linkend="libevent"/>,
147 <xref linkend="libvpx"/>, and
148 <xref linkend="sqlite"/>
149 </para>
150
151 <note>
152 <para>
153 If you don't install recommended dependencies, then internal copies of
154 those packages will be used. They might be tested to work, but they can
155 be out of date or contain security holes.
156 </para>
157 </note>
158
159 <bridgehead renderas="sect4">Optional</bridgehead>
160 <para role="optional">
161 <xref linkend="curl"/>,
162 <xref linkend="dbus-glib"/>,
163 <xref linkend="doxygen"/>,
164 <xref linkend="GConf"/>,
165 <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
166 <xref linkend="libwebp"/>,
167 <xref linkend="openjdk"/>,
168 <xref linkend="startup-notification"/>,
169 <xref linkend="valgrind"/>,
170 <xref linkend="wget"/>,
171 <xref linkend="wireless_tools"/>,
172 <ulink url="https://hunspell.github.io/">Hunspell</ulink>,
173 <phrase revision="sysv"><ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink></phrase>
174 <phrase revision="systemd"><xref linkend="liboauth"/></phrase>,
175 <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>,
176 and (with the patch)
177 <xref linkend="graphite2"/> and
178 <xref linkend="harfbuzz"/>
179 </para>
180
181 <para condition="html" role="usernotes">
182 User Notes: <ulink url="&blfs-wiki;/firefox"/>
183 </para>
184 </sect2>
185
186 <sect2 role="installation">
187 <title>Installation of Firefox</title>
188
189 <para>
190 The configuration of <application>Firefox</application> is accomplished
191 by creating a <filename>mozconfig</filename> file containing the desired
192 configuration options. A default <filename>mozconfig</filename> is
193 created below. To see the entire list of available configuration options
194 (and an abbreviated description of some of them), issue <command>./mach
195 configure &amp;&amp; ./configure --help | less</command>. You may also
196 wish to review the entire file and uncomment any other desired options.
197 Create the file by issuing the following command:
198 </para>
199
200<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
201<literal># If you have a multicore machine, all cores will be used by default.
202# You can change the number of non-rust jobs by setting a valid number
203# of cores in this option, but when rust crates are being compiled
204# jobs will be scheduled for all the available CPU cores.
205#mk_add_options MOZ_MAKE_FLAGS="-j1"
206
207# If you have installed dbus-glib, comment out this line:
208ac_add_options --disable-dbus
209
210# If you have installed dbus-glib, and you have installed (or will install)
211# wireless-tools, and you wish to use geolocation web services, comment out
212# this line
213ac_add_options --disable-necko-wifi
214
215# API Keys for geolocation APIs - necko-wifi (above) is required for MLS
216# Uncomment the following line if you wish to use Mozilla Location Service
217#ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
218
219# Uncomment the following line if you wish to use Google's geolocaton API
220# (needed for use with saved maps with Google Maps)
221#ac_add_options --with-google-api-keyfile=$PWD/google-key
222
223# Uncomment these lines if you have installed optional dependencies:
224#ac_add_options --enable-system-hunspell
225#ac_add_options --enable-startup-notification
226
227# Uncomment the following option if you have not installed PulseAudio
228#ac_add_options --disable-pulseaudio
229# and uncomment this if you installed alsa-lib instead of PulseAudio
230#ac_add_options --enable-alsa
231
232# If you have installed GConf, comment out this line
233ac_add_options --disable-gconf
234
235# From firefox-61, the stylo CSS code can no-longer be disabled
236
237# Comment out following options if you have not installed
238# recommended dependencies:
239ac_add_options --enable-system-sqlite
240ac_add_options --with-system-libevent
241ac_add_options --with-system-libvpx
242ac_add_options --with-system-nspr
243ac_add_options --with-system-nss
244ac_add_options --with-system-icu
245
246# If you are going to apply the patch for system graphite
247# and system harfbuzz, uncomment these lines:
248#ac_add_options --with-system-graphite2
249#ac_add_options --with-system-harfbuzz
250
251# Stripping is now enabled by default.
252# Uncomment these lines if you need to run a debugger:
253#ac_add_options --disable-strip
254#ac_add_options --disable-install-strip
255
256# The BLFS editors recommend not changing anything below this line:
257ac_add_options --prefix=/usr
258ac_add_options --enable-application=browser
259
260ac_add_options --disable-crashreporter
261ac_add_options --disable-updater
262# enabling the tests will use a lot more space and significantly
263# increase the build time, for no obvious benefit.
264ac_add_options --disable-tests
265
266# Optimization for size is broken with gcc7 and later
267ac_add_options --enable-optimize="-O2"
268
269ac_add_options --enable-official-branding
270
271# From firefox-61 system cairo is not supported
272
273ac_add_options --enable-system-ffi
274ac_add_options --enable-system-pixman
275
276ac_add_options --with-pthreads
277
278ac_add_options --with-system-bz2
279ac_add_options --with-system-jpeg
280ac_add_options --with-system-png
281ac_add_options --with-system-zlib
282
283mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
284EOF</userinput></screen>
285
286 <para>
287 Compile <application>Firefox</application> by issuing the following
288 commands:
289 </para>
290
291 <para>
292 If you have installed system versions of graphite2 and harfbuzz and wish
293 firefox to use those instead of its shipped versions, apply the patch and
294 uncomment the appropriate entries in the <filename>mozconfig</filename>
295 file.
296 </para>
297
298<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch</userinput></screen>
299
300 <para>
301 If the geolocation APIs are needed:
302 </para>
303
304 <note>
305 <para>
306 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
307 The Google and Mozilla API Keys below are specific to LFS. If using
308 these instructions for another distro, or if you intend to distribute
309 binary copies of the software using these instructions, please obtain
310 your own keys following the instructions located at
311 <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/> and
312 <ulink url="https://location.services.mozilla.com/api"/> respectively.
313 <!-- BLFS Devs, register an account at Google with your
314 @linuxfromscratch.org email address, and I'll make you an administrator
315 for the 'Google APIs for LFS' project (where the API and OAuth keys
316 were created for use in the book).-->
317 </para>
318 </note>
319
320<screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
321echo "d2284a20-0505-4927-a809-7ffaf4d91e55" > mozilla-key</userinput></screen>
322
323 <note><para>
324 If you are compiling <application>Firefox</application> in chroot, make
325 sure you have <envar>$SHELL</envar> environment variable set or prepend
326 <envar>SHELL=/bin/sh</envar>.
327 </para></note>
328
329 <para>
330 Invoke the Python script to compile the package:
331 </para>
332
333<screen><userinput>./mach</userinput></screen>
334
335 <para>
336 The <filename>mozconfig</filename> above disables the tests because
337 they use a lot more time and disk space for no obvious benefit. If
338 you have nevertheless enabled them, you can run the tests by executing
339 <command>./mach gtest</command>. This will require a network connection,
340 and to be run from within an Xorg session - there is a popup dialog
341 when it fails to connect to ALSA (that does not create a failed test).
342 One or two tests will fail. To see the details of the failure(s) you
343 will need to log the output from that command so that you can review it.
344 </para>
345
346 <para>
347 Now, as the <systemitem class="username">root</systemitem> user:
348 </para>
349
350<screen role="root"><userinput>./mach install &amp;&amp;
351
352mkdir -pv /usr/lib/mozilla/plugins &amp;&amp;
353ln -sfv ../../mozilla/plugins /usr/lib/firefox/browser/</userinput></screen>
354<!--
355 <para>
356 Set environment variables back to their values:
357 </para>
358
359<screen><userinput>export CFLAGS=$CFLAGS_HOLD &amp;&amp;
360export CXXFLAGS=$CXXFLAGS_HOLD &amp;&amp;
361unset CFLAGS_HOLD CXXFLAGS_HOLD</userinput></screen>
362-->
363
364 </sect2>
365
366 <sect2 role="commands">
367 <title>Command Explanations</title>
368
369 <para>
370 <command>./mach build</command>: <application>Firefox</application>
371 now uses this <application>python2</application> script to run the
372 build and install.
373 </para>
374
375 <para>
376 <option>./mach build --verbose</option>: Use this alternative if you
377 need details of which files are being compiled, together with any C or
378 C++ flags being used.
379 </para>
380
381 <para>
382 <command>mkdir -pv /usr/lib/mozilla/plugins</command>: This ensures
383 that <filename class="directory">/usr/lib/mozilla/plugins/</filename>
384 exists.
385 </para>
386
387 <para>
388 <command>ln -sv ... /usr/lib/firefox/browser</command>:
389 This command creates a symbolic link to <filename
390 class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
391 needed, as <application>Firefox</application> checks <filename
392 class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
393 symbolic link is made to keep all the plugins installed in one folder.
394 </para>
395
396 </sect2>
397
398 <sect2 role="configuration">
399 <title>Configuring Firefox</title>
400
401 <para>
402 If you use a desktop environment like <application>Gnome</application> or
403 <application>KDE</application> you may like to create a
404 <filename>firefox.desktop</filename> file so that
405 <application>Firefox</application> appears in the panel's menus. If you
406 didn't enable startup-notification in your mozconfig change the
407 StartupNotify line to false. As the
408 <systemitem class="username">root</systemitem> user:
409 </para>
410
411<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
412mkdir -pv /usr/share/pixmaps &amp;&amp;
413
414cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
415<literal>[Desktop Entry]
416Encoding=UTF-8
417Name=Firefox Web Browser
418Comment=Browse the World Wide Web
419GenericName=Web Browser
420Exec=firefox %u
421Terminal=false
422Type=Application
423Icon=firefox
424Categories=GNOME;GTK;Network;WebBrowser;
425MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
426StartupNotify=true</literal>
427EOF
428
429ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
430 /usr/share/pixmaps/firefox.png</userinput></screen>
431
432 <sect3><title>Configuration Information</title>
433
434 <para>
435 The application settings for firefox are accessible by keying
436 <command>about:config</command> in the address bar.
437 </para>
438
439 <para>
440 With this version of <application>firefox</application>, getting
441 working sound can be a problem. Although upstream prefers pulseaudio,
442 on balance using <application>Alsa</application> may be easier.
443 </para>
444
445 <para>
446 If you enabled <application>Alsa</application> for sound, you may need
447 to alter one variable to get working sound. If you run
448 <command>firefox</command> from a term and try to play something with
449 sound you might encounter error messages like:
450 </para>
451
452 <para>
453 <literal>Sandbox: seccomp sandbox violation: pid 3941, tid 4030,
454 syscall 16, args 48 2147767296 139909894784796 0 0 0.</literal>
455 </para>
456
457 <para>
458 That was on x86_64, on i686 the syscall number is 54. To allow this
459 syscall, in <command>about:config</command> change
460 <command>security.sandbox.content.syscall_whitelist</command> to 16
461 (or 54 if using i686).
462 </para>
463
464 <para>
465 If you use <command>pulseaudio</command> in a Desktop Environment, it
466 might already be started by that DE. But if it is not, although
467 firefox-57 managed to start it, firefox-58 does not. If you run
468 <command>firefox</command> from a term, trying to play sound will
469 encounter error messages warning <literal>Can't get cubeb
470 context!</literal>
471 </para>
472
473 <para>
474 The fix for this is to close firefox, start pulseaudio to check it
475 does start (if not, read the information on Configuring in <xref
476 linkend="pulseaudio"/>) and restart firefox to check it is working.
477 If it now works, add the following to your <filename>~/.xinitrc</filename>:
478<phrase revision="sysv">
479<literal>pulseaudio --verbose --log-target=syslog&amp;</literal></phrase>
480<phrase revision="systemd">
481<literal>pulseaudio --verbose --log-target=journald&amp;</literal></phrase>
482 (unfortunately, on some systems this does not work).
483 </para>
484
485 <para>
486 You may wish to use multiple profiles within firefox. To do that, invoke
487 firefox as <command>firefox --ProfileManager</command>. You can also
488 check which profile is currently in use from
489 <command>about:profiles</command>.
490 </para>
491
492 </sect3>
493 </sect2>
494
495 <sect2 role="content">
496 <title>Contents</title>
497
498 <segmentedlist>
499 <segtitle>Installed Programs</segtitle>
500 <segtitle>Installed Libraries</segtitle>
501 <segtitle>Installed Directory</segtitle>
502
503 <seglistitem>
504 <seg>
505 firefox
506 </seg>
507 <seg>
508 Numerous libraries, browser components, plugins, extensions, and
509 helper modules installed in /usr/lib/firefox
510 </seg>
511 <seg>
512 /usr/lib/firefox and /usr/lib/mozilla
513 </seg>
514 </seglistitem>
515 </segmentedlist>
516
517 <variablelist>
518 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
519 <?dbfo list-presentation="list"?>
520 <?dbhtml list-presentation="table"?>
521
522 <varlistentry id="firefox-prog">
523 <term><command>firefox</command></term>
524 <listitem>
525 <para>
526 is a <application>GTK+-3</application> internet browser that uses
527 the Mozilla Gecko rendering engine.
528 </para>
529 <indexterm zone="firefox firefox-prog">
530 <primary sortas="b-firefox">firefox</primary>
531 </indexterm>
532 </listitem>
533 </varlistentry>
534
535 </variablelist>
536
537 </sect2>
538
539</sect1>
Note: See TracBrowser for help on using the repository browser.