Introduction to WebKitGTK+

The WebKitGTK+ package is a port of the portable web rendering engine WebKit to the GTK+ 3 and GTK+ 2 platforms.

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

Package Information

  • Download (HTTP): https://webkitgtk.org/releases/webkitgtk-2.26.2.tar.xz

  • Download MD5 sum: 65e06fe73ee166447894aaea95038e3b

  • Download size: 18 MB

  • Estimated disk space required: 617 MB (107 MB installed)

  • Estimated build time: 22 SBU (using parallelism=4, estimated 75 SBUs using one core)

WebKitGTK+ Dependencies


Cairo-1.17.2+f93fc72c03e, CMake-3.16.3, gst-plugins-base-1.16.2, gst-plugins-bad-1.16.2, GTK+-2.24.32, GTK+-3.24.13, ICU-65.1, libgudev-233, libsecret-0.20.0, libsoup-2.68.3, libwebp-1.1.0, Mesa-19.3.2, OpenJPEG-2.3.1, Ruby-2.7.0, SQLite-3.30.1, and Which-2.21



GTK-Doc-1.32, HarfBuzz-2.6.4, LLVM-9.0.1, Wayland-1.17.0, WOFF2-1.0.2, Hyphen, MathML, libwpe, WPEBackend-fdo, and xdg-dbus-proxy

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

Installation of WebKitGTK+

Installation of WebKitGTK+

First, fix some typos exposed by ICU-65.1+:

sed -i -e "/U16_NEXT(buffer, i, length, c)/s/$/;/" source/WTF/wtf/URLHelpers.cpp &&
sed -i -e "/U16_NEXT(characters, i, length, c)/s/$/;/" \
       -e "/U16_NEXT(qualifiedName, i, length, c)/s/$/;/" \

Install WebKitGTK+ by running the following commands:

mkdir -vp build &&
cd        build &&

cmake -DCMAKE_BUILD_TYPE=Release  \
      -DCMAKE_SKIP_RPATH=ON       \
      -DPORT=GTK                  \
      -DLIB_INSTALL_DIR=/usr/lib  \
      -DUSE_LIBHYPHEN=OFF         \
      -DUSE_WOFF2=OFF             \
      -Wno-dev -G Ninja ..        &&

This package does not have a working testsuite. However, there is a usable basic graphical web browser in the build directory, build/bin/MiniBrowser. If launching it fails, there is a problem with the build.



When installing, the Makefile does some additional compiling and linking. If you do not have Xorg in /usr, the LIBRARY_PATH and PKG_CONFIG_PATH variables need to be defined for the root user. If using sudo to assume root, use the -E option to pass your current environment variables for the install process.

Now, as the root user:

ninja install &&

install -vdm755 /usr/share/gtk-doc/html/webkit{2,dom}gtk-4.0 &&
install -vm644  ../Documentation/webkit2gtk-4.0/html/*   \
                /usr/share/gtk-doc/html/webkit2gtk-4.0       &&
install -vm644  ../Documentation/webkitdomgtk-4.0/html/* \

Command Explanations

-DUSE_LIBHYPHEN=OFF: This switch disables default automatic hyphenation implementation. You need to install Hyphen, if you wish to enable it (replacing OFF with ON or just removing the switch).

-DENABLE_MINIBROWSER=ON: This switch enables the Mini Browser compilation and install.

-DUSE_WPE_RENDERER=OFF: Remove this switch if the optional packages libwpe and WPEBackend-fdo are installed.

-DENABLE_BUBBLEWRAP_SANDBOX=OFF: Remove this switch if the optional package xdg-dbus-proxy is installed.

-DUSE_LIBNOTIFY=OFF: Use this switch if you do not have libnotify installed.

-DUSE_SYSTEM_MALLOC=ON: This switch enables building against the system installed malloc.

-DENABLE_GEOLOCATION=OFF: Use this switch if you don't want to install GeoClue-2.5.5.

-DENABLE_GTKDOC=ON: Use this switch if GTK-Doc-1.32 is installed and you wish to rebuild and install the API documentation.

-DUSE_WOFF2=ON: Use this switch if the optional package WOFF2-1.0.2 is installed.


Installed Program: jsc, MiniBrowser, and WebKitWebDriver
Installed Libraries: libjavascriptcoregtk-4.0.so and libwebkit2gtk-4.0.so
Installed Directories: /usr/include/webkitgtk-4.0, /usr/lib{,exec}/webkit2gtk-4.0, and /usr/share/gtk-doc/html/webkit{2,dom}gtk-4.0

Short Descriptions


is a command-line utility that allows you to run JavaScript programs outside of the context of a web browser.


is a very simple graphical browser.


allows debugging and automation of web pages and browsers.


contains core JavaScript API functions used by jsc and libwebkit2gtk-4.0.


contains the WebKit2 API functions.

Last updated on 2020-01-13 13:39:48 -0600