Gimp Building Tips

The GIMP has a fair number of dependencies, which can seem intimidating the first time you try to build it. Although configure is usually clear about what's missing, that's not always helpful in figuring out what package you need to add on a particular distro. This page is a note to myself about what I needed to add to Redhat and Debian machines when building the gimp. in case I need to update another machine, and is made public in case it might be useful to others.

I focus here primarily on the list of packages you'll need in order to build GIMP. If you're building from CVS, you might also find these pages on GIMP.org helpful:

Now, back to building GIMP:

Review the dependencies

After running ./configure (or ./autogen.sh if you're building the CVS version), check to make sure you aren't missing anything:

grep "will not" config.log
This will tell you everything configure says "will not be built", which otherwise you wouldn't know about until you tried to use it and it didn't work.

From 2.3 onward, this is no longer needed: configure will print out the full list of requirements, and what was and was not found, before it begins building. Be sure to review the list and make sure you're not missing anything you ought to have!

If configure gave errors, you're probably missing some build dependencies. But configure doesn't always give you much information about what's really missing. Here are the packages I needed:

Building SVN GIMP (2.5) on Ubuntu "Hardy Heron"

GIMP 2.5 is quite a bit harder to build than earlier releases, because you first have to build babl and gegl. But the list of development packages you'll need is pretty much the same as for 2.4 on Hardy. You don't want to try to build 2.5 with anything earlier than Hardy.

So the procedure is:

  1. Pull babl, ./configure, make, make install (the default location of /usr/local seems fine; specifying anything else makes subsequent steps more complicated).
  2. Pull gegl, ./configure, make, make install (default location just as for babl).
  3. Pull gimp trunk. ./configure --prefix=/usr/local/gimp-2.5 (or another location of your choice, but do NOT use the default if you want gimp 2.5 to coexist with your older gimp -- and at this stage, you do want that), make, make install.

Building GIMP 2.4 on Ubuntu ("Feisty Fawn" through "Hardy Heron")

First, try this: apt-get build-dep gimp
That might be all you need, but if not, here's the long version:

aptitude install build-essential subversion make gcc libglib2.0-dev libgtk2.0-dev intltool automake1.9 libtool gtk-doc-tools g++-3.3 libart-2.0-dev libtiff4-dev libexif-dev libxmu-dev libjpeg62-dev libmng-dev libpng12-dev librsvg2-dev libgutenprintui2-dev libaa1-dev python2.5-dev python-gtk2-dev libaa1-dev libxpm-dev libwmf-bin libwmf-dev libgtkhtml2-dev

However, there's one more catch: there's a bug in pygtk 2.10, so you will either need to disable gimp-python in the build, or patch your file locally. GIMP bug 381389 describes the problem and gives a patch. Unfortunately, Ubuntu doesn't plan to fix this in Edgy (bug 75327). Perhaps you'll have better luck filing a bug with your distro.

Building GIMP (2.3) on Ubuntu "Dapper Drake"

(Debian sid is probably similar.) From a fresh install, this should work:

aptitude install cvs make gcc libgdk-pixbuf-dev intltool automake1.9 libtool gtk-doc-tools g++-3.3 libart-2.0-dev libtiff4-dev libexif-dev libxmu-dev libjpeg62-dev libmng-dev libpng12-dev librsvg2-dev libwmf0-dev libgutenprintui2-dev aalib1-dev python2.4-dev python-gtk2-dev libaa1-dev libxpm-dev libwmf-bin libwmf-dev libgtkhtml2-dev

Building GIMP (2.3) on Ubuntu "Hoary Hedgehog"

(Debian package list should be similiar.) I already had gcc and the gtk development packages (aptitude install gcc gdk-pixbuf-dev) from building another package.

After that, this command should install everything:

aptitude install intltool automake1.9 libtool gtk-doc-tools g++-3.3 libart-2.0-dev libtiff4-dev libjpeg62-dev libmng-dev libpng12-dev librsvg2-dev libwmf0-dev libgimpprint1-dev aalib1-dev python2.4-dev python-gtk2-dev

which installs these packages:
[several gcc and gtk related packages, plus:] autoconf automake1.7 autotools-dev intltool libcompress-zlib-perl libfont-afm-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libmailtools-perl libtimedate-perl liburi-perl libwww-perl libxml-parser-perl automake1.9 libltdl3 libltdl3-dev libtool docbook-to-man docbook-xsl gnome-common gtk-doc-tools jade libsp1 sp g++-3.3 libstdc++5-3.3-dev libart-2.0-dev libtiff4-dev libjpeg62-dev libbz2-dev libcroco3-dev libgsf-1-dev liblcms1-dev libmng-dev libpng12-dev libpopt-dev librsvg2-dev libxml2-dev aalib1-dev libgimpprint1-dev libncurses5-dev slang1-dev python2.4-dev python-gtk2-dev

Note! Everything below this line concerns very old distros!

Building gimp 1.2.3 or 1.3.7 (tarball) on Redhat 7.2

I installed these RPMs (mostly found from rpmfind) in order to build tarballs of 1.2.3 and 1.3.7.

The gtk/glib 2.0 RPMS shouldn't be needed for 1.2, only for 1.3; but I tried 1.3 first so I haven't separated the dependencies.
atk-1.0.0-1.i386.rpm atk-devel-1.0.0-1.i386.rpm intltool-0.17-1.i386.rpm
gimp-1.2.3-1.ximian.2.i586.rpm gimp-devel-1.2.3-1.ximian.2.i386.rpm gimp-perl-1.2.3-1.ximian.2.i586.rpm
glib2-2.0.1-2.i386.rpm glib2-devel-2.0.1-2.i386.rpm gtk2-2.0.2-4.i386.rpm
gtk2-devel-2.0.2-4.i386.rpm libart_lgpl-2.3.8-3.i386.rpm libart_lgpl-devel-2.3.8-3.i386.rpm
pango-1.0.0-2.i386.rpm pango-devel-1.0.0-2.i386.rpm PDL-2.3.2-1.i386.rpm
libpng-1.2.1-2.i386.rpm aalib (from tarball)

Building gimp 1.2.4-pre1 (tarball) on Redhat 7.3

When I moved to 7.3, and downloaded the 1.2.4, I needed a few extra RPMs that for some reason I didn't seem to need for the previous build. Maybe I just didn't notice the warnings for these before now. Anyway, I needed these.
perl-GTK-0.7008-ximian.3.i586.rpm perl-Parse-RecDescent-1.80-ximian.2.i386.rpm [needs something for libmpeg]

Building the CVS tip (1.3.x) on Redhat 7.3

In addition to the 1.3.7 requirements listed above, I also needed:
autoconf-2.53-7 libart_lgpl-2.3.9-1 libart_lgpl-devel-2.3.9-1

Building gimp 1.2.3 (tarball) on Debian Woody

I apt-get installed the following packages:
libgtk1.2 libgtk1.2-dev pdl
libjpeg62 libjpeg62-dev libjpeg-progs zlibc
libpng3 libmpeg-doc libmpeg1 libmpeg3-1
libmpeg3-dev libimlib2 libtiff3g libtiff3g-dev
xlibs xlibs-dev libjpeg62-dev imgsizer
libmpeg-dev zlib1g-dev aalib1-dev
libpng2 libpng2-dev gtk-doc-0.9-5

Building the CVS tip (1.3.x) on Debian Woody

In addition to 1.2 requirements, I added:
install intltool libgtk2.0-0 gtk2.0-examples
libgtk2.0-common libgtk2.0-dbg libgtk2.0-dev libgtk2.0-doc
libart-2.0 libgimpprint-dev
That got me through autogen.sh and configure, but I'm hitting compile problems which are clearly a result of getting the wrong versions of files (the ChangeLog says that functions were added, but no such function exists in the file referenced by the ChangeLog). Apparently there may something wrong with the anonymous server; I'm still trying to figure this out.

Building gimp-freetype from CVS, on Redhat 7.3

Although I was already set up to build gimp from CVS on this machine, gimp-freetype wouldn't build. It turned out that it was confused by my installed gimp-config, from the gimp-devel RPM, which is of course the wrong version of gimp (I wanted it to find the gimp 1.3 I installed from source, not the gimp 1.2 I had from RPM). I had to
rpm -e --nodeps gimp-devel
then edit /etc/ld.so.conf to add /usr/local/lib (where the new gimp libraries live), then run ldconfig. After that, autogen.sh worked (albeit with some warnings, which I ignored).
My book: Beginning GIMP, from Novice to Professional
Linux Imaging
General Linux links
Shallow Sky home
...Akkana