source: xsoft/graphweb/firefox.xml@ 326f830

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 8.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 326f830 was 326f830, checked in by Ken Moffat <ken@…>, 7 years ago

Firefox-58.0 and rustc-1.22.1. Firefox now sometimes needs libnotify to report success during the install (I managed some installs without that being present, others barfed at the end). This version of firefox has felt like 'In the beginning was the plan, ... and the darkness was upon the face of the workers ...' I hope it will be less painful for anybody using it.

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

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