Red Hat Enterprise Linux has ridiculously old versions of packages — especially those that are intended for a desktop audience. The GIMP 1.2.3 is so old that it's hardly worth using, so yesterday I spent an hour getting the latest version (2.2.8) working. There were a lot of steps involved because almost all of the prerequisites were a bunch of versions behind, too. So here's what I had to do to get Gimp installed and working on RHEL3.

  1. You'll need some Red Hat packages installed. XFree86-devel, libart, and libart-devel are necessary, and you'll probably want some image libraries, too. I installed libjpeg, libpng, and libtiff, along with their respective -devel packages.
  2. Set environment variables PATH should include /install/dir/bin, LD_LIBRARY_PATH should include /install/dir/lib, and PKG_CONFIG_PATH should include both /install/dir/lib/pkgconfig and /usr/lib/pkgconfig. Don't use /usr or /usr/local as your install dir. Who knows how these updated libraries could affect things if they clobber the older versions. I installed in /opt/gimp.
  3. Get the sources for pkg-config, glib, fontconfig, freetype2, ATK, cairo, pango, GTK, Gimp. Links are located on the GIMP from Source page, except for cairo which is available from cairographics.org. I got the most recent version of all of these libraries except for freetype2. Version 2.1.10 will cause some problems that I haven't resolved, so I used 2.1.7.
  4. Unpack all of the sources, and compile them in this order: pkg-config, glib, fontconfig, freetype2, ATK, cairo, pango, GTK, Gimp. (This was the hard part, figuring out the right order.) For each package, just add the argument "--prefix=/install/dir" to configure. Then make and make install. No other flags are necessary.
  5. Gimp will be in /opt/gimp/bin/gimp. Delete the source files.