source: xsoft/graphweb/firefox.xml@ 6c4bb8f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 8.0 8.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 nosym 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 6c4bb8f was 6c4bb8f, checked in by DJ Lucas <dj@…>, 8 years ago

Added firefox-47.0.1-gcc6-1.patch to fix issues with GCC-6.1.

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

  • Property mode set to 100644
File size: 15.9 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 "aba4b673b10e3fdcee80f88300829613">
10 <!ENTITY firefox-size "180 MB">
11 <!ENTITY firefox-buildsize "5.7 GB (85 MB installed)">
12 <!ENTITY firefox-time "18 SBU (with parallelism=4 on a recent intel i7, much longer on lesser CPUs)">
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 &lfs79_checked;&gcc6_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 Required patch if using gcc-6 or later
78 <ulink url="&patch-root;/firefox-&firefox-version;-gcc6-1.patch"/>
79 </para>
80 </listitem>
81 <listitem>
82 <para>
83 Required patch if using gtk+-3.20 or later (do not use with earlier versions)
84 <ulink url="&patch-root;/firefox-&firefox-version;-gtk320-1.patch"/>
85 </para>
86 </listitem>
87 <listitem>
88 <para>
89 Optional patch to allow system versions of <xref linkend="graphite2"/>
90 and <xref linkend="harfbuzz"/> - this should be regarded as experimental
91 <ulink url="&patch-root;/firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch"/>
92 </para>
93 </listitem>
94 </itemizedlist>
95
96 <note>
97 <para>
98 The tarball <emphasis>firefox-&firefox-version;.source.tar.xz</emphasis>
99 will untar to <emphasis>firefox-&firefox-version;</emphasis> directory.
100 </para>
101 </note>
102
103 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
104
105 <bridgehead renderas="sect4">Required</bridgehead>
106 <para role="required">
107 <xref linkend="alsa-lib"/>,
108 <xref linkend="autoconf213"/>,
109 <xref linkend="gtk3"/>
110 (or <xref linkend="gtk2"/> if you change the mozconfig where indicated),
111 <xref linkend="nss"/>,
112 <xref linkend="unzip"/>,
113 <xref linkend="yasm"/>, and
114 <xref linkend="zip"/>
115 </para>
116
117 <bridgehead renderas="sect4">Recommended</bridgehead>
118 <para role="recommended">
119 <xref linkend="icu"/>,
120 <xref linkend="libevent"/>,
121 <xref linkend="libvpx"/>, and
122 <xref linkend="sqlite"/>
123 </para>
124
125 <note>
126 <para>
127 If you don't install recommended dependencies, then internal copies of
128 those packages will be used. They might be tested to work, but they can
129 be out of date or contain security holes.
130 </para>
131 </note>
132
133 <note>
134 <para>
135 With <application>Firefox-31.0</application> and later versions, you
136 must have installed <application>Openssl</application> before
137 <application>Python 2</application> or the build system will quickly
138 fail with output including "ImportError: cannot import name
139 HTTPSHandler". If you are in any doubt about this (e.g. upgrading from
140 an older version of Firefox), check if
141 <filename>/usr/lib/python&python2-majorver;/lib-dynload/_ssl.so</filename>
142 exists. If it does not, reinstall <xref linkend="python2"/> (after
143 installing <xref linkend="openssl"/>). The latest version of any
144 <emphasis>currently maintained</emphasis> version of Openssl should be
145 satisfactory if already installed.
146 </para>
147 </note>
148
149 <bridgehead renderas="sect4">Optional</bridgehead>
150 <para role="optional">
151 <xref linkend="curl"/>,
152 <xref linkend="dbus-glib"/>,
153 <xref linkend="doxygen"/>,
154 <xref linkend="GConf"/>,
155 <xref linkend="ffmpeg"/> (runtime) or
156 <xref linkend="gst10-plugins-base"/> (with
157 <xref linkend="gst10-plugins-good"/> and
158 <xref linkend="gst10-libav"/> at runtime),
159 <xref linkend="libwebp"/>,
160 <xref linkend="openjdk"/>,
161 <xref linkend="pulseaudio"/>,
162 <xref linkend="startup-notification"/>,
163 <xref linkend="valgrind"/>,
164 <xref linkend="wget"/>,
165 <xref linkend="wireless_tools"/>,
166 <ulink url="https://hunspell.github.io/">Hunspell</ulink>,
167 <ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink>, and
168 <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>,
169 <ulink url="https://www.rust-lang.org/">Rust</ulink>,
170 and (with the patch)
171 <xref linkend="graphite2"/> and
172 <xref linkend="harfbuzz"/>
173 </para>
174
175 <para condition="html" role="usernotes">
176 User Notes: <ulink url="&blfs-wiki;/firefox"/>
177 </para>
178 </sect2>
179
180 <sect2 role="installation">
181 <title>Installation of Firefox</title>
182
183 <para>
184 The configuration of <application>Firefox</application> is accomplished
185 by creating a <filename>mozconfig</filename> file containing the desired
186 configuration options. A default <filename>mozconfig</filename> is
187 created below. To see the entire list of available configuration options
188 (and an abbreviated description of each one), issue <command>./configure
189 --help</command>. You may also wish to review the entire file and
190 uncomment any other desired options. Create the file by issuing the
191 following command:
192 </para>
193
194<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
195<literal># If you have a multicore machine, all cores will be used by default.
196# If desired, you can reduce the number of cores used, e.g. to 1, by
197# uncommenting the next line and setting a valid number of CPU cores.
198#mk_add_options MOZ_MAKE_FLAGS="-j1"
199
200# If you have installed DBus-Glib comment out this line:
201ac_add_options --disable-dbus
202
203# If you have installed dbus-glib, and you have installed (or will install)
204# wireless-tools, and you wish to use geolocation web services, comment out
205# this line
206ac_add_options --disable-necko-wifi
207
208# GStreamer is necessary for H.264 video playback in HTML5 Video Player if
209# FFmpeg is not found at runtime;
210# to be enabled, also remember to set "media.gstreamer.enabled" to "true"
211# in about:config. If you have GStreamer 1.x.y, comment out this line and
212# uncomment the following one:
213ac_add_options --disable-gstreamer
214#ac_add_options --enable-gstreamer=1.0
215
216# Uncomment this option if you wish to build with gtk+-2
217#ac_add_options --enable-default-toolkit=cairo-gtk2
218
219# Uncomment these lines if you have installed optional dependencies:
220#ac_add_options --enable-system-hunspell
221#ac_add_options --enable-startup-notification
222
223# Comment out following option if you have PulseAudio installed
224ac_add_options --disable-pulseaudio
225
226# If you have installed GConf, comment out this line
227ac_add_options --disable-gconf
228
229# Comment out following options if you have not installed
230# recommended dependencies:
231ac_add_options --enable-system-sqlite
232ac_add_options --with-system-libevent
233ac_add_options --with-system-libvpx
234ac_add_options --with-system-nspr
235ac_add_options --with-system-nss
236ac_add_options --with-system-icu
237
238# If you are going to apply the patch for system graphite
239# and system harfbuzz, uncomment these lines:
240#ac_add_options --with-system-graphite2
241#ac_add_options --with-system-harfbuzz
242
243# Stripping is now enabled by default.
244# Uncomment these lines if you need to run a debugger:
245#ac_add_options --disable-strip
246#ac_add_options --disable-install-strip
247
248# The BLFS editors recommend not changing anything below this line:
249ac_add_options --prefix=/usr
250ac_add_options --enable-application=browser
251
252ac_add_options --disable-crashreporter
253ac_add_options --disable-updater
254ac_add_options --disable-tests
255
256ac_add_options --enable-optimize
257
258ac_add_options --enable-gio
259ac_add_options --enable-official-branding
260ac_add_options --enable-safe-browsing
261ac_add_options --enable-url-classifier
262
263# From firefox-40, using system cairo causes firefox to crash
264# frequently when it is doing background rendering in a tab.
265#ac_add_options --enable-system-cairo
266ac_add_options --enable-system-ffi
267ac_add_options --enable-system-pixman
268
269ac_add_options --with-pthreads
270
271ac_add_options --with-system-bz2
272ac_add_options --with-system-jpeg
273ac_add_options --with-system-png
274ac_add_options --with-system-zlib
275
276mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
277EOF</userinput></screen>
278
279 <para>
280 Compile <application>Firefox</application> by issuing the following
281 commands:
282 </para>
283
284 <para>
285 Fix an issue with GCC-6.0 and higher:
286 </para>
287
288<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-gcc6-1.patch</userinput></screen>
289
290 <para>
291 If you are using gtk+-3.20 or later, apply a patch to restore the
292 slider on scrollbars:
293 </para>
294
295<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-gtk320-1.patch</userinput></screen>
296
297 <para>
298 If you have installed system versions of graphite2 and harfbuzz and wish
299 firefox to use those instead of its shipped versions, apply the patch and
300 uncomment the appropriate entries in the <filename>mozconfig</filename>
301 file:
302 </para>
303
304<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch</userinput></screen>
305
306 <note><para>
307 If you are compiling <application>Firefox</application> in chroot, make
308 sure you have <envar>$SHELL</envar> environment variable set or prepend
309 <envar>SHELL=/bin/sh</envar>.
310 </para></note>
311
312<screen><userinput>export CFLAGS_HOLD=$CFLAGS &amp;&amp;
313export CXXFLAGS_HOLD=$CXXFLAGS &amp;&amp;
314export CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" &amp;&amp;
315export CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" &amp;&amp;
316
317make -f client.mk</userinput></screen>
318
319 <para>
320 This package does not come with a test suite.
321 </para>
322
323 <para>
324 Now, as the <systemitem class="username">root</systemitem> user:
325 </para>
326
327<screen role="root"><userinput>make -f client.mk install INSTALL_SDK= &amp;&amp;
328chown -R 0:0 /usr/lib/firefox-&firefox-version; &amp;&amp;
329
330mkdir -pv /usr/lib/mozilla/plugins &amp;&amp;
331ln -sfv ../../mozilla/plugins /usr/lib/firefox-&firefox-version;/browser &amp;&amp;
332
333export CFLAGS=$CFLAGS_HOLD &amp;&amp;
334export CXXFLAGS=$CXXFLAGS_HOLD &amp;&amp;
335unset CFLAGS_HOLD CXXFLAGS_HOLD</userinput></screen>
336
337 </sect2>
338
339 <sect2 role="commands">
340 <title>Command Explanations</title>
341
342 <para>
343 <command>sed ...</command>: These commands correct the source to be
344 compatible with gcc6 by preventing c++ scope errors.
345 </para>
346
347 <para>
348 <command>CFLAGS= ... CXXFLAGS= ...</command>: These settings work around
349 code which gcc6 would otherwise regard as out-of-specification and allow
350 it to produce a working program.
351 </para>
352
353 <para>
354 <command>make -f client.mk ...</command>: Mozilla products are packaged to
355 allow the use of a configuration file which can be used to pass the
356 configuration settings to the <command>configure</command> command.
357 <command>make</command> uses the <filename>client.mk</filename> file to
358 get initial configuration and setup parameters.
359 </para>
360
361 <para>
362 <command>mkdir -p /usr/lib/mozilla/plugins</command>: This checks
363 that <filename class="directory">/usr/lib/mozilla/plugins</filename>
364 exists.
365 </para>
366
367 <para>
368 <command>ln -sv ... /usr/lib/firefox-&firefox-version;/browser</command>:
369 This command creates a symbolic link to <filename
370 class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
371 needed, as <application>Firefox</application> checks <filename
372 class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
373 symbolic link is made to keep all the plugins installed in one folder.
374 </para>
375
376 </sect2>
377
378 <sect2 role="configuration">
379 <title>Configuring Firefox</title>
380
381 <para>
382 If you did not add the <option>--disable-webm</option> option to your
383 <filename>mozconfig</filename>, your <application>Firefox</application>
384 can play most YouTube videos without the need for the Flash plugin.
385 Go to <ulink url="http://www.youtube.com/html5"/> to see which HTML5
386 video features your browser supports on YouTube.
387 </para>
388
389 <para>
390 If you use a desktop environment like <application>Gnome</application> or
391 <application>KDE</application> you may like to create a
392 <filename>firefox.desktop</filename> file so that
393 <application>Firefox</application> appears in the panel's menus. If you
394 didn't enable startup-notification in your mozconfig change the
395 StartupNotify line to false. As the
396 <systemitem class="username">root</systemitem> user:
397 </para>
398
399<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
400mkdir -pv /usr/share/pixmaps &amp;&amp;
401
402cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
403<literal>[Desktop Entry]
404Encoding=UTF-8
405Name=Firefox Web Browser
406Comment=Browse the World Wide Web
407GenericName=Web Browser
408Exec=firefox %u
409Terminal=false
410Type=Application
411Icon=firefox
412Categories=GNOME;GTK;Network;WebBrowser;
413MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
414StartupNotify=true</literal>
415EOF
416
417ln -sfv /usr/lib/firefox-&firefox-version;/browser/icons/mozicon128.png \
418 /usr/share/pixmaps/firefox.png</userinput></screen>
419
420 </sect2>
421
422 <sect2 role="content">
423 <title>Contents</title>
424
425 <segmentedlist>
426 <segtitle>Installed Programs</segtitle>
427 <segtitle>Installed Libraries</segtitle>
428 <segtitle>Installed Directory</segtitle>
429
430 <seglistitem>
431 <seg>
432 firefox
433 </seg>
434 <seg>
435 Numerous libraries, browser components, plugins, extensions, and
436 helper modules installed in /usr/lib/firefox-&firefox-version;
437 </seg>
438 <seg>
439 /usr/lib/firefox-&firefox-version;
440 </seg>
441 </seglistitem>
442 </segmentedlist>
443
444 <variablelist>
445 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
446 <?dbfo list-presentation="list"?>
447 <?dbhtml list-presentation="table"?>
448
449 <varlistentry id="firefox-prog">
450 <term><command>firefox</command></term>
451 <listitem>
452 <para>
453 is a <application>GTK+ 2</application> internet browser that uses the
454 Mozilla Gecko rendering engine.
455 </para>
456 <indexterm zone="firefox firefox-prog">
457 <primary sortas="b-firefox">firefox</primary>
458 </indexterm>
459 </listitem>
460 </varlistentry>
461
462 </variablelist>
463
464 </sect2>
465
466</sect1>
Note: See TracBrowser for help on using the repository browser.