Compiling Gimp 2.9.x on PCLinuxOS KDE4 2012.02

Update 01: AGIAutomatic Gimp Installer script added
Update 02: Reported problems with Gegl git repo – fix was almost immediate
Update 03: Added bison flex vala libspiro steps to the howto
Update 04: AGI updates – IT’S ALIVE!
Update 05: Gimp is in 2.8.0 RC1 version now
Update 06: Added AGI “transcript” and updated screenshots
Update 07: Reporting lock-ups in latest version
Update 08: Update command modified
Update 09: Lock-ups were caused by a forgotten 2 libs – my bad
Update 10: Howto modified to remove libbabl and libgegl that were causing the lock-ups
Update 11: AGI updates. Script should be working better now.
Update 12: Added link to the discussion on the PCLinuxOS Forum
Update 13: Added Liquid Rescale GIMP plugin usage example.
Update 14: Added libglade and PyGTK compilation steps to check if I can get rid of these warnings. I am sorry to say that it didn’t :).
Update 15: AGI updates.
Update 16: How to deal with segfault during the upgrades.
Update 17: How to add libglade and PyGTK for people who already compiled gimp using this HOWTO.
Update 18: Upgrade command modified to remove the compilation cache from /root/.ccache/ folder.
Update 19: Added steps to install UFRaw package in the howto and for people that already followed the howto.
Update 20: AGI updates.
Update 21: Edited UFRaw installation steps so it builds against liblensfun-devel package in the howto and for people that already followed the howto.
Update 22: AGI updates.
Update 23: Gimp 2.8 goes “stable at last!
Update 24: Added steps to upgrade libffi and changed glib to version 2.32.2 after gimp refused to compile against the older version.
Update 25: AGI updates.
Update 26: Added steps how to upgrade libffi and glib for people who already compiled gimp using this HOWTO.
Update 26: HOW-TO now installs Gimp in version 2.9.1.
Update 27: Dang Gimp-GAP is refusing to install against new gimp… First it throws missing header files, then when symlinks to headers are done it throws cryptic * All Error 2 * during make step. They are changing something in the git repo. Hopefully they will have usable version soon.
Update 28: I can see some work being done on Gimp-GAP. Upgrades in their GIT repo allowed to move bit further while compiling it. Soon it should be working fine again. I guess devs are making changes to make this package usable under Gimp 2.8 / 2.9. 😉 cool!
Update 29: Mitch – You are a hero. After I have reported problems with libraries Mitch has sorted it out in a matter of minutes. Gimp-GAP and Liquid rescale are building fine again. Thanks Mitch.

Hi all.

Quick word of warning aka disclaimer: This is a HOWTO for ADVANCED users. Following it is very simple – yes a lab monkey could follow it – it’s basically copy / paste / confirm kinda thing – BUT – PCLinuxOS forum and myself are not willing to support installations with out of repository packages installed. IF You know what You are doing – great – this HOWTO is for You. IF You have ANY doubts at all – don’t use this HOWTO. Following this HOWTO may render Your machine useless for a good few hours due to a simple fact – compiling is using A LOT of resources like CPU and RAM. Following this HOWTO can cause damage to Your hardware. If Your machine is not being properly maintained – it may overheat in process and may shutdown OR may be destroyed due to the heat damage made to CPU / motherboard. It’s Your responsibility to make sure that Your machine is properly cooled. I will take NO RESPONSIBILITY WHATSOEVER for Your damaged hardware. This HOWTO should be followed using a test system – not Your stable day to day production environment. There – You have been warned. And now let’s cut to the chase.

Sometime ago thanks to Rolf Steinort – owner of Meet The Gimp website I have successfully compiled the gimp 2.7.2 on my PCLinuxOS 2010 installation and decided to share it with everyone that needed it. That was in January 2011 as far as I remember.

Over a year has passed and Gimp went from 2.7.2 to 2.7.6 2.8.0 RC1 2.9.x version. PCLinuxOS is now in 2012.02 version. That’s a lot of time and a lot of changes. Today I will show You how to in the easiest possible way compile Gimp 2.7.6 2.8.0 RC1 2.9.x and then keep it updated on PCLinuxOS 2012.02 KDE4 however this HOWTO should (and probably will) work on other versions of PCLinuxOS 2012.02 too – try it if You want.

Sooo… Here goes nothing…

Gimp 2.9 in PCLinuxOS Single Window mode and confed to my liking...

Installation of the Gimp 2.7.6 2.8.0 RC1 2.9.x – latest UNSTABLE development version.- on Your PCLinuxOS 2012.02 ;)…

I will remind here that even tho the HOWTO is basically a copy / paste / press y or ENTER kinda thing – brain is needed when following this HOWTO. Its good for the brain to be in ON position too… 😉

Run these commands (ALL in one console window).

1. Become superuser:

su

followed by:

root's password

2. Fully upgrade the system:

apt-get update

apt-get dist-upgrade

Confirm the packages download and installation when asked by pressing y and punching ENTER.

3. Install needed packages:

apt-get install libtool automake automake1.7 autoconf git gettext
libglib2.0_0 libglib2.0_0-devel libgtk+2.0_0 libgtk+2.0_0-devel ruby
intltool libtiff3 libtiff-devel python-qt4-devel gettext-devel
libexif12-devel libmng-devel liblcms-devel libxpm-devel librsvg2-devel
libwmf0.2_7-devel libwebkitgtk1.0-devel libpoppler-devel libhal-devel
libaa-devel enscript liblua-devel libOpenEXR-devel libSDL-devel
libopenraw-devel libjasper1.701_1-devel libgraphviz-devel libffmpeg-devel
graphviz libexiv2-devel libumfpack-devel xsltproc gtk-doc gcc-c++ bison
pygtk2.0-devel libpoppler-glib-devel libopenjpeg-devel asciidoc flex
intltool gettext-devel pygtk2.0-devel python-cairo-devel libspeex1-devel
python-gobject-devel libfaad2-devel wavplay nasm libboost-devel glibc-debug
yasm libdirac-devel libgsm1-devel libnut-devel x264 x264-devel
x264-static-devel libgtkimageview-devel libgtkimageview0 liblensfun-devel

Confirm the packages download and installation when asked by pressing y and punching ENTER.

4. Fully upgrade the system yet again:

apt-get update

apt-get dist-upgrade

Confirm the packages download and installation when asked by pressing y and punching ENTER.

This is gonna download a LOAD of packages. I have added more then was originally posted in the Rolf’s HOWTO video at meetthegimp.org but thanks to this 99% of requirements are satisfied when running ./autogen.sh –prefix=$PREFIX step for babl, gegl, gimp and gap. Gimp is more stable and contains more features this way.

5. Remove packages that will cause problems:

apt-get remove libbabl0.1_0 libgegl0.1_0 gimp gimp-help

Confirm the packages removal when asked by pressing y and punching ENTER.

6. Prepare the folder where we will download and build all necessary components:

mkdir -p /opt/gimp-dev

cd /opt/gimp-dev/

7. Set the build options:

export PREFIX=`echo /usr/`

export PATH=$PREFIX/bin:$PATH

export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig

8. Download, extract, configure, build and install libffi:

wget -c ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz

tar xvzf ./libffi-3.0.11.tar.gz

rm -f ./libffi-3.0.11.tar.gz

cd ./libffi-3.0.11/

./configure --prefix=$PREFIX

make

make install

cd ..

9. Download, extract, configure, build and install glib:

wget -c http://ftp.gnome.org/pub/GNOME/sources/glib/2.32/glib-2.32.2.tar.xz

unxz ./glib-2.32.2.tar.xz

tar xvf ./glib-2.32.2.tar

rm -f ./glib-2.32.2.tar

cd ./glib-2.32.2

./autogen.sh --prefix=$PREFIX

make

make install

cd ..

10. Download, extract, configure, build and install pango:

wget -c http://ftp.gnome.org/pub/GNOME/sources/pango/1.29/pango-1.29.5.tar.xz

unxz ./pango-1.29.5.tar.xz

tar xvf ./pango-1.29.5.tar

rm -f ./pango-1.29.5.tar

cd ./pango-1.29.5

./autogen.sh --prefix=$PREFIX

make

make install

cd ..

11. Download, extract, configure, build and install gdk-pixbuf:

wget -c http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.25/gdk-pixbuf-2.25.2.tar.xz

unxz ./gdk-pixbuf-2.25.2.tar.xz

tar xvf ./gdk-pixbuf-2.25.2.tar

rm -f ./gdk-pixbuf-2.25.2.tar

cd ./gdk-pixbuf-2.25.2

./configure --prefix=$PREFIX

make

make install

cd ..

12. Download, extract, configure, build and install gtk+:

wget -c http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.24/gtk+-2.24.10.tar.xz

unxz ./gtk+-2.24.10.tar.xz

tar xvf ./gtk+-2.24.10.tar

rm -f ./gtk+-2.24.10.tar

cd ./gtk+-2.24.10

./configure --prefix=$PREFIX

make

make install

cd ..

13. Download, extract, configure, build and install atk:

wget -c http://ftp.gnome.org/pub/GNOME/sources/atk/2.3/atk-2.3.3.tar.xz

unxz ./atk-2.3.3.tar.xz

tar xvf ./atk-2.3.3.tar

rm -f ./atk-2.3.3.tar

cd ./atk-2.3.3

./configure --prefix=$PREFIX

make

make install

cd ..

14. Download, extract, configure, build and install vala:

wget -c ftp://ftp.gnome.org/pub/GNOME/sources/vala/0.9/vala-0.9.8.tar.bz2

tar -xvjf ./vala-0.9.8.tar.bz2

rm -f ./vala-0.9.8.tar.bz2

cd ./vala-0.9.8

./configure --prefix=$PREFIX

make

make install

cd ..

15. Download, extract, configure, build and install libspiro:

wget -c http://sourceforge.net/projects/libspiro/files/libspiro/20071029/libspiro_src-20071029.tar.bz2/download

tar -xvjf ./download

rm -f ./download

cd ./libspiro-20071029

./configure --prefix=$PREFIX

make

make install

cd ..

16. Download, extract, configure, build and install libglade:

wget -c http://ftp.gnome.org/pub/GNOME/sources/libglade/2.6/libglade-2.6.4.tar.gz

tar xvzf ./libglade-2.6.4.tar.gz

rm -f ./libglade-2.6.4.tar.gz

cd ./libglade-2.6.4

./configure --prefix=$PREFIX

make

make install

cd ..

17. Download, extract, configure, build and install PyGTK:

wget -c http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.gz

tar xvzf ./pygtk-2.24.0.tar.gz

rm -f ./pygtk-2.24.0.tar.gz

cd ./pygtk-2.24.0

./configure --prefix=$PREFIX

make

make install

cd ..

18. Clone the necessary repositories to Your hard drive:

A. Babl – about 800 kB

git clone git://git.gnome.org/babl

B. Gegl – about 26 MB

git clone git://git.gnome.org/gegl

C. Gimp – about 189 MB

git clone git://git.gnome.org/gimp

D. Gap – about 36 MB

git clone git://git.gnome.org/gimp-gap

Gimp Animation Package on Gimp 2.7.6

19. Configure, build and install clonned repositories:

cd babl

./autogen.sh --prefix=$PREFIX

make

make install

cd ../gegl

./autogen.sh --prefix=$PREFIX

make

make install

cd ../gimp

./autogen.sh --prefix=$PREFIX

make

make install

rm -f /usr/bin/gimp

ln -s /usr/bin/gimp-2.9 /usr/bin/gimp

cd ../gimp-gap

./autogen.sh --prefix=$PREFIX

make

make install

cd ..

There must be a nasty bug in Gimp-Gap – no matter what I have tried I could NOT compile it with x264 support. Installing x264, x264-devel, x264-static devel changed nothing BUT I will leave them on the install packages list due to a simple fact – future upgrades may fix gimp-gap and when You will be re-compiling it – the libraries will be there and the gap will compile with x264 support. I even compiled x264 library manually. I tried adding symlinks… Nothing. Zip. Nada. Big Bobkas. I wrote to the Dude that develops gimp-gap – hoping to get a reply and maybe fix it / amend this HOWTO in the future.

20. Download, extract, configure, build and install Liquid Rescale GIMP plugin:

Liquid Rescale GIMP plugin on Gimp 2.7.6

wget -c http://liblqr.wikidot.com/local--files/en:download-page/liblqr-1-0.4.1.tar.bz2

tar -xvjf ./liblqr-1-0.4.1.tar.bz2

rm -f ./liblqr-1-0.4.1.tar.bz2

cd ./liblqr-1-0.4.1

./autogen.sh --prefix=$PREFIX

make

make install

cd ..

Raw photo of Liberty Plaza in Lublin from Rsanti‘s site before Liquid Rescale GIMP plugin was used:

Raw photo from Rsanti's site - Lublin Liberty Plaza in Poland

wget -c http://liquidrescale.wikidot.com/local--files/en:download-page-sources/gimp-lqr-plugin-0.7.1.tar.bz2

tar -xvjf ./gimp-lqr-plugin-0.7.1.tar.bz2

rm -f ./gimp-lqr-plugin-0.7.1.tar.bz2

cd ./gimp-lqr-plugin-0.7.1

./autogen.sh --prefix=$PREFIX

make

make install

cd ..

Gimped photo of Liberty Plaza in Lublin from Rsanti‘s site after I have used Liquid Rescale GIMP plugin:

Gimped photo from Rsanti's site - Lublin Liberty Plaza in Poland

21. Download, extract, configure, build and install UFRaw Utility:

wget -c http://downloads.sourceforge.net/project/ufraw/ufraw/ufraw-0.18/ufraw-0.18.tar.gz

tar xvzf ./ufraw-0.18.tar.gz

rm -f ./ufraw-0.18.tar.gz

cd ./ufraw-0.18/

./autogen.sh --prefix=$PREFIX --with-gimp

./configure --prefix=$PREFIX --with-gimp

make

make install

cd ..

updatedb

ldconfig

exit

Start Your Gimp 2.7.6 2.8.0 RC1 2.9.x by issuing a command:

gimp

Splash Screen Gimp 2.7.6

First start of the Gimp 2.7.6 2.8.0 RC1 2.9.x may take a little while – configuration files and folders are being created and tools / themes / textures are being copied to your configuration folders. This is to be expected. Also some warnings / errors can show up in the terminal – these can be ignored. Program works fine. No reason to worry – just ignore them.

New Gimp looks very good here…

Gimp 2.7.6 Unstable Development Version Seems Pretty Stable On PCLinuxOS 2012.02 KDE4

Your KMenu entry should be waiting for You in the Graphics section:

Gimp 2.7.6 KMenu entry is added by default to the Graphics section

It will also be added to every single new user that You add to Your system.

Your new Gimp is also by default added as one of the programs associated with image files.

Gimp 2.7.6 is also added as one of the programs associated with image files

And I don’t think I have to mention that it’s added for all new users added to Your system too…

Don’t delete the /opt/gimp-dev/ directory.

Comparing to previous version (2.7.2) new Gimp is much more stable. Single window mode stays between the application restarts. Many bug fixes were applied. Many interesting UI changes were applied. I would say that Gimp 2.7.6 is almost ready to become the 2.8.0 RC… Edit: Gimp devs must be a mind readers :P… Gimp is now in 2.8.0 RC1 version…

Enabling Single Window on Gimp 2.7.6

Keeping GIMP up to date

Remember to upgrade Your PCLinuxOS installation at least twice a week using Synaptic.

You can update the gimp easily with 2 commands

su

followed by

root's password

rm -Rf /root/.ccache/ && cd /opt/gimp-dev/ && export PREFIX=`echo /usr/` && export PATH=$PREFIX/bin:$PATH && export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig && cd ./babl && git clean -xdf && git pull && git rebase && ./autogen.sh --prefix=$PREFIX && make && make install && cd ../gegl && git clean -xdf && git pull && git rebase && ./autogen.sh --prefix=$PREFIX && make && make install && cd ../gimp && git clean -xdf && git pull && git rebase && ./autogen.sh --prefix=$PREFIX && make && make install && cd ../gimp-gap && git clean -xdf && git pull && ./autogen.sh --prefix=$PREFIX && make && make install

This is faster (download-wise) than the original procedure, because only new and changed stuff from babl, gegl, gimp, gimp-gap git repo is pulled from the servers and then the whole thing gets re-compiled / installed.

EDIT: Sat, 24 Mar 2012 02:50.

For all those “lazy” ones – I wrote a script that should automatically download / compile / install Gimp 2.7.6 2.8.0 RC1 2.9.x on PCLinuxOS 2012.02 KDE4. Testing it while writing this – will let You know if it works in a few hours.

EDIT: Sun, 25 Mar 2012 05:27.

Script testing / updates continue. All seems to be on the right track – working.

All You need to do is open a terminal and run this command:

cd && wget -c http://andrzejl.cyryl.net/WoTW/WoTW_files/AutomatedGimpInstaller/AGI.txt && mv ./AGI.txt ./Install_Gimp.sh && chmod +x ./Install_Gimp.sh && su -c "/home/YourLogin/Install_Gimp.sh" && gimp

followed by:

root's password

Remember to replace YourLogin with Your actual login.

EDIT: Sun, 25 Mar 2012 12:42.

Here is how the script will look while it’s working.

And here is the final result screenshot.

AGI Finished Work

EDIT: Sat, 26 Mar 2012 20:17.

Discussion on the PCLinuxOS Forum can be found here.

EDIT: Sun, 15 Apr 2012 00:30.

SEGFAULT: After the latest upgrade which included:

wireshark-1.6.7-1pclos2012 Sat 14 Apr 2012 05:47:43 PM IST
drakx-net-0.87-12pclos2012 Sat 14 Apr 2012 05:47:38 PM IST
python-gobject-devel-2.28.6-2pclos2012 Sat 14 Apr 2012 05:47:36 PM IST
libglib2.0_0-devel-2.31.20-1pclos2012 Sat 14 Apr 2012 05:47:30 PM IST
glib-gettextize-2.31.20-1pclos2012 Sat 14 Apr 2012 05:47:27 PM IST
python-gobject-2.28.6-2pclos2012 Sat 14 Apr 2012 05:47:26 PM IST
drakx-net-text-0.87-12pclos2012 Sat 14 Apr 2012 05:47:25 PM IST
libdrakx-net-0.87-12pclos2012 Sat 14 Apr 2012 05:47:23 PM IST
libglib2.0_0-2.31.20-1pclos2012 Sat 14 Apr 2012 05:47:21 PM IST
glib2.0-common-2.31.20-1pclos2012 Sat 14 Apr 2012 05:47:18 PM IST

I was getting segmentation fault when running the GIMP upgrade command.

To fix this problem run this command:

su -c "cd /opt/gimp-dev/glib-2.31.20/ && make install"

followed by root’s password. Re-run the upgrade command when this is done. Let me know on the forum if this fixes the segmentation fault problems for You.

EDIT: Sun, 15 Apr 2012 00:50.

Adding libglade and PyGTK for people who have compiled gimp using this howto before:

It should be super simple.

Open terminal and go thru steps 1, 2, 6, 7, 16, 17 of my HOWTO and then run the GIMP upgrade command.

Let me know on the forum if this causes any problems for You or was it rather smooth.

EDIT: Wed, 18 Apr 2012 16:10.

Adding UFRaw for people who have compiled gimp using this howto before:

It should be super simple.

Open terminal and go thru steps 1, 2 and 6.

Now in the same terminal run command:

apt-get install libgtkimageview-devel libgtkimageview0 liblensfun-devel

and then in the same terminal follow steps 7 and 21 of my HOWTO and then run the GIMP upgrade command.

Let me know on the forum if this causes any problems for You or was it rather smooth.

EDIT: Thu, 3 May 2012 15:10.

Updating libffi and glib for people who have compiled gimp using this howto before:

It should be super simple IF You have been following all the other upgrades mentioned above so far (glib segfaults, libglade, PyGTK, UFRaw and so on).

Open terminal and gain root’s privileges by issuing

su

command followed by:

root's password

Now in the same terminal run command:

rm -Rf /root/.ccache/ && export PREFIX=`echo /usr/` && export PATH=$PREFIX/bin:$PATH && export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig && cd /opt/gimp-dev/glib-2.31.20 && make uninstall && rm -Rf /opt/gimp-dev/glib-2.31.20 && cd .. && wget -c ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz && tar xvzf ./libffi-3.0.11.tar.gz && rm -f ./libffi-3.0.11.tar.gz && cd ./libffi-3.0.11/ && ./configure --prefix=$PREFIX && make && make install && cd .. && wget -c http://ftp.gnome.org/pub/GNOME/sources/glib/2.32/glib-2.32.2.tar.xz && unxz ./glib-2.32.2.tar.xz && tar xvf ./glib-2.32.2.tar && rm -f ./glib-2.32.2.tar && cd ./glib-2.32.2 && ./autogen.sh --prefix=$PREFIX && make && make install && cd .. && cd ./pango-1.29.5 && make clean && ./autogen.sh --prefix=$PREFIX && make && make install && cd .. && cd ./gdk-pixbuf-2.25.2 && make clean && ./configure --prefix=$PREFIX && make && make install && cd .. && cd ./gtk+-2.24.10 && make clean && ./configure --prefix=$PREFIX && make && make install && cd .. && cd ./atk-2.3.3 && make clean && ./configure --prefix=$PREFIX && make && make install && cd .. && cd ./vala-0.9.8 && make clean && ./configure --prefix=$PREFIX && make && make install && cd .. && cd ./libspiro-20071029 && make clean && ./configure --prefix=$PREFIX && make && make install && cd .. && cd ./libglade-2.6.4 && make clean && ./configure --prefix=$PREFIX && make && make install && cd .. && cd ./pygtk-2.24.0 && make clean && ./configure --prefix=$PREFIX && make && make install && cd .. && cd ./liblqr-1-0.4.1 && make clean && ./autogen.sh --prefix=$PREFIX && make && make install && cd .. && cd ./gimp-lqr-plugin-0.7.1 && make clean && ./autogen.sh --prefix=$PREFIX && make && make install && cd .. && cd ./ufraw-0.18/ && make clean && ./autogen.sh --prefix=$PREFIX --with-gimp && ./configure --prefix=$PREFIX --with-gimp && make && make install && cd .. && updatedb && ldconfig && rm -Rf /root/.ccache/ && rm -f /usr/bin/gimp && ln -s /usr/bin/gimp-2.9 /usr/bin/gimp

and then in the same terminal run the GIMP upgrade command.

Let me know on the forum if this causes any problems for You or was it rather smooth.

Thanks for reading. May the source be with You.

Andy

AndrzejL

"Never meet Your heroes. Most of the time you'll only end up disappointed." White Polak Male Husband Employee Hetero Carnivorous Fugly Geek @$$hole with ADD Catholic “Some men just want to watch the world burn.”

Comments are closed.