Sign up now! · Forgot password?
RSS/Atom feed identi.ca Twitter

Tutorial: Compiling GIMP 2.8-RC1 for Ubuntu 12.04

Written by · Created on Apr 21, 2011, last updated over 1 year ago CC BY-NC License
Compiling GIMP 2.8-RC1 for Ubuntu 12.04

Motivation

GIMP 2.8-RC1 didn't make it into Ubuntu 12.04 yet, so if you want to use it, you will have to compile it yourself or use a PPA repository. This tutorial illustrates how to compile GIMP yourself.

Tutorial details

  1. 1

    This tutorial shows you how to compile GIMP 2.8-RC1 on Ubuntu Linux 12.04 (Precise Pangolin). However, you can use it for other GIMP/Linux versions too, because I’ll try to explain how to do it, and not to just tell you the necessary commands so you can compile it but don’t know what you’re doing.

    If a step doesn’t work as expected or there are required additional steps, please modify the procedure on your own and maybe leave a comment to inform other users about your findings.

    If there are newer versions available as the ones in the tutorial (for instance, for babl or GEGL), use the newer versions.

  2. 2

    First, create a temporary directory where the sources are put into:

    mkdir -p ~/tmp/gimp
    cd ~/tmp/gimp
  3. 3

    Then, fetch the source code of the GIMP version you want to compile and put it into the directory.

    So, either download the GIMP 2.8-RC1 sources and extract it. Open a console window and type:

    cd ~/tmp/gimp
    wget ftp://ftp.gimp.org/pub/gimp/v2.8/gimp-2.8.0-RC1.tar.bz2
    tar -xjf gimp-2.8.0-RC1.tar.bz2

    Alternatively, fetch the latest sources with git (make sure git is installed – install with sudo apt-get install git): Open a console window and type:

    cd ~/tmp
    git clone git://git.gnome.org/gimp
  4. 4

    We want to install GIMP into a special directory (/opt/gimp-2.8) so that it doesn’t interfere with the system’s GIMP package. To accomplish that, open a console window (if you didn’t do already) and type:

    export PATH=/opt/gimp-2.8/bin:$PATH
    export PKG_CONFIG_PATH=/opt/gimp-2.8/lib/pkgconfig
    export LD_LIBRARY_PATH=/opt/gimp-2.8/lib

    The PATH is a list of directories where binaries are looked for, PKG_CONFIG_PATH allows the pkg-config tool to recognize libraries compiled in our GIMP-2.8 directory and LD_LIBRARY_PATH allows shared objects to be located in some custom path.

    Please note that these exports are only stored for this session (= console window). If you close it and open another one later, you will have to type these lines again (or put it into .bashrc).

    If you compile only for your machine (i.e., you don’t want to run the compiled binary on other machines), you can also do

    export CFLAGS="-march=native -O3" 

    It allows the C compiler to use all instructions your processor supports and will optimize the compiled code for greatest performance.

  5. 5

    Now we have the GIMP source ready. Before the next step, install all development dependencies that the system-packaged GIMP requires. The chances for GIMP 2.8 needing these libraries is high and so we don’t need to install everything by hand:

    sudo apt-get build-dep gimp

    This will probably install a bunch of packages, so be patient.

  6. 6

    Now lets’s try to ./configure the source:

    If you downloaded the tarball (.tar.bz2):

    cd ~/tmp/gimp/gimp-2.8.0-RC1
    ./configure --prefix=/opt/gimp-2.8

    Or if you fetched the sources from git:

    cd ~/tmp/gimp/gimp
    ./autogen.sh --prefix=/opt/gimp-2.8
  7. 7

    The configuration fails saying that babl >= 0.1.10 is required but not found. So we have a look on the babl webpage. There is no tarball for >= 0.1.10 so we fetch the source via git:

    cd ~/tmp/gimp
    git clone git://git.gnome.org/babl

    babl-configure throws an error if libtool is missing, so install it using sudo apt-get install libtool. Then:

    cd babl
    ./autogen.sh --prefix=/opt/gimp-2.8
    make -j5
    sudo make install -j5

    The -j argument controls how many processes are created simultaneously. Use number of CPU cores + 1 — for instance, if you have 4 CPU cores, use -j5. This makes compiling faster, but not the resulting binary, of course.

  8. 8

    Now let’s try to compile GIMP again:

    cd ~/tmp/gimp/gimp-2.8.0-RC1
    ./configure --prefix=/opt/gimp-2.8

    Now there’s another error: “Package requirements (gegl >= 0.1.6) were not met.”

    As you may have guessed — now it’s required to go to the GEGL webpage and download the latest GEGL version:

    cd ~/tmp/gimp
    wget ftp://ftp.gimp.org/pub/gegl/0.2/gegl-0.2.0.tar.bz2
    tar -xjf gegl-0.2.0.tar.bz2
    cd gegl-0.2.0
    ./configure --prefix=/opt/gimp-2.8

    Now check the output of the configuration script. It tells you which libraries are found and used. If you need some features that have not been configured now, install the necessary libraries and run the ./configure script again.

    Finally, compile with: make -j5 && sudo make install -j5

  9. 10

    Time for trying to compile GIMP again:

    cd ~/tmp/gimp/gimp-2.8.0-RC1
    ./configure --prefix=/opt/gimp-2.8

    Watch the output again. If there are libraries missing or if you want to enable additional features, install the required libraries (compiling should not be required for these libs, they are available as -dev package) ./configure again until everything is OK.

    GIMP is now configured and ready to compile.

  10. 11

    Compile GIMP (takes some time, depending on your machine) and install it:

    make -j5
    make install -j5
  11. 12

    GIMP should have been installed to /opt/gimp-2.8 now. Now, run it with /opt/gimp-2.8/bin/gimp-2.8

  12. 13

    … check Window / Single-window-mode and it’s ready to use :)

Comments

Post your own comments, questions or hints here. The author and other users will see your posting and can reply to it.

Of course, you can also ask in the chat.

Subscription management

Please log in to manage your subscriptions.

User rating

This topic (Compiling GIMP 2.8-RC1 for Ubuntu 12.04) has been rated 4.0/5.0.

*

As a registered user, you can rate articles and comments, attach files to comments, subscribe to topics and you don't need to solve CAPTCHAs anymore.

*…optional

drucifer82
15 days ago

Nothing past step 5 works for me.

VulcanHades member for 2 months VulcanHades 2 comments
2 months ago

Awful and outdated tutorial. Running these scripts only return errors. I have followed every step and downloaded everything. It says it can't connect to the various sites and can't find the directories. And some commands keep looping despite failing.

This is useless for the average user. All I see is a nerd masturbating and forcing people to make mistakes then force them to correct what they've done. Trying to explain how it works doesn't mean anything if it doesn't even work and the process is too complicated and not straight forward enough.

Martyn
8 months ago

Thanks - excellent tut.

Me
9 months ago

> … check Window / Single-window-mode and it’s ready to use :)

No thanks, the original UI rocks! :)
For the rest, it's a nice how-to.

thank you

Daniel H.
over 1 year ago

This is a nice explanation of the processes involved, however it glosses over the requirements and/or show-stoppers an unwary user may encounter.

For example, if a user is using a version of GNOME which is too old (for example RHEL 6.x) then far more dependencies will have to be called in and compiled. Additionally, you won't be able to integrate it with the running instance of the GNOME desktop because of the different versions of of the same libraries running. So if foreign language input is required in a GiMP project, the only way to accomplish this is to type the string(s) into another application, then copy-paste the strings into GiMP.

It can be done, but it all takes a whole lot more work than is indicated in the tutorial above and the use of the application is not quite as easy either.

Rukiri
over 1 year ago

This is a great walkthrough, personally use git for all babl, gegl, and gimp because they are reliant on one another. So it's best to be up to date.

pietro909
over 1 year ago

Really, really thank you man! I wouldn't leave my 12.04 to have Gimp2.8 and thank to your tutorial I'm working on my brand new gimp :)
Thank you a lot.

madhanprasath
over 1 year ago

i want to know how to compile GIMP 2.8-RC1 on windows , pls tell me the steps to followed ..,

flogimp member for over 4 years flogimp 2 comments rated this topic with 4/5
almost 2 years ago

Hi

openSuse 11.4

Thanks for your tutorial. I followed your instructions and got all dependencies installed.
But when I run configure for gimp it complains about the wrong glib.
=== START
checking for GLIB - version >= 2.30.2... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: Test for GLIB failed. See the file 'INSTALL' for help.
=== END

What would be the best and/or quickest solution ? I would love to get the Gimp running but hesitate to change my Linux Version since everything else I need works perfectly.

Anonymous
almost 2 years ago

Tried this with te latest development version (2.9.1)
IT WORKS !! thanks
But this version works slowwwwly.
Any idea ?

MKirsch
almost 2 years ago

Hi,

I tried to follow the Tutorial but first, when i did the export cflags thing, this terminal was no longer able to compile. C compiler canot creat executable.
Then, when i updated babl as shown, and tried to compile again, ive got the same error that babl isnt right version and not the gegl one so i cannot get behind that step. Any advices?

Palehorse
almost 2 years ago

I have been in IT for 10 years, and am 50 y/o MIT grad. I STILL would not dream of encouraging a layman to compile. You simple don't know what damage you can do, or even what the numbers mean. I shudder when I hear folks suggest PPAs too... BUT if linux is unimportant to you, a hobby on an old comp, hey have fun. But do expect to screw up. tip: clonezilla

David
almost 2 years ago

Thanks very much for the ride!
Worked perfectly fine for me on Kubuntu 12.04 (x64)

@ erroneus: All commands used are well known stadard. If you feel unsecure about what is beeing done feel free to google "man " for explanations. You're welcome =)

kir0ul
about 2 years ago

The only thing was that it couldn't create some directories so I used "sudo make install -j5" at step 11, and it worked fine for me, thanks!

erroneus member for about 2 years erroneus 2 comments rated this topic with 3/5
about 2 years ago

I would like to see one for CentOS/RHEL.

What seems to be missing from this tutorial is an explanation of what is being done and why in many cases... you know, like "why use this option?" or what does it mean?

GiMP really needs to be more independant of the OS than it is in the case of Linux. GiMP started with Linux and somehow it's the hardest to get installed for anything but the bleeding edge distros? Some of use use GiMP for productivity you know.

blacktoon member for almost 4 years blacktoon 1 comment
about 2 years ago

Its impossible to compile Gimp 2.8 using this tut. If you not a IT Expert you can compile gimp only by hazard and luck...this tut is for nothing...gimpuser wiki is for nothing...buying a book, forget it.

Gimp must be supported by Big Bill, I suggest, it's absolutly daunting using Gimp on Linux, it's seems more stupid than all the windows shit together. Poor world.

Muhammad Ifthikhar, Kannur, Mathamangalam
about 2 years ago

Thank you.
Enjoyed each steps.
Thank you...

suluke
about 2 years ago

For me, on Ubuntu 12.04 x64 gegl complained about missing glib and recommended building it from source. I could skip this by running
sudo apt-get install libglib2.0-dev

AC2
about 2 years ago

To compile and use Gimp 2.8 on Ubuntu Lucid 10.04 have a look at this:

http://ubuntuforums.org/showthread.php?p=11946325

FATj2112 member for about 2 years FATj2112 3 comments
about 2 years ago

Thanks for the tip,Linux is a no go for Me,I run windows 7.
I'm just a bit suprised that everything didn't come in one package with 2.8,I'm new at this & I really don't want to screw up my computer,I just want to learn how to create cool stuff!

quacero
about 2 years ago

thanks for this work, it's work fine on my Ubuntu 12.04.

redforce member for almost 8 years redforce 228 comments
about 2 years ago

It's not *that* difficult. You're just not used to it because your distributor manages the packages for you. So if you don't want to dive into the details of compiling, you may just use an unofficial package or wait for the next release of your favourite Linux distribution. It will contain GIMP 2.8 for sure. For instance, Fedora 17 RC already comes with GIMP 2.8.

FATj2112 member for about 2 years FATj2112 3 comments
about 2 years ago

Why is this so difficult! I'm not an "I.T."!
This just confuses & frustrates Me!

tobyreme member for about 2 years tobyreme 1 comment
about 2 years ago

Compiling in Ubuntu 11.04
In Step 7, I downloaded babl soucre, but on trying to compile I received error msgs about a mismatch in the version number expected and the version number installed of libtool.
Running 'autoreconfig --force' fixed the error.
In Step 8, ditto.
I found this solution here:
http://askubuntu.com/questions/56937/babl-recreate-aclocal-m4-with-macros-from-libtool-2-4
Thanks
tobyreme

redgimp member for over 4 years redgimp 2 comments
about 2 years ago

Thank you morpheeze, you got me past step 5. I am currently working on step 8, trying to find missing libraries.

ceas member for over 2 years ceas 2 comments
about 2 years ago

line 4925: syntax error near unexpected token `2.2
line 4925: `LT_PREREQ(2.2)'

in step 7
how to deal with this

morpheeze
about 2 years ago

Enable Source Code in Software Sources for Step 5. Don't forget to sudo apt-get update before. After that Step 5 works.

redgimp member for over 4 years redgimp 2 comments rated this topic with 5/5
about 2 years ago

In step 5, sudo apt-get build-dep gimp, I get the error message:
Unable to find a source package for gimp. Can anyone indicate how to resolve this? I assume that the previous steps installed the necessary packages. Is Dexter Filmore's comment an indication of what to do?

spartan2276 member for over 3 years spartan2276 9 comments rated this topic with 5/5
about 2 years ago

Yeah but no...Here is a PPA for Ubuntu 12.04 and I think for 11.04 and 11.10.

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update && sudo apt-get install gimp

Gaz
about 2 years ago

all OK up to step 5 - Os-x SL does not know the apt-get command, I get "sudo: apt-get: command not found"
so now I'm scuppered as you don't have the option to follow a os-x tut and no alternative is mentioned I guess I just have to wait for full versions (binaries) to come out for mac.
not what I'd call a release!!

Passer
about 2 years ago

unfortunatelly the following error appears while configuring gimp: configure: error: Package requirements (atk >= 2.2.0) were not met:

Requested 'atk >= 2.2.0' but version of Atk is 2.0.0

Dexter Filmore
about 2 years ago

On Ubuntu 11.10 I had to compile prexed to the gimp-2.8 dir:
babl
gdk-pixbuf
gegl
glib
gtk
pango

and install
automake-1.11
intltool
gtk-doc-tools
python-gtk2-dev

before the compile finally went through.

Some static test builds every once in a while would be nice.

Jarno
over 2 years ago

tried the PPA, and when i launched gimp, it said package manager managed to install wrong versions of gegl and babl.. so i installed 2.6.12 :/

mailinator
over 2 years ago

@Jarno: Except when it doesn't work ;) For instance, if you have a HP laptop:
https://bugzilla.gnome.org/show_bug.cgi?id=673387

There are problems, advantages and disadvantages on every platform. I think there will never be a computer where "everything works".

But if you don't want to compile yourself, you can use a repo like
https://launchpad.net/~otto-kesselgulasch/+archive/gimp/
(Click on "Technical details about this PPA" for installation instructions, it's really easy.)

Jarno
over 2 years ago

these are one of the moments i want to delete linux and install windows.
no problems with debendencies, missing libraries, outdated packagemanager repositories. no downloading 3 additional libraries or compiling sourcecode for hours... just 1 exe to double click and gimp is installed.

Kai
over 2 years ago

I had some troubles with step #7.
The gegl site lists getting gegl via git:
git clone git://git.gnome.org/gegl
and using
./autogen.sh --prefix=/opt/gimp-2.7
The wget version listed above did not. Hope it helps someone...

Olivier Pons
over 2 years ago

Hi,

Ubuntu 10.04:
I've installed everything, now I get this message when I try "./configure -prefix=/opt/gimp-2.7":

[...]
checking for CAIRO... yes
checking for PANGOCAIRO... no
configure: error: Test for PangoCairo failed.
- We require Pango with the optional support for Cairo compiled in.
- See the file 'INSTALL' for more help.

What is strange is that if i do a :

find /opt/gimp-2.7 | grep cairo

there are a lot of files AND there IS this file:

/opt/gimp-2.7/lib/libpangocairo-1.0.so

So gimp should be able to compile, right???
The compile error is on the line 17008 in the compile file.

Any idea how to compile pango with the optional support for Cairo?

ebvienna
over 2 years ago

checking for GLIB - version >= 2.30.2... no

mamboze
over 2 years ago

Hi,

Would this compilation run on Ubuntu 10.04. I've had a look thru the tutorial and there doesn't seem to be anything that is specifically 11.04 but I might be wrong.

BillyG member for over 2 years BillyG 1 comment rated this topic with 3/5
over 2 years ago

I have been attempting to compile GIMP version 2.7.4 with the instructions given in this article. After many adventures, made necessary by the far greater number of missing libraries, the configure script came down to the Python headers and then refused to compile because it could not find the Python 2.6 headers. I have looked. My Python headers are in /usr/python2.6. How do I proceed from here?

DzaDze member for over 2 years DzaDze 1 comment rated this topic with 4/5
over 2 years ago

Mine error:

checking for GLIB - version >= 2.30.2... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: Test for GLIB failed. See the file 'INSTALL' for help.

What to do now ?

Peter
over 2 years ago

brilliant! one window at last! thanks!

serge
almost 3 years ago

Hi
I need also install plugin save for web. How i can do this?

Georgiy S
almost 3 years ago

Thank you. I spent hours on this with 2.7.3, but it was worth it.

ill
almost 3 years ago

this is the first time i try to compile something.
i could fix some error by realizing, that i have to correct the syntax in some cases (typographic " ", dashes etc.), but now i got stucked here:
:~/tmp/gimp$ ./autogen.sh --prefix=/opt/gimp-2.7
bash: ./autogen.sh: Datei oder Verzeichnis nicht gefunden

what did i do wrong?

SpEcIeS member for almost 6 years SpEcIeS 133 comments
about 3 years ago

@billn: There is a PPA for gimp 2.7.2. But if you use it, you cannot install 2.7.2 beside 2.6. It will replace 2.6.

Just open a terminal and type:
sudo add-apt-repository ppa:matthaeus123/mrw-gimp-svn && sudo apt-get update && sudo apt-get-install gimp

billn
about 3 years ago

Will someone convert Gimp 2.7+ to a deb package so idiots like me can use it? I hope someone can help me...

Bryce
about 3 years ago

There are bugs filed against Ubuntu to update babl and gegl. See: https://launchpad.net/ubuntu/+source/babl

BN
about 3 years ago

Can you supply a solution to?

WARNING: aclocal's directory is /usr/share/aclocal, but...
no file /usr/share/aclocal/gtk-2.0.m4
You may see fatal macro warnings below.
If these files are installed in /some/dir, set the
ACLOCAL_FLAGS environment variable to "-I /some/dir"
or install /usr/share/aclocal/gtk-2.0.m4.

configure.ac:497: warning: macro `AM_PATH_GTK_2_0' not found in library

Bryce
about 3 years ago

Thanks SO MUCH. Though I think given how easy git is to install, you should rewrite to use git only. Then you'll have all the configure vs. autogen.sh issues worked out also.

BN
about 3 years ago

Stuck at:

configure.ac:509: error: possibly undefined macro: AM_PATH_GTK_2_0
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.

Erasme
about 3 years ago

Hi and thank you redforce.
It worked perfectly.
I just didn't do export CFLAGS="-march=native". It made the configuration fail.

akovia member for over 5 years akovia 1 comment rated this topic with 4/5
about 3 years ago

Got stuck at making babl:
Version mismatch error. This is libtool 2.4 Debian-2.4-2, but the
definition of this LT_INIT comes from libtool 2.2.6b.
You should recreate aclocal.m4 with macros from libtool 2.4 Debian-2.4-2
and run autoconf again.

I was about to go look for an updated version of libtool, but after reading comments about copying over all the themes, icons, and GTK, and other additional packages I'm not so sure anymore. My drive is getting a little low on space and not sure it's worth it anymore.

I would recommend cleaning up the additional information from the comments and adding it to the guide as a footnote. Thanks anyway though. I may revisit this again once I free up some space or can't wait any longer for some single window gimpness.

SpEcIeS member for almost 6 years SpEcIeS 133 comments
about 3 years ago

Addition: Since you use a different version of gtk+ for gimp 2.7.2, gimp will look awful. You need to copy the engines from /usr/lib/gtk-2.0/2.10.0/engines to /opt/gimp-2.7/lib/gtk-2.0/2.10.0/engines, the theme you are using from /usr/share/themes to /opt/gimp-2.7/share/themes and the icon theme your are using from /usr/share/icons to /opt/gimp-2.7/share/icons.

SpEcIeS member for almost 6 years SpEcIeS 133 comments
about 3 years ago

I'm compiling on 10.10 at the moment. I need newer versions of: glib, gtk+, gdk_pixbuf, cairo, pixman (for cairo).
You can get these packages with:
wget http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.22/gdk-pixbuf-2.22.1.tar.bz2
git clone git://anongit.freedesktop.org/git/cairo
git clone git://anongit.freedesktop.org/git/pixman.git
(see Granner's comment for glib and gtk+)

redforce member for almost 8 years redforce 228 comments
about 3 years ago

I think for Ubuntu 10.10, you need glib and maybe gdk_pixbuf

Granner member for over 6 years Granner 21 comments rated this topic with 4/5
about 3 years ago

I also miss the right glib

Just do it with wget (version number is 2.28.3:
Go back to your /tmp/gimp/ folder.
cd ~/tmp/gimp/
wget http://ftp.gnome.org/pub/GNOME/sources/glib/2.28/glib-2.28.1.tar.bz2

then

tar -xjf glib-2.28.1.tar.bz2

Switch too:
cd ./glib-2.28.1
./configure -prefix=/opt/gimp-2.7.2
make -j3
--> that in my case i think you will use make -j5 or whatever
sudo make install

Afterwards you will see that you havn't the right GTK+ version. If so do the follow:
Go back to tmp/gimp folder again:
cd ~/tmp/gimp/
wget http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.24/gtk+-2.24.3.tar.bz2

Then:
tar -xjf gtk+-2.24.3
and:
cd ./gtk+-2.24.3
./configure -prefix=/opt/gimp-2.7.2
make -j3
sudo make install

--> you see it is really easy and just try and error thing... godawful ...

MC-Photography member for over 4 years MC-Photography 2 comments
over 3 years ago

Some comments:

You can use --disable-gtk-doc with autogen if you don't have or want "gtk-doc".

In step 6, you need to go to the babl-directory and run the "autogen" script, followed by "make" to install babl.

But I failed at missing or not finding Glib. So I need to work on that now first.