source: xsoft/graphweb/firefox.xml@ 346e269

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.2 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 346e269 was 346e269, checked in by Ken Moffat <ken@…>, 6 years ago

Firefox - remove bogus sentence in the patch explanation, libmozgtk.so and libxul.so already both link to the system versions of graphite2 and harfbuzz because dependnet libs pull them in, the patch just ensures that old internal versions are not used.

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

  • Property mode set to 100644
File size: 17.5 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 "4b6ab0f71a6163f962f83c31d8f8cb73">
10 <!ENTITY firefox-size "244 MB">
11 <!ENTITY firefox-buildsize "6.3 GB (139 MB installed) without tests">
12 <!ENTITY firefox-time "18 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 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
74 <itemizedlist spacing="compact">
75 <listitem>
76 <para>
77 Optional patch to allow system versions of <xref linkend="graphite2"/>
78 and <xref linkend="harfbuzz"/>
79 <ulink url="&patch-root;/firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch"/>
80 </para>
81 </listitem>
82 </itemizedlist>
83
84 <note>
85 <para>
86 The tarball <emphasis>firefox-&firefox-version;.source.tar.xz</emphasis>
87 will untar to <emphasis>firefox-&firefox-version;</emphasis> directory.
88 It will also reset the permissions of the current directory to 0755 if you
89 have permission to do that. If you do this in a directory where
90 the sticky bit is set, such
91 as <filename class="directory">/tmp</filename> it will end with error
92 messages:
93 </para>
94
95<literallayout>tar: .: Cannot utime: Operation not permitted
96tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
97tar: Exiting with failure status due to previous errors
98</literallayout>
99
100 <para>
101 This does finish with non-zero status, but it does
102 <emphasis>NOT</emphasis> mean there is a real problem.
103 Do not untar as the <systemitem class="username">root</systemitem> user
104 in a directory where the sticky bit is set - that will unset it.
105 </para>
106 </note>
107
108 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
109
110 <bridgehead renderas="sect4">Required</bridgehead>
111 <para role="required">
112 <xref linkend="autoconf213"/>,
113 both <xref linkend="gtk3"/> and
114 <xref linkend="gtk2"/>,
115 <xref linkend="nss"/>,
116 <xref linkend="pulseaudio"/>
117 (or
118 <xref linkend="alsa-lib"/> if you edit the mozconfig;
119 now deprecated by mozilla),
120 <xref linkend="rust"/>,
121 <xref linkend="unzip"/>,
122 <xref linkend="yasm"/>, and
123 <xref linkend="zip"/>
124 </para>
125
126 <note>
127 <para>
128 The firefox developers wish to enable Stylo (replacement code to handle
129 Cascading Style Sheets) by default. At the moment that code cannot build
130 with system versions of nspr and pixman (it fails to find their headers)
131 so the BLFS editors have chosen to disable it. If you choose to enable
132 it, you <emphasis>must</emphasis> add <package>clang</package> from
133 <xref linkend="llvm"/> to the Required dependencies.
134 </para>
135 </note>
136
137 <bridgehead renderas="sect4">Recommended</bridgehead>
138 <para role="recommended">
139 <xref linkend="icu"/>,
140 <xref linkend="libevent"/>,
141 <xref linkend="libvpx"/>, and
142 <xref linkend="sqlite"/>
143 </para>
144
145 <note>
146 <para>
147 If you don't install recommended dependencies, then internal copies of
148 those packages will be used. They might be tested to work, but they can
149 be out of date or contain security holes.
150 </para>
151 </note>
152
153 <note>
154 <para>
155 With <application>Firefox-31.0</application> and later versions, you
156 must have installed <application>Openssl</application> before
157 <application>Python 2</application> or the build system will quickly
158 fail with output including "ImportError: cannot import name
159 HTTPSHandler". If you are in any doubt about this (e.g. upgrading from
160 an older version of Firefox), check if
161 <filename>/usr/lib/python&python2-majorver;/lib-dynload/_ssl.so</filename>
162 exists. If it does not, reinstall <xref linkend="python2"/> (after
163 installing <xref linkend="openssl"/>). The latest version of any
164 <emphasis>currently maintained</emphasis> version of Openssl should be
165 satisfactory if already installed.
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 each one), issue <command>./configure
205 --help</command>. You may also wish to review the entire file and
206 uncomment any other desired options. Create the file by issuing the
207 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# If desired, you can reduce the number of cores used, e.g. to 1, by
213# uncommenting the next line and setting a valid number of CPU cores.
214#mk_add_options MOZ_MAKE_FLAGS="-j1"
215
216# If you have installed dbus-glib, comment out this line:
217ac_add_options --disable-dbus
218
219# If you have installed dbus-glib, and you have installed (or will install)
220# wireless-tools, and you wish to use geolocation web services, comment out
221# this line
222ac_add_options --disable-necko-wifi
223
224# API Keys for geolocation APIs - necko-wifi (above) is required for MLS
225# Uncomment the following line if you wish to use Mozilla Location Service
226#ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
227
228# Uncomment the following line if you wish to use Google's geolocaton API
229# (needed for use with saved maps with Google Maps)
230#ac_add_options --with-google-api-keyfile=$PWD/google-key
231
232# Uncomment these lines if you have installed optional dependencies:
233#ac_add_options --enable-system-hunspell
234#ac_add_options --enable-startup-notification
235
236# Uncomment the following option if you have not installed PulseAudio
237#ac_add_options --disable-pulseaudio
238# and uncomment this if you installed alsa-lib instead of PulseAudio
239#ac_add_options --enable-alsa
240
241# If you have installed GConf, comment out this line
242ac_add_options --disable-gconf
243
244# Stylo is the new CSS code, including the rust 'style'
245# package. It is enabled by default, but cannot find the
246# headers for system nspr, pixman. If you enable stylo you
247# must comment out system-nspr system-pixman and
248# system-cairo, and you must also have installed clang.
249ac_add_options --disable-stylo
250
251# Comment out following options if you have not installed
252# recommended dependencies:
253ac_add_options --enable-system-sqlite
254ac_add_options --with-system-libevent
255ac_add_options --with-system-libvpx
256ac_add_options --with-system-nspr
257ac_add_options --with-system-nss
258ac_add_options --with-system-icu
259
260# If you are going to apply the patch for system graphite
261# and system harfbuzz, uncomment these lines:
262#ac_add_options --with-system-graphite2
263#ac_add_options --with-system-harfbuzz
264
265# Stripping is now enabled by default.
266# Uncomment these lines if you need to run a debugger:
267#ac_add_options --disable-strip
268#ac_add_options --disable-install-strip
269
270# The BLFS editors recommend not changing anything below this line:
271ac_add_options --prefix=/usr
272ac_add_options --enable-application=browser
273
274ac_add_options --disable-crashreporter
275ac_add_options --disable-updater
276# enabling the tests will use a lot more space and significantly
277# increase the build time, for no obvious benefit.
278ac_add_options --disable-tests
279
280# Optimization for size is broken with gcc7
281ac_add_options --enable-optimize="-O2"
282
283ac_add_options --enable-official-branding
284ac_add_options --enable-safe-browsing
285ac_add_options --enable-url-classifier
286
287# From firefox-40, using system cairo caused firefox to crash
288# frequently when it was doing background rendering in a tab.
289# This appears to again work in firefox-56
290ac_add_options --enable-system-cairo
291ac_add_options --enable-system-ffi
292ac_add_options --enable-system-pixman
293
294ac_add_options --with-pthreads
295
296ac_add_options --with-system-bz2
297ac_add_options --with-system-jpeg
298ac_add_options --with-system-png
299ac_add_options --with-system-zlib
300
301mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
302EOF</userinput></screen>
303
304 <para>
305 Compile <application>Firefox</application> by issuing the following
306 commands:
307 </para>
308
309 <para>
310 If you have installed system versions of graphite2 and harfbuzz and wish
311 firefox to use those instead of its shipped versions, apply the patch and
312 uncomment the appropriate entries in the <filename>mozconfig</filename>
313 file.
314 </para>
315
316<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch</userinput></screen>
317
318 <para>
319 If the geolocation APIs are needed:
320 </para>
321
322 <note>
323 <para>
324 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
325 The Google and Mozilla API Keys below are specific to LFS. If using
326 these instructions for another distro, or if you intend to distribute
327 binary copies of the software using these instructions, please obtain
328 your own keys following the instructions located at
329 <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/> and
330 <ulink url="https://location.services.mozilla.com/api"/> respectively.
331 <!-- BLFS Devs, register an account at Google with your
332 @linuxfromscratch.org email address, and I'll make you an administrator
333 for the 'Google APIs for LFS' project (where the API and OAuth keys
334 were created for use in the book).-->
335 </para>
336 </note>
337
338<screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
339echo "d2284a20-0505-4927-a809-7ffaf4d91e55" > mozilla-key</userinput></screen>
340
341 <note><para>
342 If you are compiling <application>Firefox</application> in chroot, make
343 sure you have <envar>$SHELL</envar> environment variable set or prepend
344 <envar>SHELL=/bin/sh</envar>.
345 </para></note>
346
347<screen><userinput>make -f client.mk</userinput></screen>
348
349 <para>
350 The <filename>mozconfig</filename> above disables the tests because
351 they use a lot more time and disk space for no obvious benefit. If
352 you have nevertheless enabled them, you can run the tests by executing:
353 </para>
354
355<screen><userinput>./mach gtest</userinput></screen>
356
357 <para>
358 This will require a network connection, and to be run from within an
359 Xorg session - there is a popup dialog when it fails to connect to
360 ALSA (that does not create a failed test). One or two tests will fail.
361 To see the details of the failure(s) you will need to log the output
362 from that command so that you can review it.
363 </para>
364
365 <para>
366 Now, as the <systemitem class="username">root</systemitem> user:
367 </para>
368
369<screen role="root"><userinput>make -f client.mk install INSTALL_SDK= &amp;&amp;
370chown -R 0:0 /usr/lib/firefox-&firefox-version; &amp;&amp;
371
372mkdir -pv /usr/lib/mozilla/plugins &amp;&amp;
373ln -sfv ../../mozilla/plugins /usr/lib/firefox-&firefox-version;/browser</userinput></screen>
374<!--
375 <para>
376 Set environment variables back to their values:
377 </para>
378
379<screen><userinput>export CFLAGS=$CFLAGS_HOLD &amp;&amp;
380export CXXFLAGS=$CXXFLAGS_HOLD &amp;&amp;
381unset CFLAGS_HOLD CXXFLAGS_HOLD</userinput></screen>
382-->
383
384 </sect2>
385
386 <sect2 role="commands">
387 <title>Command Explanations</title>
388
389 <para>
390 <command>make -f client.mk ...</command>: Mozilla products are packaged to
391 allow the use of a configuration file which can be used to pass the
392 configuration settings to the <command>configure</command> command.
393 <command>make</command> uses the <filename>client.mk</filename> file to
394 get initial configuration and setup parameters.
395 </para>
396
397 <para>
398 <command>mkdir -p /usr/lib/mozilla/plugins</command>: This checks
399 that <filename class="directory">/usr/lib/mozilla/plugins</filename>
400 exists.
401 </para>
402
403 <para>
404 <command>ln -sv ... /usr/lib/firefox-&firefox-version;/browser</command>:
405 This command creates a symbolic link to <filename
406 class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
407 needed, as <application>Firefox</application> checks <filename
408 class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
409 symbolic link is made to keep all the plugins installed in one folder.
410 </para>
411
412 </sect2>
413
414 <sect2 role="configuration">
415 <title>Configuring Firefox</title>
416
417 <para>
418 If you use a desktop environment like <application>Gnome</application> or
419 <application>KDE</application> you may like to create a
420 <filename>firefox.desktop</filename> file so that
421 <application>Firefox</application> appears in the panel's menus. If you
422 didn't enable startup-notification in your mozconfig change the
423 StartupNotify line to false. As the
424 <systemitem class="username">root</systemitem> user:
425 </para>
426
427<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
428mkdir -pv /usr/share/pixmaps &amp;&amp;
429
430cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
431<literal>[Desktop Entry]
432Encoding=UTF-8
433Name=Firefox Web Browser
434Comment=Browse the World Wide Web
435GenericName=Web Browser
436Exec=firefox %u
437Terminal=false
438Type=Application
439Icon=firefox
440Categories=GNOME;GTK;Network;WebBrowser;
441MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
442StartupNotify=true</literal>
443EOF
444
445ln -sfv /usr/lib/firefox-&firefox-version;/browser/icons/mozicon128.png \
446 /usr/share/pixmaps/firefox.png</userinput></screen>
447
448 </sect2>
449
450 <sect2 role="content">
451 <title>Contents</title>
452
453 <segmentedlist>
454 <segtitle>Installed Programs</segtitle>
455 <segtitle>Installed Libraries</segtitle>
456 <segtitle>Installed Directory</segtitle>
457
458 <seglistitem>
459 <seg>
460 firefox
461 </seg>
462 <seg>
463 Numerous libraries, browser components, plugins, extensions, and
464 helper modules installed in /usr/lib/firefox-&firefox-version;
465 </seg>
466 <seg>
467 /usr/lib/firefox-&firefox-version; and /usr/lib/mozilla
468 </seg>
469 </seglistitem>
470 </segmentedlist>
471
472 <variablelist>
473 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
474 <?dbfo list-presentation="list"?>
475 <?dbhtml list-presentation="table"?>
476
477 <varlistentry id="firefox-prog">
478 <term><command>firefox</command></term>
479 <listitem>
480 <para>
481 is a <application>GTK+-3</application> internet browser that uses
482 the Mozilla Gecko rendering engine.
483 </para>
484 <indexterm zone="firefox firefox-prog">
485 <primary sortas="b-firefox">firefox</primary>
486 </indexterm>
487 </listitem>
488 </varlistentry>
489
490 </variablelist>
491
492 </sect2>
493
494</sect1>
Note: See TracBrowser for help on using the repository browser.