Building GIMP for Linux
The main GIMP building instructions are at Building GIMP . This page is for Linux-specific additions.
Supported Distributions
GIMP can be installed on pretty much any GNU/Linux distribution out
there. For the stable branch in particular, we take great care at
not bumping the minimum requirements too often. We also try not to bump
build tools (meson
, autotools
…) without a good reason.
We allow a bit more flexibility for optional dependencies.
For the development branch, requirements might be higher than the stable branch, though we also try to avoid bumping without very good reasons (and will try to find ways to use new features while still keeping an old requirement, for instance using macros to test the dependency version).
A base rule is that we try to never bump a dependency if the minimum version is not already at least in Debian testing which acts as our base reference for the development branch as being “reasonably recent yet not too recent”.
As a general advice, software developers should anyway use distributions
providing reasonably recent packages if you don’t want to have to
compile yourself too many dependencies. Ideally, in GIMP case, you
should only have to build babl
, GEGL
and GIMP
. All the rest could
come from the package manager.
Distributions commonly used by core GIMP developers are: Debian testing, Debian unstable and Fedora. Some passing contributors have also been using Arch or Gentoo. Other distributions with longer support, and especially LTS versions, can be quite unsuited for software development; as the installed version grow older, you end up having to build yourself more and more dependencies. Some people contribute this way anyway, so in the end, it’s up to everyone and there is no reason recent GIMP cannot build and run on any distribution (you’ll just have to put more work sometimes).
Dependencies
GIMP depends on many packages
in
addition to babl
and gegl
.
Build options affect which packages are required.
The requirements may change for each release, so the authoritative file
should always be the file INSTALL
found in the root of the source tarball
(latest GIMP 2.10’s INSTALL
and equivalent 2.99’s INSTALL
are also found
online).
Versions listed in this file are generated into the template INSTALL.in
maintained in the source repository so should be as up-to-date as possible.
In unexpected cases where even INSTALL
is missing information, the
build system is the most authoritative source.
Therefore this build tutorial is to be taken as a generic build helper or guidelines. If something does not work with the given commands, you are expected to try and understand error messages, because it will never be possible to keep this tutorial perfectly up-to-date with every possible distributions and environments out there.
This page is for helping you installing the dependencies for some linux distributions, ideally with all build options enabled.
Debian flavors and derivatives using apt
If your distribution is Debian-based, you may also find the below trick useful.
For Debian and derivative distributions (Ubuntu, Mint…), a good start
would be to install the build-essential
package. There exists also a
special command which would install all the packages necessary to build
the GIMP package. It gets you mostly there in a single command:
sudo apt build-dep gimp
You may get an error about incomplete sources.list
:
$ sudo apt build-dep gimp
Reading package lists... Done
E: You must put some 'deb-src' URIs in your sources.list
If this happens, this forum thread gives a few hints on how to properly set your system with CLI and GUI alternative methods: https://askubuntu.com/a/857433
Debian testing
Since our CI build for the development branch uses Debian testing, and that we try to keep this build as full-featured and up-to-date as possible (because it is here to warn us of any new issue), if you use Debian testing, it might be a very good idea to look at the .gitlab-ci.yml file in our repository.
In particular, look at the build-image
job for most dependencies
installed from the package manager and at deps-debian
job for the
dependencies we build ourselves.
Copying these commands might be all there is to do for you.
Debian stable
Since our CI build for the stable branch uses Debian stable, and that we try to keep this build as full-featured and up-to-date as possible (because it is here to warn us of any new issue), if you use Debian testing, it might be a very good idea to look at the .gitlab-ci.yml file in our repository.
In particular, look at the deps-debian/stable
job:
- the
before_script
section contains the dependencies installed from the package manager; - the
script
section contains the dependencies we build ourselves.
Copying these commands might be all there is to do for you.
Ubuntu
This is a list of packages contributed in October 2019 and said to be working with Ubuntu 19.10, at the time. We cannot ensure this list is still right to this day. It will also depend on your flavor of Ubuntu.
sudo apt install \
libtool intltool \
meson \
asciidoc \
exiv2 libgexiv2-dev \
gjs \
gtk-3-examples \
gtk-doc-tools \
jasper \
libaa1-dev \
libappstream-glib-dev \
libarchive-dev \
libavcodec-dev libavformat-dev libavutil-dev \
libbz2-dev \
libgs-dev \
libgtk-3-dev libgtk2.0-dev gobject-introspection \
libgirepository1.0-dev \
libgudev-1.0-dev \
libheif-dev \
libjson-c-dev libjson-glib-dev \
liblcms2-dev \
liblensfun-dev \
libmng-dev \
libopenexr-dev \
libjpeg-dev libopenjp2-7-dev \
libpoppler-glib-dev \
libraw-dev \
librsvg2-bin librsvg2-dev \
libsdl2-dev \
libspiro-dev \
libswscale-dev \
libtiff-dev \
libumfpack5 \
libv4l-dev \
libwebkit2gtk-4.0-dev \
libwebp-dev \
luajit \
python-gi-dev python3-venv python3-wheel \
ruby \
w3m \
xsltproc
- Added in 2020
- When building optional vala language plugins, the vala compiler tool:
valac
- Since Ubuntu 20.04 focal
- The tool
gtk-encode-symbolic-svg
, an executable binary, has moved from packagegtk-3-examples
to packagelibgtk-3-bin
. - Since 2021
- When building using the clang compiler, the OpenMP library i.e.
-lomp
:libomp-dev
Fedora and other distributions using dnf
Fedora has a similar command as Debian which will install all packages necessary to build the GIMP package. It gets you mostly there in a single command:
sudo dnf builddep gimp
Note: builddep
is a plug-in to dnf
so it might require getting installed
first.