%general-entities; ]> $LastChangedBy$ $Date$ Firefox-&firefox-version; Firefox Introduction to Firefox Firefox is a stand-alone browser based on the Mozilla codebase. &lfs81_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &firefox-md5sum; Download size: &firefox-size; Estimated disk space required: &firefox-buildsize; Estimated build time: &firefox-time; Additional Downloads Optional patch to allow system versions of and The tarball firefox-&firefox-version;.source.tar.xz will untar to firefox-&firefox-version; directory. It will also reset the permissions of the current directory to 0755 if you have permission to do that. If you do this in a directory where the sticky bit is set, such as /tmp it will end with error messages: tar: .: Cannot utime: Operation not permitted tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted tar: Exiting with failure status due to previous errors This does finish with non-zero status, but it does NOT mean there is a real problem. Do not untar as the root user in a directory where the sticky bit is set - that will unset it. Firefox Dependencies Required , both and , , (or if you edit the mozconfig; now deprecated by mozilla), , , , and The firefox developers wish to enable Stylo (replacement code to handle Cascading Style Sheets) by default. At the moment that code cannot build with system versions of nspr and pixman (it fails to find their headers) so the BLFS editors have chosen to disable it. If you choose to enable it, you must add clang from to the Required dependencies. Recommended , , , and If you don't install recommended dependencies, then internal copies of those packages will be used. They might be tested to work, but they can be out of date or contain security holes. With Firefox-31.0 and later versions, you must have installed Openssl before Python 2 or the build system will quickly fail with output including "ImportError: cannot import name HTTPSHandler". If you are in any doubt about this (e.g. upgrading from an older version of Firefox), check if /usr/lib/python&python2-majorver;/lib-dynload/_ssl.so exists. If it does not, reinstall (after installing ). The latest version of any currently maintained version of Openssl should be satisfactory if already installed. Optional , , , , (runtime, to play mov, mp3 or mp4 files), , , , , , , Hunspell, liboauth , libproxy, and (with the patch) and User Notes: Installation of Firefox The configuration of Firefox is accomplished by creating a mozconfig file containing the desired configuration options. A default mozconfig is created below. To see the entire list of available configuration options (and an abbreviated description of each one), issue ./configure --help. You may also wish to review the entire file and uncomment any other desired options. Create the file by issuing the following command: cat > mozconfig << "EOF" # If you have a multicore machine, all cores will be used by default. # If desired, you can reduce the number of cores used, e.g. to 1, by # uncommenting the next line and setting a valid number of CPU cores. #mk_add_options MOZ_MAKE_FLAGS="-j1" # If you have installed dbus-glib, comment out this line: ac_add_options --disable-dbus # If you have installed dbus-glib, and you have installed (or will install) # wireless-tools, and you wish to use geolocation web services, comment out # this line ac_add_options --disable-necko-wifi # API Keys for geolocation APIs - necko-wifi (above) is required for MLS # Uncomment the following line if you wish to use Mozilla Location Service #ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key # Uncomment the following line if you wish to use Google's geolocaton API # (needed for use with saved maps with Google Maps) #ac_add_options --with-google-api-keyfile=$PWD/google-key # Uncomment these lines if you have installed optional dependencies: #ac_add_options --enable-system-hunspell #ac_add_options --enable-startup-notification # Uncomment the following option if you have not installed PulseAudio #ac_add_options --disable-pulseaudio # and uncomment this if you installed alsa-lib instead of PulseAudio #ac_add_options --enable-alsa # If you have installed GConf, comment out this line ac_add_options --disable-gconf # Stylo is the new CSS code, including the rust 'style' # package. It is enabled by default, but cannot find the # headers for system nspr, pixman. If you enable stylo you # must comment out system-nspr system-pixman and # system-cairo, and you must also have installed clang. ac_add_options --disable-stylo # Comment out following options if you have not installed # recommended dependencies: ac_add_options --enable-system-sqlite ac_add_options --with-system-libevent ac_add_options --with-system-libvpx ac_add_options --with-system-nspr ac_add_options --with-system-nss ac_add_options --with-system-icu # If you are going to apply the patch for system graphite # and system harfbuzz, uncomment these lines: #ac_add_options --with-system-graphite2 #ac_add_options --with-system-harfbuzz # Stripping is now enabled by default. # Uncomment these lines if you need to run a debugger: #ac_add_options --disable-strip #ac_add_options --disable-install-strip # The BLFS editors recommend not changing anything below this line: ac_add_options --prefix=/usr ac_add_options --enable-application=browser ac_add_options --disable-crashreporter ac_add_options --disable-updater # enabling the tests will use a lot more space and significantly # increase the build time, for no obvious benefit. ac_add_options --disable-tests # Optimization for size is broken with gcc7 ac_add_options --enable-optimize="-O2" ac_add_options --enable-official-branding ac_add_options --enable-safe-browsing ac_add_options --enable-url-classifier # From firefox-40, using system cairo caused firefox to crash # frequently when it was doing background rendering in a tab. # This appears to again work in firefox-56 ac_add_options --enable-system-cairo ac_add_options --enable-system-ffi ac_add_options --enable-system-pixman ac_add_options --with-pthreads ac_add_options --with-system-bz2 ac_add_options --with-system-jpeg ac_add_options --with-system-png ac_add_options --with-system-zlib mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir EOF Compile Firefox by issuing the following commands: If you have installed system versions of graphite2 and harfbuzz and wish firefox to use those instead of its shipped versions, apply the patch and uncomment the appropriate entries in the mozconfig file. This also ensures that the system versions linked by libmozgtk.so match those used in libxul.so: patch -Np1 -i ../firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch If the geolocation APIs are needed: echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key echo "d2284a20-0505-4927-a809-7ffaf4d91e55" > mozilla-key If you are compiling Firefox in chroot, make sure you have $SHELL environment variable set or prepend SHELL=/bin/sh. make -f client.mk The mozconfig above disables the tests because they use a lot more time and disk space for no obvious benefit. If you have nevertheless enabled them, you can run the tests by executing: ./mach gtest This will require a network connection, and to be run from within an Xorg session - there is a popup dialog when it fails to connect to ALSA (that does not create a failed test). One or two tests will fail. To see the details of the failure(s) you will need to log the output from that command so that you can review it. Now, as the root user: make -f client.mk install INSTALL_SDK= && chown -R 0:0 /usr/lib/firefox-&firefox-version; && mkdir -pv /usr/lib/mozilla/plugins && ln -sfv ../../mozilla/plugins /usr/lib/firefox-&firefox-version;/browser Command Explanations make -f client.mk ...: Mozilla products are packaged to allow the use of a configuration file which can be used to pass the configuration settings to the configure command. make uses the client.mk file to get initial configuration and setup parameters. mkdir -p /usr/lib/mozilla/plugins: This checks that /usr/lib/mozilla/plugins exists. ln -sv ... /usr/lib/firefox-&firefox-version;/browser: This command creates a symbolic link to /usr/lib/mozilla/plugins. It's not really needed, as Firefox checks /usr/lib/mozilla/plugins by default, but the symbolic link is made to keep all the plugins installed in one folder. Configuring Firefox If you use a desktop environment like Gnome or KDE you may like to create a firefox.desktop file so that Firefox appears in the panel's menus. If you didn't enable startup-notification in your mozconfig change the StartupNotify line to false. As the root user: mkdir -pv /usr/share/applications && mkdir -pv /usr/share/pixmaps && cat > /usr/share/applications/firefox.desktop << "EOF" && [Desktop Entry] Encoding=UTF-8 Name=Firefox Web Browser Comment=Browse the World Wide Web GenericName=Web Browser Exec=firefox %u Terminal=false Type=Application Icon=firefox Categories=GNOME;GTK;Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; StartupNotify=true EOF ln -sfv /usr/lib/firefox-&firefox-version;/browser/icons/mozicon128.png \ /usr/share/pixmaps/firefox.png Contents Installed Programs Installed Libraries Installed Directory firefox Numerous libraries, browser components, plugins, extensions, and helper modules installed in /usr/lib/firefox-&firefox-version; /usr/lib/firefox-&firefox-version; and /usr/lib/mozilla Short Descriptions firefox is a GTK+-3 internet browser that uses the Mozilla Gecko rendering engine. firefox