OBSOLETE Gimp Building Tips (for Linux)

WARNING: THIS PAGE COVERS ONLY OBSOLETE VERSIONS! For building the current GIMP, please see the real Gimp Building Tips page.

With that said, here's an archive of past GIMP building instructions I've had on that page over the years ...

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. The git instructions might also be helpful to anyone who hasn't used git very much yet.

If you want to build the latest GIMP but also keep another version, like the one from your distro, it's very important to include the --prefix argument when running autogen.sh or configure. Otherwise GIMP will end up installed to /usr/local/bin and either of your GIMP versions may get confused about which set of libraries applies to which binary. I've also included a wrapper script you can use to set up the include paths appropriately.


The rest of this page is old and probably not useful unless you're trying to build an old GIMP tarball on an old distro.

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. ./configure (or ./autogen.sh, if you're pulling from svn) 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.6 or 2.7) on Ubuntu "Hardy Heron" or later

GIMP 2.6 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 (see below for how to get those). You don't want to try to build 2.6 with anything earlier than Hardy. (2.7 (the current development release) has now bumped its requirements past Hardy, so you'll want "Intrepid Ibex." I haven't built 2.7 on Intrepid myself yet, but the procedure should be pretty much the same as 2.6 on Hardy.)

First you need the build requirements. Try this: apt-get build-dep gimp
That might be all you need, but if not, here's a longer version that actually installs less stuff (the Ubuntu version of GIMP enables features you may not need or care about):

apt-get install build-essential subversion make gcc libglib2.0-dev libgtk2.0-dev intltool automake1.9 libtool gtk-doc-tools g++ 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 libdbus-glib-1-dev (You might also need a package or two for gvfs if you're running gnome, otherwise you might want to configure --without-gvfs.)

In case you're curious, in intrepid that pulls in the following list:

The following NEW packages will be installed:
  autoconf automake1.7 automake1.9 autotools-dev build-essential debhelper
  docbook docbook-dsssl docbook-to-man docbook-xsl docbook-xsl-doc-html
  dpkg-dev g++ g++-4.3 gettext gnome-common gtk-doc-tools gutenprint-locales
  html2text intltool intltool-debian jade libaa1-dev libapr1 libaprutil1
  libart-2.0-dev libatk1.0-dev libcairo2-dev libdbus-1-dev libdbus-glib-1-dev
  libexif-dev libexpat1-dev libffi-dev libfontconfig1-dev libfreetype6-dev
  libglib2.0-dev libgtk2.0-dev libgtkhtml2-dev libgutenprintui2-1
  libgutenprintui2-dev libice-dev libjpeg62-dev liblcms1-dev libltdl7-dev
  libmail-sendmail-perl libmng-dev libmysqlclient15off libncurses5-dev
  libneon27-gnutls libosp5 libostyle1c2 libpango1.0-dev libpixman-1-dev
  libpng12-dev libpq5 libpthread-stubs0 libpthread-stubs0-dev librsvg2-dev
  libslang2-dev libsm-dev libsp1c2 libstdc++6-4.3-dev libsvn1
  libsys-hostname-long-perl libtiff4-dev libtiffxx0c2 libtool libwmf-bin
  libwmf-dev libx11-dev libxau-dev libxcb-render-util0-dev libxcb-render0-dev
  libxcb-xlib0-dev libxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-dev
  libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev
  libxml2-dev libxmu-dev libxmu-headers libxpm-dev libxrandr-dev
  libxrender-dev libxt-dev m4 mysql-common openjade patch pkg-config
  po-debconf python-dev python-gobject-dev python-gtk2-dev python-gtk2-doc
  python2.5-dev sp subversion x11proto-composite-dev x11proto-core-dev
  x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev
  x11proto-randr-dev x11proto-render-dev x11proto-xext-dev
  x11proto-xinerama-dev xtrans-dev zlib1g-dev

Once you have those, you also need gegl and babl (Intrepid may already have packages for them, but Hardy doesn't). GEGL has a few tricks: Currently gegl's svn build requires Ruby (not true for gimp) and its docs require something or other that the previously listed packages didn't pull in, so I had to configure without docs.

  1. Pull babl, ./autogen.sh, make, make install
    The default location of /usr/local seems fine; specifying anything else makes subsequent steps more complicated).
  2. Pull gegl, ./autogen.sh --without-docs, make, make install
    (use the default location just as for babl).
  3. In the gimp 2.6 source, ./configure --prefix=/usr/local/gimp-2.6
    (or another location of your choice, but do NOT use the default if you want gimp 2.6 to coexist with your older gimp -- and you probably do want that). Then make and sudo make install

Older versions ...

(included mostly for historical interest)

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 For 2.2 and earlier, you also need this step:

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.

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