05 May 2012

136. Compiling GIMP 2.8 on Debian Wheezy/Testing

EDIT 14/12/2012: To use an ugly approach to running gimp 2.8 on debian stable/squeeze, look here:
It ain't pretty...

EDIT 27/05/2012: GIMP 2.8 is now in the debian testing repos.

GIMP 2.8 is out -- and it's got the fabled single-window mode: http://www.phoronix.com/scan.php?page=news_item&px=MTA5NjA

First you need to install babl >=0.1.10, and gegl-0.2 >= 0.2.0,  then you can compile and install GIMP 2.8. The versions of babel and gegl in the debian testing/wheezy repos are too old, so you will need to compile tboth babel and gegl yourself -- luckily it is very easy to do so (see below).

Building with python script support needed a ton of packages (it requires PyGTK which depends on pygobject which depends on glib and gobject-introspection etc.), so here I passed --disable-python during build. It just means you can't script gimp with python. No python.

As always, I only spot what packages are missing on my system. If you find that other packages are missing, let me know in the comment section and I'll expand the post. At a minimum, you will need build-essential

LMDE MINT USERS: it seems like you need to add a single line to your /etc/ld.so.conf file:
Then do
sudo ldconfig 

ldconfig is in the package libc-bin

Both babl and gegl are gimp specific, so not giving install prefixes is probably ok. Just don't try to uninstall the pre-existing versions or gnome will disappear on you. See here http://forums.linuxmint.com/viewtopic.php?f=190&t=101253 for more LMDE discussions. See here http://cloudplasma.co.uk/2012/05/gimp-2-8-on-linux-mint-debian-edition/ for a compile based on this post.

0. sudo apt-get install build-essential libatk1.0-dev libfontconfig1-dev libcairo2-dev libgudev-1.0-0 libdbus-1-dev libdbus-glib-1-dev liblcms1-dev libexif-dev libxfixes-dev libgtk2.0-dev python2.7-dev libtiff4-dev libpango1.0-dev

1. babl 0.1.10
wget ftp://ftp.gtk.org/pub/babl/0.1/babl-0.1.10.tar.bz2
tar xvf babl-0.1.10.tar.bz2
cd babl-0.1.10/
sudo make install

2. gegl 0.2.0
sudo apt-get install libglib2.0-dev zlib1g-dev
wget ftp://ftp.gtk.org/pub/gegl/0.2/gegl-0.2.0.tar.bz2
tar xvf gegl-0.2.0.tar.bz2 
cd gegl-0.2.0/
sudo make install

3. gimp 2.8.0
sudo apt-get install intltool
wget ftp://ftp.gimp.org/pub/gimp/v2.8/gimp-2.8.0.tar.bz2
tar xvf gimp-2.8.0.tar.bz2 
cd gimp-2.8.0/
./configure --prefix=/home/me/.gimp --disable-python
make install

3. ~/.bashrc
Chuck the following in your ~/.bashrc
alias gimp28='/home/me/.gimp/bin/gimp-2.8'
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

and source it. (source ~/.bashrc)

Start from the terminal using


You can turn on single-window mode, by going to Windows and checking Single-Window Mode.

Edit: posted the how-to above eight hours ago, and already linked to by Debian-facile :-)

Links to this post:


  1. I followed the above and received the following errors:

    configure: error: Package requirements (gegl-0.2 >= 0.2.0) were not met:

    No package 'gegl-0.2' found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you may set the environment variables GEGL_CFLAGS
    and GEGL_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

    Are you able to help with any insights into my problem? I'm running the newest LMDE release. Thanks.

    1. I presume that you did the compilation of gegl as shown above without any modifications.

      Try doing
      export LDFLAGS="-L/usr/local/lib/gegl-0.2"
      before doing configure for gimp

      You can also look up the 'proper' arguments:
      pkg-config gegl-0.2 --libs

      which returns

      -Wl,--export-dynamic -pthread -L/usr/local/lib -lgegl-0.2 -lgmodule-2.0 -lrt -lgio-2.0 -lbabl-0.1 -lm -lgobject-2.0 -lglib-2.0

    2. On second thought, just do
      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
      before you do configure for gimp, and you SHOULD be ok.

    3. Mark,
      I just did the install on a fresh system and didn't need to pass any LDFLAGS before. LD_LIBRARY_PATH should only be necessary for running, not compiling.

      I'm using regular debian, not LMDE, so check what your /etc/ld.so.conf looks like:
      cat /etc/ld.so.conf
      include /etc/ld.so.conf.d/*.conf

      The gegl libs end up in /usr/local/lib so you need to make that a standard location for ld to look.
      Hope it works out!

    4. Yep, adding that line to that file did the trick for me.
      Thanks a lot, I'm off to try that revolutionary normal one-window layout. Those floating toolbars were a nightmare, I'm ecstatic!

  2. I followed the instructions but still received the following error:

    checking for TIFFFlushData in -ltiff34... no
    configure: error:
    *** Checks for TIFF libary failed. You can build without it by passing
    *** --without-libtiff to configure but you won't be able to use TIFFs then.

    After a bit of research, I installed: libtiff4-dev to address the tiff problem. The ./configure command then functioned as did both make & make install.

    I followed those with a handy exec bash after those changes were made and Voila!

    Thank you VERY MUCH!

  3. this has been very helpful. struggled with compiling gimp a couple of times.
    i'm using lmde and had to do a
    apt-get install intltool
    in addition to the steps above (unless i missed it).
    thanks for your effort.

  4. Will this be ok on Debian Stable (squeeze)?

    1. Hard to tell since it will depend on the required versions of different packages. I think the quickest way of finding out is simply trying it -- it won't affect your system or currently installed versions of gimp if you use --prefix as shown above.
      If you look in configure.ac you can see the required packages and versions -- it's up to you to compare it with what you have on your system:
      # required versions of other packages
      m4_define([babl_required_version], [0.1.10])
      m4_define([gegl_required_version], [0.2.0])
      m4_define([glib_required_version], [2.30.2])
      m4_define([atk_required_version], [2.2.0])
      m4_define([gtk_required_version], [2.24.10])
      m4_define([gdk_pixbuf_required_version], [2.24.1])
      m4_define([cairo_required_version], [1.10.2])
      m4_define([cairo_pdf_required_version], [1.10.2])
      m4_define([pangocairo_required_version], [1.29.4])
      m4_define([fontconfig_required_version], [2.2.0])
      m4_define([gtkdoc_required_version], [1.0])
      m4_define([webkit_required_version], [1.6.1])
      m4_define([alsa_required_version], [1.0.0])
      m4_define([rsvg_required_version], [2.36.0])
      m4_define([wmf_required_version], [0.2.8])
      m4_define([pygtk_required_version], [2.10.4])
      m4_define([poppler_required_version], [0.12.4])
      m4_define([libcurl_required_version], [7.15.1])
      m4_define([dbus_glib_required_version], [0.70])
      m4_define([libgudev_required_version], [167])
      m4_define([exif_required_version], [0.6.15])
      m4_define([lcms_required_version], [1.16])
      m4_define([libpng_required_version], [1.2.37])

  5. thanks a lot, worked perfectly..


  6. Hi, when i ./configure gegl2.0
    I got this error:
    checking for GLIB - version >= 2.28.0...
    *** 'pkg-config --modversion glib-2.0' returned 2.28.8, but GLIB (2.24.2)
    *** was found! If pkg-config was correct, then it is best
    *** to remove the old version of GLib. You may also be able to fix the error
    *** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
    *** /etc/ld.so.conf. Make sure you have run ldconfig if that is
    *** required on your system.
    *** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
    *** to point to the correct configuration files

    how do it change the verison of glib?

    1. What distro are you using? Debian Testing? LMDE? Debian Stable?

      What does
      aptitude show libglib2.0-0|grep Version
      yield vs
      pkg-config --modversion glib-2.0
      What do you get from
      echo $LD_LIBRARY_PATH
      and what is the content of your /etc/ld.so.conf?

      Finally, have you done a major (dist-) upgrade without rebooting since it was done?

    2. I had the same problem just now, and would like to know how to go about it. So, here are the answers on behalf of the original inquirer:

      aptitude show libglib2.0-0|grep Version yields Version: 2.24.2-1
      pkg-config --modversion glib-2.0 yields 2.28.8
      echo $LD_LIBRARY_PATH --> [nothing]
      cat /etc/ld.so.conf --> include /etc/ld.so.conf.d/*.conf

      No, I have not done a major distro upgrade without rebooting.

      Look forward to your reply :)

    3. Jo,
      it does seem strange that aptitude shows that you have version 2.24.2 while pkg-config shows 2.28.8.

      First a bit of diagnostics:
      You can try
      ls -l /lib/x86_64-linux-gnu/libglib-2.0.so.0
      You should get something like this:
      /lib/x86_64-linux-gnu/libglib-2.0.so.0 -> libglib-2.0.so.0.3200.4
      which in this case shows that it is version 2.32.4

      Have you compiled and installed your own libglib?

      Anyway, it seems that you may be using debian squeeze (http://packages.debian.org/squeeze/libglib2.0-0)

      * You could pull in gimp 2.8 from the testing repositories (people don't recommend it, but it need not be a problem) -- you can look at e.g. http://verahill.blogspot.com.au/2011/12/apt-pinning-in-debian-simple-example.html

      * If you want to continue the compile-route, you will most likely need to compile glib yourself, and while most of the dependencies in squeeze are ok for version 2.32.4, you will need to compile a newer version of libpcre3 (>=8.10).

      I'm curious as to how you have version 2.28.8 though?

    4. Sorry, if it wasn't readily obvious :(

      Yes, I compiled the libglib 2.28.8 on debian squeeze without uninstalling the 2.24.2 deb version that came with the distro.
      The reason I did that was because I was a little rushy in quickly having gimp 2.8, and tried to fulfill gegl 0.2.0's requisite of libglib <= 2.8.

      But I have now uninstalled the 2.8.8 version (make uninstall) just to be on the safe side of not having two versions of the same application.

      As for ls -l /lib/x86_64-linux-gnu/libglib-2.0.so.0, here is the output:
      ===> ls: cannot access /lib/x86_64-linux-gnu/libglib-2.0.so.0: No such file or directory

      Ok, I'll give the testing package a shot and report back.

    5. I tried installing the testing version by downloading 3 packages: gimp, gimp-data and gimp-data-extras. I didn't want to go through the pinning method yet as you suggested because I wanted to see how many dependencies this testing version would bring up. And here are the output lines:

      root@jh-it-notebook-001:/home/jo/apps-non_repositories/debs/gimp# ll
      total 16804
      -rw-r--r-- 1 jo jo 4241660 Nov 28 04:06 gimp_2.8.2-1_amd64.deb
      -rw-r--r-- 1 jo jo 8262894 Nov 28 04:07 gimp-data_2.8.2-1_all.deb
      -rw-r--r-- 1 jo jo 4697882 Nov 28 04:08 gimp-data-extras_2.0.1-3_all.deb
      root@jh-it-notebook-001:/home/jo/apps-non_repositories/debs/gimp# dpkg -i gimp*
      Selecting previously deselected package gimp.
      (Reading database ... 264446 files and directories currently installed.)
      Unpacking gimp (from gimp_2.8.2-1_amd64.deb) ...
      Selecting previously deselected package gimp-data.
      Unpacking gimp-data (from gimp-data_2.8.2-1_all.deb) ...
      Selecting previously deselected package gimp-data-extras.
      Unpacking gimp-data-extras (from gimp-data-extras_2.0.1-3_all.deb) ...
      dpkg: dependency problems prevent configuration of gimp:
      gimp depends on libgimp2.0 (>= 2.8.2); however:
      Version of libgimp2.0 on system is 2.6.10-1+squeeze3.
      gimp depends on libbabl-0.1-0 (>= 0.1.10); however:
      Package libbabl-0.1-0 is not installed.
      gimp depends on libcairo2 (>= 1.10.2); however:
      Version of libcairo2 on system is 1.8.10-6.
      gimp depends on libfontconfig1 (>= 2.9.0); however:
      Version of libfontconfig1 on system is 2.8.0-2.1.
      gimp depends on libgdk-pixbuf2.0-0 (>= 2.22.0); however:
      Package libgdk-pixbuf2.0-0 is not installed.
      gimp depends on libgegl-0.2-0 (>= 0.2.0); however:
      Package libgegl-0.2-0 is not installed.
      gimp depends on libglib2.0-0 (>= 2.31.8); however:
      Version of libglib2.0-0 on system is 2.24.2-1.
      gimp depends on libgs9 (>= 8.61.dfsg.1); however:
      Package libgs9 is not installed.
      gimp depends on libgtk2.0-0 (>= 2.24.10); however:
      Version of libgtk2.0-0 on system is 2.20.1-2.
      gimp depends on libjavascriptcoregtk-1.0-0 (>= 1.5.1); however:
      Package libjavascriptcoregtk-1.0-0 is not installed.
      gimp depends on libjpeg8 (>= 8c); however:
      Version of libjpeg8 on system is 8b-1.
      gimp depends on libpango1.0-0 (>= 1.29.4); however:
      Version of libpango1.0-0 on system is 1.28.3-1+squeeze2.
      gimp depends on libpoppler-glib8 (>= 0.18); however:
      Package libpoppler-glib8 is not installed.
      gimp depends on libtiff4 (>> 3.9.5-3~); however:
      Version of libtiff4 on system is 3.9.4-5+squeeze7.
      gimp depends on libwebkitgtk-1.0-0 (>= 1.3.10); however:
      Package libwebkitgtk-1.0-0 is not installed.
      gimp depends on python (>= 2.6.6-7~); however:
      Version of python on system is 2.6.6-3+squeeze7.
      gimp depends on python2.7; however:
      Package python2.7 is not installed.
      dpkg: error processing gimp (--install):
      dependency problems - leaving unconfigured
      Setting up gimp-data (2.8.2-1) ...
      Installing new version of config file /etc/gimp/2.0/menurc ...
      Installing new version of config file /etc/gimp/2.0/sessionrc ...
      Installing new version of config file /etc/gimp/2.0/gtkrc ...
      Installing new version of config file /etc/gimp/2.0/gimprc ...
      Setting up gimp-data-extras (1:2.0.1-3) ...
      Processing triggers for desktop-file-utils ...
      Processing triggers for gnome-menus ...
      Processing triggers for menu ...
      Processing triggers for man-db ...
      Processing triggers for hicolor-icon-theme ...
      Errors were encountered while processing:

      As you can see, there's quite a bit of dependencies there, and they're keeping my adventurous inclination in check. For example, the libglib2 it requires is now 2.31.8! And I haven't check the dependencies of those dependencies...

    6. Jo,
      looks like pulling in the testing version could potentially cause quite a bit of headach -- and it really isn't worth it since gimp 2.8 isn't that much of a step up from the previous version (being forced to export rather than save your files is annoying).

      But you obviously managed to compile libglib 2.24.2 -- try compiling libglib but while specifying a prefix e.g.
      ./configure --prefix=$HOME/.libglib2.24.2

      You might then be able to point gimp towards using that instead of the debian version.
      You will also want to read this post first: http://www.linuxquestions.org/questions/linux-software-2/2-different-versions-of-glib-and-pkgconfig-225006/

      Libglib is probably the first in a list of packages you'll have to do this with though.

      Another idea would possibly be to compile a statically linked gimp on wheezy and build a package from that, which then MIGHT be installable on squeeze. I can't walk you through that though.

    7. The one feature that I want to have from gimp 2.8 is the ability to save pic as a pdf file. But reading your reply and its tone, I guess I'll let patience take the helm and wait for upgrade in the stable version.

      You meant version 2.28.8? That's the version that I compiled from source (which I downloaded from gtk.org). The 2.24.2 version was installed automatically by apt-get. Okay, I'll read the article and see if I will be in the mood of directing gimp to read the compiled libglib. But I won't be in a hurry anymore :)

      Thanks for the other idea of compiling a statically linked gimp. Currently, I haven't a clue on that method, so I'll be a beginner in reading up the know-hows.

    8. Jo,
      You're right - I meant version 2.28.

      As for a temporary measure you might use inkscape to save as .pdf. The new gimp looks nice, but it's not that different. Again, the main difference is that you're forced to export rather than save as soon as you want anything other than gimp's native format, and of course the single window mode option.

      Statically linked might be as simple as doing
      ./configure --enable-static
      I haven't tried that though. Do
      ./configure --help|less
      to see what options are available.

    9. Okay, thanks for the tips. And thank you for your prompt replies!

      You really take care of your blogs, well, at least this article...

      I'll post comments if I do any of the tips you've suggested.

    10. I've tried just about any conceivable approach to compiling gimp 2.8 on Squeeze, and I have yet to find an easy way to do it. I first tried building every single package from scratch, but that ballooned out of control. I then tried just compiling the minimum and I got stuck on building a dev package (couldn't get the deps to recognise the compiled version as a replacement for the -dev package and the -bin package), and then finally tried building it statically linked under testing, then using it in stable -- but most packages were still dynamically linked.

      I think the conclusion is that it's not really worth it. If you are desperately needing gimp 2.8, use a chrooted environment or a virtual machine.

    11. Yeah, I had that kind of vision when I checked the first layer of dependencies... :)
      But a huge thanks anyway for making some deeper efforts into looking for a breakthrough...

    12. Hi Jo,
      Here's the gimp/chroot post by the way: http://verahill.blogspot.com.au/2012/12/running-gimp-28-in-chroot-on-debian.html

      Wheezy will be stable soon enough though.