Xulrunner-31.0

Introduction to Xulrunner

Xulrunner is a runtime environment for XUL applications, and forms the major part of the Mozilla codebase. In particular, it provides the Gecko engine together with pkgconfig files so that other applications can find and use it.

This package is known to build and work properly using an LFS-7.5 platform.

Package Information

Xulrunner Dependencies

Required

alsa-lib-1.0.28, GTK+-2.24.24, Zip-3.0 and UnZip-6.0

Recommended

[Note]

Note

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.

[Note]

Note

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 Xulrunner), check if /usr/lib/python2.7/lib-dynload/_ssl.so exists. If it does not, reinstall Python-2.7.8 (after installing OpenSSL-1.0.1h - the latest version of any currently maintained version of Openssl should be satisfactory if already installed - if that package has not already been installed).

Optional

cURL-7.37.1, dbus-glib-0.102, Doxygen-1.8.7, gst-plugins-base-0.10.36 (with gst-plugins-good-0.10.31 and gst-ffmpeg-0.10.13 at runtime), or gst-plugins-base-1.4.0 (with gst-plugins-good-1.4.0 and gst-libav-1.4.0 at runtime), Hunspell, libnotify-0.7.6, OpenJDK-1.7.0.65/IcedTea-2.5.1, PulseAudio-5.0, startup-notification-0.12, Wget-1.15 and Wireless Tools-29

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/xulrunner

Installation of Xulrunner

The configuration of Xulrunner 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 should review the entire file and comment or uncomment options as necessary.

cat > mozconfig << "EOF"
# If you have a multicore machine, firefox will now use all the cores by
# default. Exceptionally, you can reduce the number of cores, 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

# If you have installed libnotify comment out this line:
ac_add_options --disable-libnotify

# GStreamer is necessary for H.264 video playback in HTML5 Video Player;
# to be enabled, also remember to set "media.gstreamer.enabled" to "true"
# in about:config. If you have GStreamer 0.x.y, uncomment this line:
#ac_add_options --enable-gstreamer
# or uncomment this line, if you have GStreamer 1.x.y
#ac_add_options --enable-gstreamer=1.0

# Uncomment these lines if you have installed optional dependencies:
#ac_add_options --enable-system-hunspell
#ac_add_options --enable-startup-notification

# Comment out following option if you have PulseAudio installed
ac_add_options --disable-pulseaudio

# If you have not installed Yasm then uncomment this line:
#ac_add_options --disable-webm

# 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

# The BLFS editors recommend not changing anything below this line:
ac_add_options --prefix=/usr
ac_add_options --enable-application=xulrunner

ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-tests

ac_add_options --enable-optimize
ac_add_options --enable-strip
ac_add_options --enable-install-strip

ac_add_options --enable-system-cairo
ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman

ac_add_options --enable-shared-js
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@/xulrunner-build-dir
EOF
[Note]

Note

Xulrunner's build uses large amount of memory. On some systems, the RAM/Swap combination needs 6 GB available.

Build Xulrunner by issuing the following commands:

[Note]

Note

If you are compiling Xulrunner in chroot, prepend SHELL=/bin/bash to the first make command below.

sed -i '/^template class/s/JS::WeakMapPtr/JS_PUBLIC_API(&)/' \
       js/src/vm/WeakMapPtr.cpp &&
make -f client.mk

This package does not come with a test suite.

Install, as the root user:

make -C xulrunner-build-dir install &&

mkdir -pv /usr/lib/mozilla/plugins &&
rm -rf /usr/lib/xulrunner-31.0/plugins &&
ln -sv ../mozilla/plugins /usr/lib/xulrunner-31.0 &&

chmod -v 755 /usr/lib/xulrunner-devel-31.0/sdk/bin/xpcshell &&

for library in libmozalloc.so libmozjs.so libxul.so; do
    ln -sfv ../../../xulrunner-31.0/$library \
            /usr/lib/xulrunner-devel-31.0/sdk/lib/$library
    ln -sfv xulrunner-31.0/$library /usr/lib/$library
done

ln -sfv ../xulrunner-devel-31.0/sdk/bin/run-mozilla.sh \
        /usr/lib/xulrunner-31.0
ln -sfv ../xulrunner-devel-31.0/sdk/bin/xpcshell \
        /usr/lib/xulrunner-31.0

Command Explanations

ac_add_options --disable-necko-wifi: If you remove this command, you will enable opt-in support for geolocation web services when you are using a wifi connection.

sed -i ... js/src/vm/WeakMapPtr.cpp: Fixes build with ac_add_options --enable-shared-js.

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.

ln -sfv ../mozilla/plugins ...: Some packages will install browser plugins into /usr/lib/mozilla/plugins. Creating this symlink Xulrunner keeps additional plugins in a common directory.

for library in libmozalloc.so libmozjs.so libxul.so ... : The libraries shipped with this package are installed into /usr/lib/xulrunner-31.0 which means they will not be found at runtime. These commands make relative symbolic links to the shared libraries from /usr/lib. They will also replace duplicate libraries that are installed in /usr/lib/xulrunner-devel-31.0/sdk/lib with symlinks in order to save some space.

ln -sfv ../xulrunner-devel-31.0/sdk/bin/ ... The run-mozilla.sh and xpcshell files have been moved in this version, but the code which installs Firefox (when linked to xulrunner) was not updated. These symlinks allowFirefox to install when built against Xulrunner.

Contents

Installed Programs: xulrunner
Installed Libraries: Numerous libraries, browser components, plugins, extensions, and helper modules installed in /usr/lib/xulrunner-31.0
Installed Directories: /usr/include/xulrunner-31.0, /usr/lib/xulrunner-31.0, /usr/lib/xulrunner-devel-31.0 and /usr/share/idl/xulrunner-31.0

Short Descriptions

xulrunner

is a shell script used for identifying the installed version and running Xulrunner applications.

Last updated on 2014-07-25 08:34:37 +0000