From GIMP Developer Wiki
Revision as of 21:18, 20 May 2016 by Akkana (Talk | contribs)

Jump to: navigation, search
This page is a work in progress!! It's based on this page

This page contains things that you should know in order to build GIMP.

GIMP's dependencies

Gimp depends on the following common libraries for it's core:

  • GLib – a library used by many gnome applications, containing utilities and common data structures for programs written in C.
  • GObject - a library for implemnting objects (as in Object-Oriented-Programming) in C.
  • GTK+ – a graphical toolkit for building cross-platform user interfaces.
  • Cairo – a 2D graphics library, used for drawing some of GIMP’s widget and also used by Gtk+.
  • Python-Cairo: Python bindings for Cairo
  • Pango – a library for laying out and rendering text, used also in Gtk+.

GIMP's core depends also on two libraries which are mainly (but not only) intended to be used with GIMP:

  • GEGL – a graph based image processing library, heavily used in GIMP’s core.
To build GIMP 2.8, you need the GEGL version from git branch 'gegl-0-2'.
To build GIMP master (= the development version of GIMP), you need the GEGL version from git branch 'master'.
  • babl – a library for converting between pixel formats, heavily used by GIMP when communicating with GEGL.

GIMP master also needs libmypaint-gegl, a library for using MyPaint brushes. Get it from MyPaint github repository and build using the usual commands, with one exception: after running ./autogen.sh, you need to run ./configure explicitly with the same arguments:

sautogen.sh --prefix=YOURPREFIX --enable_gegl && ./configure --prefix=YOURPREFIX --enable_gegl

Some of GIMP's plugins depend on (at least) the following libraries

  • librsvg – a library for rendering SVG files.
  • libpng – a library for reading and writing PNG image files. Used by Gtk+, GIMP and GEGL.
  • libexif - a library for manipulating exif data (image metadata).
  • libwmf - a library for working with WMF files.
  • libtiff - a library for reading and writing TIFF image files.
  • libjpeg - a library for reading and writing JPEG image files.
  • liblcms - the Little Color Management System, a library for working with color profiles.

See also the file INSTALL. In GIMP master these informations are in the file INSTALL.in - expect to have to build GIMP first to then know the necessary dependencies for building GIMP ...

Build system

Building from a Tarball vs. building from latest source (Git)

There are 2 types of build we can do:

  • A build from Tarball - Tarballs (or in short, TARs) are files which pack together many folders and files, and the term of building from a Tarball refers to building from a package of code that you download from the program's website, for an official release of the program.

You can download tarballs from:

  • A build from Git - The latest source of programs is hosted in a version control system (in our case, the version control is called Git) and you can download the updated source directly from these. The source there is the most up-to-date, and it's sometimes unstable.

It matters to us, in the fact that building from Git requires an additional step (detailed below) and it usually requires more tools. You can check out the git sources from:

git clone git://git.gnome.org/babl
git clone git://git.gnome.org/gegl
git clone git://git.gnome.org/gimp

The build process

GIMP, together with GEGL and babl, all use the Gnu build system. This means that compiling them basically consists of 4 steps:

  1. autogen.sh script - This script generates the ./configure script for the next step
    In many cases, the autogen script also runs the configure script (see the next step) so we can usually pass arguments to it that will be passed to the configure script. This step is only needed when building from Git (and not from a Tarball)!
  2. configure script - This script does many checks to check which compilers and libraries you have available, which features are enabled and not, etc. When it finishes, it generates the Makefile's which are used by the make tool.
    Usually you can see all the options that you can specify to the script, by running
    ./configure --help
    One option that we'll use through all of the building tutorials, is the --prefix option
    ./configure --prefix=/PATH/TO/INSTALL/FOLDER
    The path given there is used to specify where do we want the compiled result to be installed to. This is useful when you want to install to places other than the default, for example when we are doing beta-builds and we don't want them to conflict with our existing installation. This can also be used on Linux/Unix system to install into the home-directory, in cases one does not have root access.
    If you are doing anything other than simply building from a tarball, do not run the configure script directly! Instead, run the autogen script and let it call the configure script for you! This is because there are some changes in the code (either locally, or in Git between tarball releases) that will not be handled correctly without the autogen script! (Thanks to schumaml from the GIMP IRC for pointing that out)
  3. make - The make tool uses files called Makefile, which are present at each directory, in order to call the compilers and other tools and use them on the apropriate source files
    We can speed up the process by running several jobs at once (this is useful when we have a processor with several cores). For example, if we want to run 4 jobs at once, we'll do
    make -j4
  4. Now, we finally install the compiled result by invoking the make tool again, with the "install" target
    make install

Additional notes


  • To compile GIMP you need Perl and intltool
  • To compile GIMP's Python support, you need PyGTK (a Python package)
  • Linking static versions of the most libraries (i.e. libgevix2) is not supported by GIMP. Use their dynamic versions.


  • To compile GEGL from Git, you need Ruby (a language interpreter)

Specific Builds