[f939f05] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[f939f05] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[0bcaa9a6] | 7 | <!ENTITY firefox-download-http "&mozilla-http;/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.xz">
|
---|
[8dfc5c3] | 8 | <!ENTITY firefox-download-ftp " ">
|
---|
[d4b171c] | 9 | <!ENTITY firefox-md5sum "fa81e8cbaa653c60c94d0830f0868877">
|
---|
| 10 | <!ENTITY firefox-size "268 MB">
|
---|
[5c2b024] | 11 | <!-- NB with stylo, much of the build uses rust, and therefore cargo files.
|
---|
[9da4cc6f] | 12 | But the extra cached cargo files, if any, seem to be minimal -->
|
---|
[d5c3bab9] | 13 | <!ENTITY firefox-buildsize "9.6 GB (156 MB installed) without tests">
|
---|
[9a469bc] | 14 | <!-- editors: with ff63 and rust-1.29, ./mach build -j4 is probably the
|
---|
[fe5f563d] | 15 | most practical way to get a timing on a machine with more cores, if taking
|
---|
| 16 | cores offline is not practical. If in doubt, round up -->
|
---|
[d5c3bab9] | 17 | <!ENTITY firefox-time "30 SBU (with parallelism=4) without tests">
|
---|
[f939f05] | 18 | ]>
|
---|
| 19 |
|
---|
[ffe47ca2] | 20 | <sect1 id="firefox" xreflabel="Firefox-&firefox-version;">
|
---|
[b81991e1] | 21 | <?dbhtml filename="firefox.html" ?>
|
---|
| 22 |
|
---|
| 23 | <sect1info>
|
---|
| 24 | <othername>$LastChangedBy$</othername>
|
---|
| 25 | <date>$Date$</date>
|
---|
| 26 | </sect1info>
|
---|
| 27 |
|
---|
| 28 | <title>Firefox-&firefox-version;</title>
|
---|
| 29 |
|
---|
| 30 | <indexterm zone="firefox">
|
---|
| 31 | <primary sortas="a-Firefox">Firefox</primary>
|
---|
| 32 | </indexterm>
|
---|
| 33 |
|
---|
| 34 | <sect2 role="package">
|
---|
| 35 | <title>Introduction to Firefox</title>
|
---|
| 36 |
|
---|
[c1ae13c] | 37 | <para>
|
---|
| 38 | <application>Firefox</application> is a stand-alone browser based on the
|
---|
| 39 | <application>Mozilla</application> codebase.
|
---|
| 40 | </para>
|
---|
[b81991e1] | 41 |
|
---|
[38489aa0] | 42 | &lfs84_checked;
|
---|
[76ae9a2] | 43 |
|
---|
[b81991e1] | 44 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 45 | <itemizedlist spacing="compact">
|
---|
| 46 | <listitem>
|
---|
[c1ae13c] | 47 | <para>
|
---|
| 48 | Download (HTTP): <ulink url="&firefox-download-http;"/>
|
---|
| 49 | </para>
|
---|
[b81991e1] | 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
[c1ae13c] | 52 | <para>
|
---|
| 53 | Download (FTP): <ulink url="&firefox-download-ftp;"/>
|
---|
| 54 | </para>
|
---|
[b81991e1] | 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
[c1ae13c] | 57 | <para>
|
---|
| 58 | Download MD5 sum: &firefox-md5sum;
|
---|
| 59 | </para>
|
---|
[b81991e1] | 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
[c1ae13c] | 62 | <para>
|
---|
| 63 | Download size: &firefox-size;
|
---|
| 64 | </para>
|
---|
[b81991e1] | 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
[c1ae13c] | 67 | <para>
|
---|
| 68 | Estimated disk space required: &firefox-buildsize;
|
---|
| 69 | </para>
|
---|
[b81991e1] | 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
[c1ae13c] | 72 | <para>
|
---|
| 73 | Estimated build time: &firefox-time;
|
---|
| 74 | </para>
|
---|
[b81991e1] | 75 | </listitem>
|
---|
| 76 | </itemizedlist>
|
---|
| 77 |
|
---|
[14de4227] | 78 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 79 | <itemizedlist spacing="compact">
|
---|
| 80 | <listitem>
|
---|
| 81 | <para>
|
---|
| 82 | Optional patch to allow system versions of <xref linkend="graphite2"/>
|
---|
[ecffcbbc] | 83 | and <xref linkend="harfbuzz"/>:
|
---|
[ef82450c] | 84 | <ulink url="&patch-root;/firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch"/>
|
---|
[14de4227] | 85 | </para>
|
---|
| 86 | </listitem>
|
---|
| 87 | </itemizedlist>
|
---|
| 88 |
|
---|
[f06c692] | 89 | <note>
|
---|
| 90 | <para>
|
---|
[8d0bc761] | 91 | Extracting the tarball
|
---|
| 92 | will reset the permissions of the current directory to 0755 if you
|
---|
[765c2a7] | 93 | have permission to do that. If you do this in a directory where
|
---|
[37bf7b1] | 94 | the sticky bit is set, such
|
---|
[dc9a18a] | 95 | as <filename class="directory">/tmp</filename> it will end with error
|
---|
| 96 | messages:
|
---|
| 97 | </para>
|
---|
| 98 |
|
---|
| 99 | <literallayout>tar: .: Cannot utime: Operation not permitted
|
---|
| 100 | tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
|
---|
| 101 | tar: Exiting with failure status due to previous errors
|
---|
| 102 | </literallayout>
|
---|
| 103 |
|
---|
| 104 | <para>
|
---|
| 105 | This does finish with non-zero status, but it does
|
---|
| 106 | <emphasis>NOT</emphasis> mean there is a real problem.
|
---|
| 107 | Do not untar as the <systemitem class="username">root</systemitem> user
|
---|
| 108 | in a directory where the sticky bit is set - that will unset it.
|
---|
[f06c692] | 109 | </para>
|
---|
[8d0bc761] | 110 |
|
---|
| 111 | <para>
|
---|
[406e5ffe] | 112 | As with other large packages which use C++ (or rust), the SBU times
|
---|
[fe5f563d] | 113 | to build this vary more widely than you might expect. Also, 6GB
|
---|
[406e5ffe] | 114 | of real memory is used during the final link and the SBUs can increase
|
---|
[fe5f563d] | 115 | significantly if the machine has to swap.
|
---|
[8d0bc761] | 116 | </para>
|
---|
| 117 |
|
---|
[e628b536] | 118 | <para>
|
---|
| 119 | The mach build system (Python scripts) can be somewhat unreliable: if
|
---|
| 120 | the build fails and reports an Error, it can still return a status of
|
---|
| 121 | success, causing a scripted build to try to install (which does not rerun
|
---|
| 122 | the build), fail during the preparations for installing, but still exit
|
---|
| 123 | with a status of success. Also, on occasion it may limit itself to only
|
---|
| 124 | running one set of jobs - that will make the build take about 3 times as
|
---|
| 125 | long as running with four sets of jobs.
|
---|
| 126 | </para>
|
---|
| 127 |
|
---|
[8d0bc761] | 128 | <para>
|
---|
| 129 | Although upstream prefer to use <application>PulseAudio</application>,
|
---|
| 130 | for the moment <application>Alsa</application> can still be used. Both
|
---|
| 131 | may need runtime configuration to get sound working.
|
---|
| 132 | </para>
|
---|
[f06c692] | 133 | </note>
|
---|
| 134 |
|
---|
[b81991e1] | 135 | <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
|
---|
| 136 |
|
---|
| 137 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[c1ae13c] | 138 | <para role="required">
|
---|
[14de4227] | 139 | <xref linkend="autoconf213"/>,
|
---|
[44cd41e] | 140 | <xref linkend="cbindgen"/>,
|
---|
[9da4cc6f] | 141 | <application>Clang</application> (from <xref linkend="llvm"/>),
|
---|
[ac105103] | 142 | both <xref linkend="gtk3"/> and
|
---|
[9da4cc6f] | 143 | <xref linkend="gtk2"/>,
|
---|
[326f830] | 144 | <xref linkend="libnotify"/>,
|
---|
[fe5f563d] | 145 | <xref linkend="nodejs"/>,
|
---|
[59a6b63] | 146 | <xref linkend="nss"/>,
|
---|
[be0bd12] | 147 | <xref linkend="pulseaudio"/>
|
---|
[81b3e7fd] | 148 | (or
|
---|
[9da4cc6f] | 149 | <xref linkend="alsa-lib"/> if you edit the mozconfig;
|
---|
[326f830] | 150 | now deprecated by mozilla), in either case please read the
|
---|
| 151 | Configuration Information,
|
---|
[4c6edac] | 152 | <xref linkend="rust"/>,
|
---|
[59a6b63] | 153 | <xref linkend="unzip"/>,
|
---|
[479e03a] | 154 | <xref linkend="yasm"/>, and
|
---|
| 155 | <xref linkend="zip"/>
|
---|
[c1ae13c] | 156 | </para>
|
---|
| 157 |
|
---|
[1555d3d] | 158 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[c1ae13c] | 159 | <para role="recommended">
|
---|
[b84fe71] | 160 | <xref linkend="icu"/>,
|
---|
[0e37869] | 161 | <xref linkend="libevent"/>,
|
---|
[e48053bd] | 162 | <!-- fails to build in 65.0 (headers changed)
|
---|
| 163 | <xref linkend="libvpx"/>, -->
|
---|
[7ebe22e] | 164 | <xref linkend="libwebp"/>, and
|
---|
[a30a874] | 165 | <xref linkend="sqlite"/>
|
---|
[c1ae13c] | 166 | </para>
|
---|
[1555d3d] | 167 |
|
---|
[0e37869] | 168 | <note>
|
---|
| 169 | <para>
|
---|
[b9f61df] | 170 | If you don't install recommended dependencies, then internal copies of
|
---|
| 171 | those packages will be used. They might be tested to work, but they can
|
---|
| 172 | be out of date or contain security holes.
|
---|
[0e37869] | 173 | </para>
|
---|
| 174 | </note>
|
---|
[8d0bc761] | 175 |
|
---|
[b81991e1] | 176 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[c1ae13c] | 177 | <para role="optional">
|
---|
[6c64623f] | 178 | <xref linkend="curl"/>,
|
---|
[c1ae13c] | 179 | <xref linkend="dbus-glib"/>,
|
---|
| 180 | <xref linkend="doxygen"/>,
|
---|
[d525da9c] | 181 | <xref linkend="GConf"/>,
|
---|
[babf0a0] | 182 | <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
|
---|
[fe30eab] | 183 | <!-- <phrase revision="sysv"><ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink></phrase> -->
|
---|
| 184 | <xref linkend="liboauth"/>,
|
---|
[26fa7d2] | 185 | <xref linkend="openjdk"/>,
|
---|
[0e37869] | 186 | <xref linkend="startup-notification"/>,
|
---|
[566fcae] | 187 | <xref linkend="valgrind"/>,
|
---|
[6000a3e] | 188 | <xref linkend="wget"/>,
|
---|
[73b06df] | 189 | <xref linkend="wireless_tools"/>,
|
---|
[14de4227] | 190 | <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>,
|
---|
| 191 | and (with the patch)
|
---|
| 192 | <xref linkend="graphite2"/> and
|
---|
| 193 | <xref linkend="harfbuzz"/>
|
---|
[c1ae13c] | 194 | </para>
|
---|
| 195 |
|
---|
| 196 | <para condition="html" role="usernotes">
|
---|
| 197 | User Notes: <ulink url="&blfs-wiki;/firefox"/>
|
---|
| 198 | </para>
|
---|
[b81991e1] | 199 | </sect2>
|
---|
| 200 |
|
---|
| 201 | <sect2 role="installation">
|
---|
| 202 | <title>Installation of Firefox</title>
|
---|
| 203 |
|
---|
[f72a04a] | 204 | <para>
|
---|
[b9f61df] | 205 | The configuration of <application>Firefox</application> is accomplished
|
---|
| 206 | by creating a <filename>mozconfig</filename> file containing the desired
|
---|
| 207 | configuration options. A default <filename>mozconfig</filename> is
|
---|
| 208 | created below. To see the entire list of available configuration options
|
---|
[888e303] | 209 | (and an abbreviated description of some of them), issue <command>./mach
|
---|
| 210 | configure && ./configure --help | less</command>. You may also
|
---|
| 211 | wish to review the entire file and uncomment any other desired options.
|
---|
| 212 | Create the file by issuing the following command:
|
---|
[c1ae13c] | 213 | </para>
|
---|
[5a13c45] | 214 |
|
---|
[0e37869] | 215 | <screen><userinput>cat > mozconfig << "EOF"
|
---|
[dcb0fe6] | 216 | <literal># If you have a multicore machine, all cores will be used by default.
|
---|
| 217 |
|
---|
[7090d94] | 218 | # If you have installed dbus-glib, comment out this line:
|
---|
[74eaf91] | 219 | ac_add_options --disable-dbus
|
---|
[aed37975] | 220 |
|
---|
[32cca2cd] | 221 | # If you have installed dbus-glib, and you have installed (or will install)
|
---|
| 222 | # wireless-tools, and you wish to use geolocation web services, comment out
|
---|
| 223 | # this line
|
---|
[6d1bf0e] | 224 | ac_add_options --disable-necko-wifi
|
---|
| 225 |
|
---|
[ad5a97d] | 226 | # API Keys for geolocation APIs - necko-wifi (above) is required for MLS
|
---|
| 227 | # Uncomment the following line if you wish to use Mozilla Location Service
|
---|
| 228 | #ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
|
---|
| 229 |
|
---|
| 230 | # Uncomment the following line if you wish to use Google's geolocaton API
|
---|
| 231 | # (needed for use with saved maps with Google Maps)
|
---|
[9116137c] | 232 | #ac_add_options --with-google-location-service-api-keyfile=$PWD/google-key
|
---|
[ad5a97d] | 233 |
|
---|
[ab8cd9be] | 234 | # Uncomment this line if you have installed startup-notification:
|
---|
[0e37869] | 235 | #ac_add_options --enable-startup-notification
|
---|
[495ebe07] | 236 |
|
---|
[81b3e7fd] | 237 | # Uncomment the following option if you have not installed PulseAudio
|
---|
| 238 | #ac_add_options --disable-pulseaudio
|
---|
| 239 | # and uncomment this if you installed alsa-lib instead of PulseAudio
|
---|
| 240 | #ac_add_options --enable-alsa
|
---|
[89cdb63d] | 241 |
|
---|
| 242 | # If you have installed GConf, comment out this line
|
---|
| 243 | ac_add_options --disable-gconf
|
---|
| 244 |
|
---|
[ece04000] | 245 | # From firefox-61, the stylo CSS code can no-longer be disabled
|
---|
[e29a0b1] | 246 |
|
---|
[0e37869] | 247 | # Comment out following options if you have not installed
|
---|
| 248 | # recommended dependencies:
|
---|
| 249 | ac_add_options --enable-system-sqlite
|
---|
| 250 | ac_add_options --with-system-libevent
|
---|
[e48053bd] | 251 | # current firefox fails to build against libvpx-1.8.0
|
---|
| 252 | #ac_add_options --with-system-libvpx
|
---|
[8df543f] | 253 | # firefox-65 understands webp and ships with an included copy
|
---|
| 254 | ac_add_options --with-system-webp
|
---|
[0e37869] | 255 | ac_add_options --with-system-nspr
|
---|
| 256 | ac_add_options --with-system-nss
|
---|
[b84fe71] | 257 | ac_add_options --with-system-icu
|
---|
[9a469bc] | 258 |
|
---|
| 259 | # The gold linker is no-longer the default
|
---|
| 260 | ac_add_options --enable-linker=gold
|
---|
| 261 |
|
---|
[0a561d8] | 262 | # The shipped libdavid (av1 decoder) is not built by default,
|
---|
| 263 | # at least on linux, but if nasm is not present libxul tries to
|
---|
| 264 | # link to one of libdavid's objects and fails. It is thought
|
---|
| 265 | # libdavid will be enabled in firefox-67, at which point nasm
|
---|
| 266 | # might be required.
|
---|
| 267 | ac_add_options --disable-av1
|
---|
| 268 |
|
---|
[9a469bc] | 269 | # You cannot distribute the binary if you do this
|
---|
| 270 | ac_add_options --enable-official-branding
|
---|
[0e37869] | 271 |
|
---|
[14de4227] | 272 | # If you are going to apply the patch for system graphite
|
---|
| 273 | # and system harfbuzz, uncomment these lines:
|
---|
| 274 | #ac_add_options --with-system-graphite2
|
---|
| 275 | #ac_add_options --with-system-harfbuzz
|
---|
| 276 |
|
---|
| 277 | # Stripping is now enabled by default.
|
---|
| 278 | # Uncomment these lines if you need to run a debugger:
|
---|
| 279 | #ac_add_options --disable-strip
|
---|
| 280 | #ac_add_options --disable-install-strip
|
---|
| 281 |
|
---|
[7251b1d] | 282 | # The BLFS editors recommend not changing anything below this line:
|
---|
[495ebe07] | 283 | ac_add_options --prefix=/usr
|
---|
[0e37869] | 284 | ac_add_options --enable-application=browser
|
---|
[495ebe07] | 285 |
|
---|
[5f5dcc2] | 286 | ac_add_options --disable-crashreporter
|
---|
| 287 | ac_add_options --disable-updater
|
---|
[57a8df2] | 288 | # enabling the tests will use a lot more space and significantly
|
---|
| 289 | # increase the build time, for no obvious benefit.
|
---|
[0e37869] | 290 | ac_add_options --disable-tests
|
---|
| 291 |
|
---|
[8df543f] | 292 | # With clang, unlike gcc-7 and later, the default level
|
---|
| 293 | # of optimization produces a working build.
|
---|
| 294 | ac_add_options --enable-optimize
|
---|
[0e37869] | 295 |
|
---|
[9da4cc6f] | 296 | # From firefox-61 system cairo is not supported
|
---|
| 297 |
|
---|
[41f2e90] | 298 | ac_add_options --enable-system-ffi
|
---|
[0e37869] | 299 | ac_add_options --enable-system-pixman
|
---|
| 300 |
|
---|
[e628b536] | 301 | # From firefox-62 --with-pthreads is not recognized
|
---|
[0e37869] | 302 |
|
---|
| 303 | ac_add_options --with-system-bz2
|
---|
[a0ace670] | 304 | ac_add_options --with-system-jpeg
|
---|
| 305 | ac_add_options --with-system-png
|
---|
| 306 | ac_add_options --with-system-zlib
|
---|
[aed37975] | 307 |
|
---|
[4def8b6] | 308 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
|
---|
[0e37869] | 309 | EOF</userinput></screen>
|
---|
[b9b7146] | 310 |
|
---|
[c1ae13c] | 311 | <para>
|
---|
| 312 | Compile <application>Firefox</application> by issuing the following
|
---|
| 313 | commands:
|
---|
| 314 | </para>
|
---|
[9572e88] | 315 |
|
---|
[14de4227] | 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>
|
---|
[346e269] | 320 | file.
|
---|
[14de4227] | 321 | </para>
|
---|
| 322 |
|
---|
[0a4a5cd] | 323 | <screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch</userinput></screen>
|
---|
[14de4227] | 324 |
|
---|
[ad5a97d] | 325 | <para>
|
---|
| 326 | If the geolocation APIs are needed:
|
---|
| 327 | </para>
|
---|
| 328 |
|
---|
[e5c8de01] | 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 |
|
---|
[ad5a97d] | 345 | <screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
|
---|
| 346 | echo "d2284a20-0505-4927-a809-7ffaf4d91e55" > mozilla-key</userinput></screen>
|
---|
| 347 |
|
---|
[8b3a8979] | 348 | <note><para>
|
---|
[9572e88] | 349 | If you are compiling <application>Firefox</application> in chroot, make
|
---|
| 350 | sure you have <envar>$SHELL</envar> environment variable set or prepend
|
---|
[b84fe71] | 351 | <envar>SHELL=/bin/sh</envar>. Also ensure that <filename>/dev/shm</filename>
|
---|
| 352 | is mounted.
|
---|
[8b3a8979] | 353 | </para></note>
|
---|
[9516a4f] | 354 |
|
---|
[3bdfc9fd] | 355 | <para>
|
---|
[b84fe71] | 356 | <!-- Invoke the Python script to compile the package: -->
|
---|
[7ebe22e] | 357 | To use the system version of ICU, run a sed to avoid a conflict between
|
---|
| 358 | upstream ICU's use of <literal>CheckImpl()</literal> in their public headers
|
---|
| 359 | and firefox's internal use of a different <literal>CheckImpl()</literal>.
|
---|
| 360 | Then invoke the Python2 script to compile the package.
|
---|
[3bdfc9fd] | 361 | </para>
|
---|
| 362 |
|
---|
[b84fe71] | 363 | <screen><userinput>sed -e 's/checkImpl/checkFFImpl/g' -i js/src/vm/JSContext*.h &&
|
---|
| 364 | export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib &&
|
---|
[ec1d8ae] | 365 | export MOZBUILD_STATE_PATH=${PWD}/mozbuild &&
|
---|
[f0b7ae67] | 366 | ./mach build</userinput></screen>
|
---|
[3bdfc9fd] | 367 |
|
---|
[0e37869] | 368 | <para>
|
---|
[57a8df2] | 369 | The <filename>mozconfig</filename> above disables the tests because
|
---|
| 370 | they use a lot more time and disk space for no obvious benefit. If
|
---|
[ecffcbbc] | 371 | you have nevertheless enabled them, you can run the tests by executing
|
---|
| 372 | <command>./mach gtest</command>. This will require a network connection,
|
---|
| 373 | and to be run from within an Xorg session - there is a popup dialog
|
---|
| 374 | when it fails to connect to ALSA (that does not create a failed test).
|
---|
| 375 | One or two tests will fail. To see the details of the failure(s) you
|
---|
| 376 | will need to log the output from that command so that you can review it.
|
---|
[0e37869] | 377 | </para>
|
---|
[01ce75f8] | 378 |
|
---|
[495ebe07] | 379 | <para>
|
---|
[b9f61df] | 380 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
[c1ae13c] | 381 | </para>
|
---|
[5a13c45] | 382 |
|
---|
[326f830] | 383 | <screen role="root"><userinput>./mach install &&
|
---|
[5ee1266] | 384 |
|
---|
[326f830] | 385 | mkdir -pv /usr/lib/mozilla/plugins &&
|
---|
[8d0bc761] | 386 | ln -sfv ../../mozilla/plugins /usr/lib/firefox/browser/</userinput></screen>
|
---|
[fe5f563d] | 387 |
|
---|
[a5708ba] | 388 | <para>
|
---|
| 389 | Set environment variables back to their values:
|
---|
| 390 | </para>
|
---|
| 391 |
|
---|
[fe5f563d] | 392 | <screen><userinput>unset CC CXX AR NM RANLIB MOZBUILD_STATE_PATH</userinput></screen>
|
---|
[01ce75f8] | 393 |
|
---|
[b81991e1] | 394 | </sect2>
|
---|
| 395 |
|
---|
[361df3e] | 396 | <sect2 role="commands">
|
---|
| 397 | <title>Command Explanations</title>
|
---|
[7d09fcb9] | 398 |
|
---|
[b84fe71] | 399 | <para>
|
---|
| 400 | <command>sed -e 's/checkImpl/checkFFImpl/g' ...</command>: Although the
|
---|
| 401 | package ships with a modified version of <application>ICU-59</application>
|
---|
| 402 | and only tests that the system version, if requested, is at least 59,
|
---|
| 403 | changes in <emphasis>some</emphasis> versions cause builds with the system
|
---|
| 404 | version to fail with error messages of the form <literal>no void
|
---|
| 405 | JSContext::checkImpl_NN member function</literal> where NN is the system
|
---|
| 406 | <application>ICU</application> version. The sed renames the local function.
|
---|
| 407 | </para>
|
---|
| 408 |
|
---|
[9a469bc] | 409 | <para>
|
---|
| 410 | <command>export CC=clang CXX=clang++ ...</command>: Upstream now use
|
---|
| 411 | <application>clang</application> and building with any recent version
|
---|
| 412 | saves a lot of space.
|
---|
| 413 | </para>
|
---|
| 414 |
|
---|
[fe5f563d] | 415 | <para>
|
---|
| 416 | <command>export MOZBUILD_STATE_PATH=${PWD}/mozbuild</command>: The build
|
---|
| 417 | is now supposed to tell you that it intends to create <filename
|
---|
| 418 | class="directory">~/.mozbuild</filename>, and offer you an option to
|
---|
| 419 | press <ENTER> to accept this, or Ctrl-C to cancel and restart the
|
---|
| 420 | build after specifying the directory. In practice, the message may not
|
---|
| 421 | appear until after <ENTER> is keyed, i.e. the build stalls.
|
---|
| 422 | </para>
|
---|
| 423 |
|
---|
| 424 | <para>
|
---|
| 425 | That directory is used for a (probably random) telemetry identifier.
|
---|
| 426 | Creating this in the build directory, and deleting that after the
|
---|
| 427 | installation, prevents it being used. If you wish to participate in
|
---|
| 428 | telemetry, export MOZBUILD_STATE_PATH to point to its default directory.
|
---|
| 429 | </para>
|
---|
| 430 |
|
---|
[a0d558d] | 431 | <para>
|
---|
[326f830] | 432 | <command>./mach build</command>: <application>Firefox</application>
|
---|
| 433 | now uses this <application>python2</application> script to run the
|
---|
| 434 | build and install.
|
---|
[a0d558d] | 435 | </para>
|
---|
| 436 |
|
---|
[c1ae13c] | 437 | <para>
|
---|
[326f830] | 438 | <option>./mach build --verbose</option>: Use this alternative if you
|
---|
| 439 | need details of which files are being compiled, together with any C or
|
---|
| 440 | C++ flags being used.
|
---|
[c1ae13c] | 441 | </para>
|
---|
| 442 |
|
---|
[9a469bc] | 443 | <para>
|
---|
[fe5f563d] | 444 | <option>./mach build -jN</option>: The build should, by default, use
|
---|
| 445 | all the online CPU cores. There are two reasons to specify the number
|
---|
| 446 | of cores, e.g. -j4 for 4 cores: First, if using all the cores causes
|
---|
| 447 | the build to swap because you have insufficient memory (e.g. for 4 cores
|
---|
| 448 | a build without system graphite2 and harfbuzz now uses slightly over 8GB
|
---|
| 449 | of RAM). In such cases, using fewer cores can be faster. Second, on some
|
---|
| 450 | machines the middle part of the build can drag on as if only one core is
|
---|
| 451 | present. In those cases, specifying the number of cores may speed up the
|
---|
| 452 | build.
|
---|
[9a469bc] | 453 | </para>
|
---|
| 454 |
|
---|
[c1ae13c] | 455 | <para>
|
---|
[8d0bc761] | 456 | <command>mkdir -pv /usr/lib/mozilla/plugins</command>: This ensures
|
---|
| 457 | that <filename class="directory">/usr/lib/mozilla/plugins/</filename>
|
---|
[c1ae13c] | 458 | exists.
|
---|
| 459 | </para>
|
---|
| 460 |
|
---|
| 461 | <para>
|
---|
[8d0bc761] | 462 | <command>ln -sv ... /usr/lib/firefox/browser</command>:
|
---|
[24da103] | 463 | This command creates a symbolic link to <filename
|
---|
| 464 | class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
|
---|
| 465 | needed, as <application>Firefox</application> checks <filename
|
---|
| 466 | class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
|
---|
| 467 | symbolic link is made to keep all the plugins installed in one folder.
|
---|
[c1ae13c] | 468 | </para>
|
---|
[fa1bc3e] | 469 |
|
---|
[b81991e1] | 470 | </sect2>
|
---|
| 471 |
|
---|
[88cec02] | 472 | <sect2 role="configuration">
|
---|
| 473 | <title>Configuring Firefox</title>
|
---|
| 474 |
|
---|
[c1ae13c] | 475 | <para>
|
---|
| 476 | If you use a desktop environment like <application>Gnome</application> or
|
---|
| 477 | <application>KDE</application> you may like to create a
|
---|
| 478 | <filename>firefox.desktop</filename> file so that
|
---|
| 479 | <application>Firefox</application> appears in the panel's menus. If you
|
---|
| 480 | didn't enable startup-notification in your mozconfig change the
|
---|
| 481 | StartupNotify line to false. As the
|
---|
| 482 | <systemitem class="username">root</systemitem> user:
|
---|
| 483 | </para>
|
---|
[31de6e7] | 484 |
|
---|
[eb5f847a] | 485 | <screen role="root"><userinput>mkdir -pv /usr/share/applications &&
|
---|
[0e37869] | 486 | mkdir -pv /usr/share/pixmaps &&
|
---|
[74f73ede] | 487 |
|
---|
[c099902d] | 488 | cat > /usr/share/applications/firefox.desktop << "EOF" &&
|
---|
[fcd66369] | 489 | <literal>[Desktop Entry]
|
---|
[31de6e7] | 490 | Encoding=UTF-8
|
---|
[0e37869] | 491 | Name=Firefox Web Browser
|
---|
| 492 | Comment=Browse the World Wide Web
|
---|
| 493 | GenericName=Web Browser
|
---|
| 494 | Exec=firefox %u
|
---|
| 495 | Terminal=false
|
---|
[31de6e7] | 496 | Type=Application
|
---|
| 497 | Icon=firefox
|
---|
[0e37869] | 498 | Categories=GNOME;GTK;Network;WebBrowser;
|
---|
| 499 | MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
|
---|
[fcd66369] | 500 | StartupNotify=true</literal>
|
---|
[31de6e7] | 501 | EOF
|
---|
[74f73ede] | 502 |
|
---|
[888e303] | 503 | ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
|
---|
[0e37869] | 504 | /usr/share/pixmaps/firefox.png</userinput></screen>
|
---|
| 505 |
|
---|
[326f830] | 506 | <sect3><title>Configuration Information</title>
|
---|
| 507 |
|
---|
| 508 | <para>
|
---|
| 509 | The application settings for firefox are accessible by keying
|
---|
| 510 | <command>about:config</command> in the address bar.
|
---|
| 511 | </para>
|
---|
| 512 |
|
---|
| 513 | <para>
|
---|
| 514 | With this version of <application>firefox</application>, getting
|
---|
| 515 | working sound can be a problem. Although upstream prefers pulseaudio,
|
---|
| 516 | on balance using <application>Alsa</application> may be easier.
|
---|
| 517 | </para>
|
---|
| 518 |
|
---|
| 519 | <para>
|
---|
| 520 | If you enabled <application>Alsa</application> for sound, you may need
|
---|
| 521 | to alter one variable to get working sound. If you run
|
---|
| 522 | <command>firefox</command> from a term and try to play something with
|
---|
| 523 | sound you might encounter error messages like:
|
---|
| 524 | </para>
|
---|
| 525 |
|
---|
| 526 | <para>
|
---|
| 527 | <literal>Sandbox: seccomp sandbox violation: pid 3941, tid 4030,
|
---|
| 528 | syscall 16, args 48 2147767296 139909894784796 0 0 0.</literal>
|
---|
| 529 | </para>
|
---|
| 530 |
|
---|
| 531 | <para>
|
---|
| 532 | That was on x86_64, on i686 the syscall number is 54. To allow this
|
---|
| 533 | syscall, in <command>about:config</command> change
|
---|
| 534 | <command>security.sandbox.content.syscall_whitelist</command> to 16
|
---|
| 535 | (or 54 if using i686).
|
---|
| 536 | </para>
|
---|
| 537 |
|
---|
| 538 | <para>
|
---|
| 539 | If you use <command>pulseaudio</command> in a Desktop Environment, it
|
---|
| 540 | might already be started by that DE. But if it is not, although
|
---|
[7ebe22e] | 541 | firefox-57 managed to start it, firefox-58 did not. If you run
|
---|
| 542 | <command>firefox</command> from a term and this problem is present,
|
---|
| 543 | trying to play sound will
|
---|
[326f830] | 544 | encounter error messages warning <literal>Can't get cubeb
|
---|
| 545 | context!</literal>
|
---|
| 546 | </para>
|
---|
| 547 |
|
---|
| 548 | <para>
|
---|
| 549 | The fix for this is to close firefox, start pulseaudio to check it
|
---|
| 550 | does start (if not, read the information on Configuring in <xref
|
---|
| 551 | linkend="pulseaudio"/>) and restart firefox to check it is working.
|
---|
| 552 | If it now works, add the following to your <filename>~/.xinitrc</filename>:
|
---|
| 553 | <phrase revision="sysv">
|
---|
| 554 | <literal>pulseaudio --verbose --log-target=syslog&</literal></phrase>
|
---|
| 555 | <phrase revision="systemd">
|
---|
| 556 | <literal>pulseaudio --verbose --log-target=journald&</literal></phrase>
|
---|
| 557 | (unfortunately, on some systems this does not work).
|
---|
| 558 | </para>
|
---|
| 559 |
|
---|
| 560 | <para>
|
---|
| 561 | You may wish to use multiple profiles within firefox. To do that, invoke
|
---|
| 562 | firefox as <command>firefox --ProfileManager</command>. You can also
|
---|
| 563 | check which profile is currently in use from
|
---|
| 564 | <command>about:profiles</command>.
|
---|
| 565 | </para>
|
---|
| 566 |
|
---|
| 567 | </sect3>
|
---|
[88cec02] | 568 | </sect2>
|
---|
| 569 |
|
---|
[b81991e1] | 570 | <sect2 role="content">
|
---|
| 571 | <title>Contents</title>
|
---|
| 572 |
|
---|
| 573 | <segmentedlist>
|
---|
| 574 | <segtitle>Installed Programs</segtitle>
|
---|
| 575 | <segtitle>Installed Libraries</segtitle>
|
---|
[c5f005b] | 576 | <segtitle>Installed Directory</segtitle>
|
---|
[b81991e1] | 577 |
|
---|
| 578 | <seglistitem>
|
---|
[0e37869] | 579 | <seg>
|
---|
| 580 | firefox
|
---|
| 581 | </seg>
|
---|
[c1ae13c] | 582 | <seg>
|
---|
| 583 | Numerous libraries, browser components, plugins, extensions, and
|
---|
[8d0bc761] | 584 | helper modules installed in /usr/lib/firefox
|
---|
[c1ae13c] | 585 | </seg>
|
---|
[7498751] | 586 | <seg>
|
---|
[54814bdd] | 587 | /usr/lib/firefox and /usr/lib/mozilla
|
---|
[7498751] | 588 | </seg>
|
---|
[b81991e1] | 589 | </seglistitem>
|
---|
| 590 | </segmentedlist>
|
---|
| 591 |
|
---|
| 592 | <variablelist>
|
---|
| 593 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 594 | <?dbfo list-presentation="list"?>
|
---|
| 595 | <?dbhtml list-presentation="table"?>
|
---|
| 596 |
|
---|
| 597 | <varlistentry id="firefox-prog">
|
---|
| 598 | <term><command>firefox</command></term>
|
---|
| 599 | <listitem>
|
---|
[c1ae13c] | 600 | <para>
|
---|
[7e1afc9] | 601 | is a <application>GTK+-3</application> internet browser that uses
|
---|
| 602 | the Mozilla Gecko rendering engine.
|
---|
[c1ae13c] | 603 | </para>
|
---|
[b81991e1] | 604 | <indexterm zone="firefox firefox-prog">
|
---|
| 605 | <primary sortas="b-firefox">firefox</primary>
|
---|
| 606 | </indexterm>
|
---|
| 607 | </listitem>
|
---|
| 608 | </varlistentry>
|
---|
[0e37869] | 609 |
|
---|
[b81991e1] | 610 | </variablelist>
|
---|
[0e37869] | 611 |
|
---|
[b81991e1] | 612 | </sect2>
|
---|
[0e37869] | 613 |
|
---|
[4d37129] | 614 | </sect1>
|
---|