Introduction to WebKitGTK
        
        
          The WebKitGTK package is a port of
          the portable web rendering engine WebKit to the GTK-3 and GTK-4 platforms.
        
        
          ![[Note]](../images/note.png) 
          
            Note
          
          
            Development versions of BLFS may not build or run some packages
            properly if LFS or dependencies have been updated since the most
            recent stable versions of the books.
          
         
        
          ![[Important]](../images/important.png) 
          
            Important
          
          
            This package has historically had frequent updates that address
            security vulnerabilities. To determine the latest status check
            the BLFS
            Security Advisories.
          
         
        
          Package Information
        
        
          
            - 
              
                Download (HTTP): https://webkitgtk.org/releases/webkitgtk-2.48.5.tar.xz
               
- 
              
                Download MD5 sum: 23e26bc4e30b80462cb1030fab352409
               
- 
              
                Download size: 42 MB
               
- 
              
                Estimated disk space required: 1.5 GB (186 MB installed, add
                181 MB for GTK-4)
               
- 
              
                Estimated build time: 21 SBU (for GTK-3, using parallelism=8,
                add 21 SBU for GTK-4)
               
 
        
          WebKitGTK Dependencies
        
        
          Required
        
        
          Cairo-1.18.4, CMake-4.1.2,
          gst-plugins-base-1.26.6, gst-plugins-bad-1.26.6, GTK-3.24.51,
          GTK-4.20.2,
          ICU-77.1, Little
          CMS-2.17, libgudev-238, libsecret-0.21.7, libsoup-3.6.5, libtasn1-4.20.0, libwebp-1.6.0,
          Mesa-25.2.2, OpenJPEG-2.5.4, Ruby-3.4.7, unifdef-2.12, and Which-2.23
        
        
          Recommended
        
        
          bubblewrap-0.11.0, enchant-2.8.12, GeoClue-2.8.0
          (runtime), GLib-2.86.1 (with GObject Introspection),
          hicolor-icon-theme-0.18, libavif-1.3.0, libjxl-0.11.1,
          libseccomp-2.6.0, and xdg-dbus-proxy-0.1.6
        
        
          Optional
        
        
          Gi-DocGen-2025.5, harfBuzz-12.1.0, Wayland-1.24.0, WOFF2-1.0.2,
          ccache, flite, Hyphen,
          libbacktrace,
          libmanette,
          libspiel, and
          sysprof
        
       
      
        
          Installation of WebKitGTK
        
        
          ![[Important]](../images/important.png) 
          
            Important
          
          
            This package allows building with either GTK-3 or GTK-4, but not
            both in the same build. The GTK-4 version is needed for packages
            such as Epiphany-48.5. Other packages, such as
            Balsa-2.6.5 or Evolution-3.56.2, require the GTK-3
            version. Both versions can be installed side by side on the same
            system. We give build instructions for both cases below, but the
            only difference is the setting of -D USE_GTK4
          
          
            With the default “release” build configuration, some source
            files of this package require more than 4 GiB of RAM to be built.
            As the result, you should pass -j<N> to
            ninja (replacing
            <N> with the
            quotient of the amount of available RAM and 4 GiB) to limit the
            number of parallel jobs and avoid the job from being killed by
            the kernel OOM killer.
          
          
            On a 32-bit system, the sum of RAM and swap space used by a build
            job (in fact, any single process) cannot exceed 4 GiB. So if you
            are building this package on a 32-bit system, you must add the
            -D CMAKE_CXX_FLAGS_RELEASE="-O2
            -DNDEBUG" option to the cmake to disable some
            optimizations which need a lot of memory to limit the memory
            usage of individual build jobs. Performance will be impacted
            slightly, but not at a level where it is noticeable during normal
            usage.
          
         
        
          If you want to install the GTK-3 version of WebKitGTK, run the following commands:
        
        mkdir -vp build &&
cd        build &&
cmake -D CMAKE_BUILD_TYPE=Release     \
      -D CMAKE_INSTALL_PREFIX=/usr    \
      -D CMAKE_SKIP_INSTALL_RPATH=ON  \
      -D PORT=GTK                     \
      -D LIB_INSTALL_DIR=/usr/lib     \
      -D USE_LIBBACKTRACE=OFF         \
      -D USE_LIBHYPHEN=OFF            \
      -D ENABLE_GAMEPAD=OFF           \
      -D ENABLE_MINIBROWSER=ON        \
      -D ENABLE_DOCUMENTATION=OFF     \
      -D ENABLE_WEBDRIVER=OFF         \
      -D USE_WOFF2=OFF                \
      -D USE_GTK4=OFF                 \
      -D ENABLE_BUBBLEWRAP_SANDBOX=ON \
      -D USE_SYSPROF_CAPTURE=NO       \
      -D ENABLE_SPEECH_SYNTHESIS=OFF  \
      -W no-dev -G Ninja ..           &&
ninja
        
          This package does not have a working test suite. 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.
        
        
          Now, as the root user:
        
        ninja install
        
          If you want to install the GTK-4 version of WebKitGTK, run the following commands:
        
        rm -rf * .[^.]* &&
cmake -D CMAKE_BUILD_TYPE=Release         \
      -D CMAKE_INSTALL_PREFIX=/usr        \
      -D CMAKE_SKIP_INSTALL_RPATH=ON      \
      -D PORT=GTK                         \
      -D LIB_INSTALL_DIR=/usr/lib         \
      -D USE_LIBBACKTRACE=OFF             \
      -D USE_LIBHYPHEN=OFF                \
      -D ENABLE_GAMEPAD=OFF               \
      -D ENABLE_MINIBROWSER=ON            \
      -D ENABLE_DOCUMENTATION=OFF         \
      -D USE_WOFF2=OFF                    \
      -D USE_GTK4=ON                      \
      -D ENABLE_BUBBLEWRAP_SANDBOX=ON     \
      -D USE_SYSPROF_CAPTURE=NO           \
      -D ENABLE_SPEECH_SYNTHESIS=OFF      \
      -W no-dev -G Ninja ..               &&
ninja
        
          Now, as the root user:
        
        ninja install
        
          As the -D ENABLE_DOCUMENTATION=OFF
          option is used, the documentation is not rebuilt nor installed now.
          If you need the documentation, you can either install Gi-DocGen-2025.5 and remove this option from
          the cmake command, or
          install the pre-built documentation (only for the GTK-4 version)
          instead:
        
        install -vdm755 /usr/share/gtk-doc/html &&
cp -rv ../Documentation/* /usr/share/gtk-doc/html
       
      
        
          Command Explanations
        
        
          -D
          CMAKE_SKIP_INSTALL_RPATH=ON: This switch makes
          cmake remove
          hardcoded library search paths (rpath) when installing a binary
          executable file or a shared library. This package does not need
          rpath once it's installed into the standard location, and rpath may
          sometimes cause unwanted effects or even security issues.
        
        
          -D USE_LIBBACKTRACE=OFF:
          This switch disables the use of libbacktrace for dumping a stack
          trace when a crash happens. You need to install libbacktrace
          if you wish to enable it (replacing OFF with ON or just removing
          the switch).
        
        
          -D USE_LIBHYPHEN=OFF: This
          switch disables the default automatic hyphenation implementation.
          You need to install Hyphen
          if you wish to enable it (replacing OFF with ON or just removing
          the switch).
        
        
          -D
          ENABLE_DOCUMENTATION=OFF: This switch disables
          regenerating the documentation. Remove this switch if you have
          Gi-DocGen-2025.5 installed and wish to
          regenerate the documentation.
        
        
          -D ENABLE_GAMEPAD=OFF: This
          switch disables gamepad support. Remove this switch if you have
          libmanette
          installed and wish to enable it.
        
        
          -D ENABLE_MINIBROWSER=ON:
          This switch enables compiling and installing the MiniBrowser.
        
        
          -D ENABLE_WEBDRIVER=OFF:
          This switch disables compiling and installing WebKitWebDriver. We use it for
          the GTK-3 build because the WebKitWebDriver from the GTK-3
          build will be overwritten by the GTK-4 build anyway. Remove this
          option if you don't plan to build this package with GTK-4.
        
        
          -D
          ENABLE_BUBBLEWRAP_SANDBOX=ON: This switch enables the
          Bubblewrap sandbox, which helps mitigate the impact of most
          security vulnerabilities in this package. Change this switch to OFF
          if you do not want to install bubblewrap-0.11.0, libseccomp-2.6.0, or xdg-dbus-proxy-0.1.6, but note that this
          may put you at risk.
        
        
          -D USE_SYSPROF_CAPTURE=NO:
          This switch disables a hard dependency on sysprof.
        
        
          -D
          ENABLE_SPEECH_SYNTHESIS=OFF: This switch disables
          building speech synthesis support into WebKitGTK because it
          requires additional external dependencies. You will need both
          flite and
          libspiel if you
          wish to enable this.
        
        
          -D USE_SYSTEM_MALLOC=ON: This switch
          enables building against the system installed malloc.
        
        
          -D ENABLE_GEOLOCATION=OFF: Use this
          switch if you don't want to install GeoClue-2.8.0.
        
        
          -D USE_AVIF=OFF: Use this switch if you
          don't want to install libavif-1.3.0.
          Note that you will not have support for AVIF images if you do this.
        
        
          -D USE_WOFF2=ON: Use this switch if the
          optional package WOFF2-1.0.2 is installed. This adds
          additional support for fonts.
        
        
          -D USE_JPEGXL=OFF: Use this switch if
          the recommended package libjxl-0.11.1 is
          not installed. Note that you will not have support for JPEG XL
          images if this option is passed.
        
       
      
        
          Contents
        
        
          
            
              Installed Program:
              WebKitWebDriver
            
            
              Installed Libraries:
              libjavascriptcoregtk-4.1.so,
              libjavascriptcoregtk-6.0.so, libwebkit2gtk-4.1.so, and
              libwebkitgtk-6.0.so
            
            
              Installed Directories:
              /usr/include/webkitgtk-4.1,
              /usr/include/webkitgtk-6.0, /usr/lib{,exec}/webkit2gtk-4.1,
              /usr/lib{,exec}/webkitgtk-6.0,
              /usr/share/gtk-doc/html/{jsc-glib,webkit2gtk{,-web-extension}}-4.1
              (optional), and
              /usr/share/gtk-doc/html/{jsc-glib,webkit2gtk{,-web-process-extension}}-6.0
            
           
         
        
          
            Short Descriptions
          
          
            
              
              
            
            
              
                | 
                    WebKitWebDriver
                   | 
                    allows debugging and automation of web pages and browsers
                   | 
              
                | 
                     libjavascriptcoregtk-4.1.so | 
                    contains core JavaScript API functions used by
                    jsc and
                    libwebkit2gtk-4.1 | 
              
                | 
                    libjavascriptcoregtk-6.0.so | 
                    contains core JavaScript API functions used by
                    jsc and
                    libwebkitgtk-6.0 | 
              
                | 
                    libwebkit2gtk-4.1.so | 
                    contains the WebKit2 API
                    functions
                   | 
              
                | 
                    libwebkitgtk-6.0.so | 
                    contains the WebKit API
                    functions for GTK-4 applications
                   |