Compile GIMP with OpenEXR Support on Linux
Compiling the GNU Image Manipulation Program (GIMP) with OpenEXR support enables the software to import, process, and export high dynamic range (HDR) multilayer raster images. To achieve this on a Linux build machine, you must install baseline compilation utilities, primary GIMP developer libraries, and specific OpenEXR and Imath development packages. This guide details the exact package requirements and distribution-specific commands necessary to prepare your environment.
Core Build Tools
GIMP uses the Meson build system alongside Ninja. You must install the modern compilation toolchain before handling library dependencies:
- Compiler: GCC (
gcc,g++) or Clang - Build Systems:
meson(version 0.58.0 or newer) andninja-build - Source Control & Retrieval:
git - Configuration Tools:
pkg-config(orpkgconf) andcmake(frequently used by underlying dependencies)
OpenEXR Specific Dependencies
OpenEXR format handling relies on OpenEXR and its vector/math library, Imath. In newer releases (OpenEXR 3+), Imath is packaged separately.
- OpenEXR Development Headers:
libopenexr-dev(Debian/Ubuntu) oropenexr-devel(Fedora/RHEL/openSUSE) - Imath Development Headers:
libimath-dev(Debian/Ubuntu) orimath-devel(Fedora/RHEL/openSUSE) - Compression Library:
zlib1g-devorzlib-devel(required by OpenEXR for compression routines)
GEGL and Babl Requirements
GIMP's image processing core relies heavily on GEGL (Generic Graphics Library) and Babl. Full OpenEXR capability requires GEGL to also detect OpenEXR at compile time:
- babl: Color space conversion library development
headers (
libbabl-devorbabl-devel). - gegl: Graph based image processing framework
headers (
libgegl-devorgegl-devel). Ensure GEGL itself is compiled withlibopenexrsupport enabled, as GIMP delegates buffer manipulation and format loading routines through GEGL operations.
Core GIMP Platform Dependencies
GIMP relies on the GNOME stack and several media-handling libraries:
- GTK+ 3 Stack:
libgtk-3-dev,libglib2.0-dev,libpango1.0-dev,libcairo2-dev,libgdk-pixbuf-2.0-dev - Image Handling & Metadata:
liblcms2-dev(Little CMS for color profiles),libgexiv2-dev(Exiv2 metadata handling),libpng-dev,libjpeg-dev,libtiff-dev - Vector & Graphics Utilities:
libfontconfig1-dev,libfreetype6-dev,libharfbuzz-dev - Component Libraries:
libmypaint-dev,libjson-c-dev,libjson-glib-dev
Installation Commands by Distribution
Debian / Ubuntu / Linux Mint
sudo apt update
sudo apt install -y \
build-essential \
meson \
ninja-build \
pkg-config \
git \
libopenexr-dev \
libimath-dev \
zlib1g-dev \
libgtk-3-dev \
libglib2.0-dev \
libgegl-dev \
libbabl-dev \
liblcms2-dev \
libgexiv2-dev \
libmypaint-dev \
libjson-c-devFedora / RHEL / Rocky Linux
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y \
meson \
ninja-build \
pkgconf-pkg-config \
git \
openexr-devel \
imath-devel \
zlib-devel \
gtk3-devel \
glib2-devel \
gegl04-devel \
babl-devel \
lcms2-devel \
libgexiv2-devel \
libmypaint-devel \
json-c-develArch Linux
sudo pacman -Syu --needed \
base-devel \
meson \
ninja \
pkgconf \
git \
openexr \
imath \
zlib \
gtk3 \
glib2 \
gegl \
babl \
lcms2 \
libgexiv2 \
libmypaint \
json-cVerification
When running meson setup _build from the root of the
GIMP source tree, inspect the output summary table. Ensure the
openexr entry under the optional plug-ins section displays
yes or enabled. If it shows
disabled or not found, verify that
pkg-config --modversion OpenEXR correctly outputs the
installed OpenEXR version on your system.