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:
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.logThis 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:
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:
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.
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
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
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) |
| perl-GTK-0.7008-ximian.3.i586.rpm | perl-Parse-RecDescent-1.80-ximian.2.i386.rpm | [needs something for libmpeg] |
| autoconf-2.53-7 | libart_lgpl-2.3.9-1 | libart_lgpl-devel-2.3.9-1 |
| 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 |
| 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 |
rpm -e --nodeps gimp-develthen 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).