wiki:BuildingGtk

Version 67 (modified by kov@webkit.org, 12 years ago) (diff)

jhbuild update

Building WebKitGTK+

Dependencies

WebKitGTK+ often requires very recent versions of some core packages like glib and libsoup. To ease building and getting tests to match the results in the buildbots we have a built-in jhbuild-based system that automatically builds and uses those packages. You can look at the configuration and modules file in the Tools/gtk directory, and the script that is run to update the dependencies is Tools/Scripts/update-webkitgtk-libs. Following is a list of Debian packages necessary for building WebKitGTK+.

  • autoconf
  • automake
  • autotools-dev
  • bison (>= 2.4.1)
  • flex
  • gail-3.0
  • gawk
  • gperf
  • gtk-doc-tools
  • libenchant-dev
  • libgail-dev
  • libgail-3-dev
  • libgeoclue-dev
  • libgstreamer-plugins-base0.10-dev (>= 0.10.30)
  • libgtk3.0-dev
  • libgpg-error-dev
  • libicu-dev
  • libgl1-mesa-glx
  • libgl1-mesa-dev
  • libjpeg62-dev
  • libpango1.0-dev (>= 1.16)
  • libpng12-dev
  • libsqlite3-dev
  • libtool
  • libxslt-dev
  • libxt-dev

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"

Aditional requirements may apply for running tests; see WebKitGtkLayoutTests.

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. http://trac.webkit.org/wiki/UsingGitWithWebKit contains tips for using git with WebKit.

Launching the build

Once you have successfully checked the source out of the repository, simply run:

$ Tools/Scripts/build-webkit --gtk

This will build WebKit in the directory WebKitBuild/Release. Once the build finishes, you can run a simple demo browser by executing:

$ Tools/Scripts/run-launcher --gtk

To build a debug build of WebKitGTK+ (which will contain debugging symbols useful for generating stack traces), you can pass the --debug argument to build-webkit. This will build WebKit in WebKitBuild/Debug and all other scripts should take the --debug argument as well.

$ Tools/Scripts/build-webkit --gtk --debug
$ Tools/Scripts/run-launcher --gtk --debug

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 http://bugs.webkit.org if you find something that is not working.