Version 84 (modified by Martin Robinson, 12 years ago) (diff)


Building WebKitGTK+

Getting the source

To get the WebKitGTK+ source, please follow the instructions on the WebKit page. Many WebKit developer also use git to interact with the repository and the WebKit developer tools have strong support for git. contains tips for using git with WebKit.


Note: Aditional requirements may apply for running tests; see WebKitGtkLayoutTests.

  1. Install the base WebKitGTK+ dependencies:
    $ sudo apt-get install autoconf \
                           automake \
                           autotools-dev \
                           bison \
                           flex \
                           gail-3.0 \
                           gawk \
                           gnome-common \
                           autopoint \
                           gperf \
                           gtk-doc-tools \
                           libenchant-dev \
                           libgail-dev \
                           libgail-3-dev \
                           libgeoclue-dev \
                           libgirepository1.0-dev \
                           libgtk-3-dev \
                           libgstreamer-plugins-base0.10-dev \
                           libicu-dev \
                           libgl1-mesa-glx \
                           libgl1-mesa-dev \
                           libjpeg62-dev \
                           libpango1.0-dev \
                           libpng12-dev \
                           libsqlite3-dev \
                           libtool \
                           libxslt-dev \
                           libxt-dev \
  1. Install the jhbuild module dependencies:
    $ sudo apt-get install gobject-introspection \
                           icon-naming-utils \
                           libgcrypt11-dev \
                           libgpg-error-dev \
                           libp11-kit-dev \
  1. Download and build all jhbuild modules:
    $ Tools/Scripts/update-webkitgtk-libs

Building WebKitGTK+

$ Tools/Scripts/build-webkit --gtk


  • JHBuild configuration and module files are stored as Tools/gtk/jhbuildrc and Tools/gtk/jhbuild.modules.
  • If everything builds properly tests should typically pass on your system. Please file a bug if they do not.
  • If you get build errors saying a library could not be found but you have the appropriate packages installed make sure you have up-to-date multiarch-support and binutils (or binutils-gold) packages

Extending the jhbuild environment

If for some reason you would like to have jhbuild build more modules, or simply newer versions of some of them - which is very useful if you are hacking Epiphany, you can extend the moduleset used by our jhbuild setup with a custom moduleset . To do that create your new moduleset file, set a couple environment variables (discussed bellow), and run ./Tools/Scripts/update-webkitgtk-libs to build and install your new modules. The file may look like this:

<?xml version="1.0"?>
<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>

  <repository type="git" name=""
  <repository type="tarball" name=""
  <repository type="git" name="entropywave"
  <repository type="git" name="gstreamer"

  <autotools id="gtk+">
      <dep package="glib"/>
      <dep package="cairo"/>
    <branch module="/pub/GNOME/sources/gtk+/3.0/gtk+-3.3.10.tar.xz" version="3.3.10"

  <autotools id="glib">
      <dep package="libffi"/>
    <branch module="/pub/GNOME/sources/glib/2.31/glib-2.31.8.tar.xz" version="2.31.8"

  <autotools id="libsoup">
      <dep package="glib-networking"/>
    <branch module="libsoup" version="2.37.5"

  <autotools id="orc">
    <branch repo="entropywave" module="orc" checkoutdir="orc" />

  <autotools id="gstreamer">
    <branch repo="gstreamer" module="gstreamer" checkoutdir="gstreamer" />

  <autotools id="gst-plugins-base" autogenargs="--disable-examples" makeargs="ERROR_CFLAGS=">
      <dep package="gstreamer"/>
      <dep package="orc"/>
    <branch repo="gstreamer" module="gst-plugins-base" checkoutdir="gst-plugins-base"/>

  <autotools id="gst-plugins-good" autogenargs="--disable-examples">
      <dep package="gstreamer"/>
      <dep package="gst-plugins-base"/>
      <dep package="libsoup"/>
    <branch repo="gstreamer" module="gst-plugins-good" checkoutdir="gst-plugins-good"/>


To let the WebKit jhbuild environment know about the new files set the WEBKIT_EXTRA_MODULESETS to a file:// URI pointing to your file, like this:

$ export WEBKIT_EXTRA_MODULESETS=file:///home/user/my.modules

If you added new modules, set the WEBKIT_EXTRA_MODULES variable to a comma-separated list with their names. Please note: you have to run ./Toolsc/Scripts/update-webkitgtk-libs with these environment variables set for the modules to be taken into consideration.


To install the WebKit GTK+ library, simply change into the Release directory and issue

$ make install 

The configure script also supports the different features WebKit/GTK+ provide (e.g., SVG filters and animation features, HTML5 Video element support, etc..). Simply issuing

$ ./configure --help

on the command-line should give you a brief overview of what can be configured. Although you can build with these features enabled, it doesn't mean that the functionality is complete, let alone working properly. Feel free to submit a bug at if you find something that is not working.


OS X: The code on Mac OS X should built like any Linux distribution, as long as you install the above build dependencies (in addition to an "ordinary build environment" that includes XCode Tools 2.3 or newer). MacPorts users can get the dependencies via:

$ sudo port install webkit-gtk

If you get an error about libjpeg when the build does the configuration step, you may find the following fixes it:

$ export CPPFLAGS="-I/opt/local/include"
$ export LDFLAGS="-L/opt/local/lib"