Building GIMP for Linux
The main GIMP building instructions are at Building GIMP. This page is for Linux-specific additions. It will help installing the dependencies for some distros, ideally building GIMP with all build options enabled.
Supported distributions
GIMP can be built, in principle, on pretty much any GNU/Linux distribution
out there. For the stable branch in particular, we take great care at
not bumping the minimum required dependencies. We also try not to bump
build tools (e.g. meson) without a good reason. But we allow a bit more
flexibility for optional dependencies.
For the development branch (master), requirements might be higher than
the stable branch, though we also try to avoid bumping. First, we try to
never bump a dependency if the minimum version is not already at least in
Debian testing since it is
“reasonably recent yet not too recent”. Also, we will try to find ways
to use new features while still keeping an old requirement (for instance
using macros to test the dependency version).
babl, GEGL and
GIMP. All the rest could come from the package manager.Since our CI build uses Debian,
and that we try to keep this build as full-featured as possible (because it
is here to warn us of any new build issue and because we use it for making the
AppImage package), if you use Debian, it might be a very good idea to look
at the .gitlab-ci.yml file in the GIMP source you cloned or downloaded.
In particular, look at the deps-debian-nonreloc job for most dependencies
installed from the package manager.
The dependencies we build ourselves (babl and GEGL) are in the main page.
Building with Flatpak on all other distributions
Most contributors simply build GIMP the “old-school” way above, nevertheless it’s possible to use Flatpak as a development environment, which is specially useful for contributors who not use our supported distro (Debian). Here is how this can be done:
Running, from GIMP source, build/linux/flatpak/1_build-deps-flatpak.sh then
build/linux/flatpak/2_build-gimp-flatpak.sh might be all there is to do.
To better understand the compilation flow, you may read below.
Install the dependencies
Install flatpak-builder package, available for most distributions.
Install the SDK and corresponding runtime if you haven’t already:
flatpak remote-add --user --if-not-exists --from gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo
flatpak install --user gnome-nightly org.gnome.Sdk/$(uname -m)/master org.gnome.Platform/$(uname -m)/master -ySetting up the environment
You just need to set GIMP_PREFIX. Due to sandboxing, the other variables
outlined in the main page are of no use (neither at build time nor at runtime).
Building the software
From GIMP source dir, let’s build everything not present in GNOME runtime by using just one flatpak-builder command (this also handles all the meson-ninja stuff for babl, GEGL and GIMP told in the main page):
flatpak-builder --force-clean --disable-rofiles-fuse --keep-build-dirs --repo=repo \
"$GIMP_PREFIX" build/linux/flatpak/org.gimp.GIMP-nightly.json 2>&1 | tee flatpak-builder.log.flatpak-builder.
For that same reason, the full command log will be stored in flatpak-builder.log.Running your flatpak
Finally, to run your flatpak, you need to install it with:
flatpak remote-add --user --no-gpg-verify nightly-local repo
flatpak install --user nightly-local org.gimp.GIMP.NightlyThen run it like any other installed flatpak.
Building with Snap on Ubuntu distribution
If your distribution is Ubuntu or Ubuntu-based (e.g.: Linux Mint),
running, from GIMP source, build/linux/snap/1_build-deps-snapcraft.sh then
build/linux/snap/2_build-gimp-snapcraft.sh might be all there is to do.
core: key of the build/linux/snap/snapcraft.yaml from source, since
Snap building targets packaging by using dependencies available on your build
machine (with exception of babl and GEGL), among with root permissions.Of course, you can also build GIMP on Ubuntu using Flatpak as described above.
Packaging third-party GIMP plug-ins for Linux
Users on Linux platforms expect software to be available on a remote repository. Even though GIMP plug-ins are relatively easy to install, you might want to distribute them using distro-agnostic formats such as Flatpak or Snap.