GIMP 2.9.x On Debian Stretch/Sid

A new page is ready for compiling on Buster/Sid.

Update 6th September 2017 – IT WORKS AGAIN!! Couple of fixes and now works for Stretch and Buster/Sid too. This page will no longer be updated, I’ll carry on with a Buster/Sid Page soon.

Update 5th September 2017 – IT DOESN’T WORK!!  Help!  A few upstream changes and the method below doesn’t work now. I need to update it, but haven’t done so yet. 2.9.6 has now been released and I’d really like to compile it. Any help greatly appreciated.

Update 7th July 2016 – some libraries have changed name now and libmypaint doesn’t use SCONS to build.

I compiled GIMP for my Debian Stretch/Sid. When I originally did this – for Debian Jessie, I used an openly licensed document, therefore this document may be distributed by the same license as the original CC Attribution-Share Alike 3.0 Unported.

At time of writing 2.9.x is actually GIMP 2.9.5. Now with MyPaint brushes, as demonstrated by the inept scribblings below (first ever time using them, and I didn’t use my Wacom Tablet {excuses}).

gimp 2.9.3

What to do under DEBIAN

Open a terminal window and copy line for line int the window. Press RETURN and watch. The block with all the packages are one line, the “\” tells the system to ignore the line break, so you can copy and paste it in one chunk into your terminal.

Prepare the environment

cd
 export PREFIX=`echo ~/gimp`
 export PATH=$PREFIX/bin:$PATH
 export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig

Install needed packages

Become superuser, update your system, install, go back to normal user.

su -

 apt-get update
 apt-get upgrade
 apt-get install libtool automake autoconf git-core gettext \
 libglib2.0-0 libglib2.0-dev libgtk2.0-0 libgtk2.0-dev ruby \
 intltool libtiff5 libtiff5-dev python-dev python-gtk2-dev \
 libexif-dev libmng-dev liblcms2-dev libxpm-dev librsvg2-dev \
 libwmf-dev libasound2-dev valac xsltproc openexr libexif-dev \
 libexif12 libgexiv2-dev libbz2-dev gtk-doc-tools \
 libjson-glib-dev libjson-c-dev build-essential

 exit

There are also some optional packages to help with dependencies:

su -

 apt-get install libaa1-dev libwebkitgtk-dev \
 libjavascriptcoregtk-1.0-dev libopenexr-dev \
 libgs-dev libpoppler-glib-dev \
 python-cairo-dev 

 exit

Don’t worry about these for a basic compile though. This should be the last time you need to become root to complete the process. You may also install one more library if you wish libjasper-dev, but you’ll have to get it from Debian Sid. See  https://packages.debian.org/sid/libjasper-dev.

Get the source

It’s now necessary to fix libmypaint at version 1.3.0

mkdir gimp-build
 cd gimp-build
 git clone git://git.gnome.org/babl
 git clone git://git.gnome.org/gegl
 git clone https://github.com/mypaint/libmypaint
 cd libmypaint
 git checkout v1.3.0
 cd ../
 git clone git://git.gnome.org/gimp

Generate the make files, compile and install

In the autogen lines a lot of checks are done – watch for warnings and error messages!

cd babl
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../gegl
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../libmypaint
 ./autogen.sh --prefix=$PREFIX
 ./configure --prefix=$PREFIX --enable-gegl
 make
 make install

cd ../gimp
 ./autogen.sh --prefix=$PREFIX --disable-gtk-doc
 make
 make install

This gets you gimp-2.9 in the directory ~/gimp/bin . If you have error try to add any missing package and try again. Post a comment on this post if you like.

Keeping GIMP up to date

Don’t delete the source directory. Backup your directory with the working GIMP 2.9. The update can break everything in there…..

You can update easily with:

cd
 export PREFIX=`echo ~/gimp`
 export PATH=$PREFIX/bin:$PATH
 export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig

cd gimp-build

cd babl
 git clean -f
 git pull --rebase
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../gegl
 git clean -f
 git pull --rebase
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../libmypaint
 git clean -f
 git pull --rebase https://github.com/mypaint/libmypaint v1.3.0
 ./autogen.sh --prefix=$PREFIX
 ./configure --prefix=$PREFIX --enable-gegl
 make
 make install

cd ../gimp 
 git clean -f 
 git pull --rebase
 ./autogen.sh --prefix=$PREFIX
 make
 make install

This is fast, because only new and changed stuff is pulled from the servers and compiled.

So that’s it! Enjoy the full range of bit depths and MyPaint brushes, and all the other new work in progress features of the new GIMP.

 

GIMP 2.9.x On Debian Jessie/Sid

NOTE: I’m not going to maintain this post any more (18th April 2016). Now Stretch is the current testing, I’m putting up a new page for the build there. Recent versions of GIMP from git need libmypaint, which adds an extra dependency. Please see this new article for compiling on Stretch.

I compiled GIMP for my Debian Jessie/Sid install last night. I used this marvellous document but there were a couple of errors, so I’m adding this update here. This means that this document is distributed by the same license as the original CC Attribution-Share Alike 3.0 Unported.

At time of writing 2.9.x is actually GIMP 2.9.1

What to do under DEBIAN

Open a terminal window and copy line for line int the window. Press RETURN and watch. The block with all the packages are one line, the “\” tells the system to ignore the line break, so you can copy and paste it in one chunk into your terminal.

Prepare the environment

cd
 export PREFIX=`echo ~/gimp`
 export PATH=$PREFIX/bin:$PATH
 export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig

Install needed packages

Become superuser, update your system, install, go back to normal user.

su -

 apt-get update
 apt-get upgrade
 apt-get install libtool automake autoconf git-core gettext \
 libglib2.0-0 libglib2.0-dev libgtk2.0-0 libgtk2.0-dev ruby \
 intltool libtiff5 libtiff5-dev python-dev python-gtk2-dev \
 libexif-dev libmng-dev liblcms1-dev libxpm-dev librsvg2-dev \
 libwmf-dev libasound2-dev valac xsltproc openexr libexif-dev \
 libexif12 libgexiv2-dev libbz2-dev gtk-doc-tools \
 libjson-glib-dev

 exit

There are also some optional packages to help with dependencies:

su -

 apt-get install libaa1-dev  libwebkit-dev libopenexr-dev \
 libjasper-dev libgs-dev libpoppler-glib-dev

 exit

Don’t worry about these for a basic compile though. This should be the last time you need to become root to complete the process.

Get the source

mkdir gimp-build
 cd gimp-build
 git clone git://git.gnome.org/babl
 git clone git://git.gnome.org/gegl
 git clone git://git.gnome.org/gimp

Generate the make files, compile and install

In the autogen lines a lot of checks are done – watch for warnings and error messages!

cd babl
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../gegl
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../gimp
 ./autogen.sh --prefix=$PREFIX --disable-gtk-doc
 make
 make install

This gets you gimp-2.9 in the directory ~/gimp/bin . If you have error try to add any missing package and try again. Post a comment on this post if you like.

Keeping GIMP up to date

Don’t delete the source directory. Backup your directory with the working GIMP 2.9. The update can break everything in there…..

You can update easily with:

cd
 export PREFIX=`echo ~/gimp`
 export PATH=$PREFIX/bin:$PATH
 export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig

cd gimp-build

cd babl
 git clean -f
 git pull --rebase
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../gegl
 git clean -f
 git pull --rebase
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../gimp
 git clean -f
 git pull --rebase
 ./autogen.sh --prefix=$PREFIX
 make
 make install

This is fast, because only new and changed stuff is pulled from the servers and compiled.

So that’s it! Enjoy the full range of bit depths, and all the other new work in progress features of the new GIMP.

 

A Portrait of my WEEE

Waste Electrical and Electronic Equipment – WEEE. There’s lots of it around, 50 milion tonnes each year are produced worldwide. Crikey.

If you do have some, and frankly who doesn’t, DO NOT leave it in the street or put it in your domestic rubbish, take it to a dump. Lead, cadmium, beryllium, and brominated flame retardants are the most famously toxic components, there are plenty of other nasties in there. Seriously, this stuff needs to get to the right place.

Enough of generalities…

I took my years WEEE to dump, it looked like this. This doesn’t include a computer I got rid of by another (safe) channel:

WEEE aren't good

Every time I take this stuff to a place where I say my final goodbyes, I think about how much of this stuff ends up wrongly in landfill, and if it does get to a recycling centre, how dangerous and risky recovering the elements from it is, and how the worst of that is done by the poor of India. So, I owe it to the world to at least have a good think about the mess I’ve made, and just what a mess it is.

‘ow bad iz ‘er?

Let’s get our hands dirty, and have a rummage around in my WEEE. Waite a minute, what’s that Pirates of the Carribean pen doing in there? The red one top middle, see it? First stop on our mini-tour:

Pirate Pen

What could be so wrong with a novelty pen that it needs special disposal? A lot frankly. The top of the pen contained an LED light, some batteries to power it and a contact switch, which when you write with it means the skull on top glow. This means that if you write with it in low light, a wobbly red dagger chomping skull jiggles about in a very distracting manner, making it a fairly useless writing implement. Anyhow, batteries, an LED, the odd wire and a contact block possibly containing the following elements:

  • Gallium
  • Arsenic
  • Lithium
  • Iron
  • Nickel
  • Tin
  • Copper
  • Indium
  • Calcium
  • Phosphorus
  • other stuff I’ve forgotten or don’t know about

This is only a probable list as I can’t really tell which particular process of LED or battery manufacture was used. There might have been a smidgen of lead in the solder too, but I’m hoping not, I hoping so hard I didn’t put it onto the list. Despite all the nasties in LEDs, they don’t really leak out, as they’re in a tidy plastic package. Check out the groovey spider diagram on page 10 of this report about the life cycle impact of LED lights.

So it might look like a “nah just throw it in the bin, how much harm can it do?”. People, take it to the dump.

Last stop:

A compact flourescent light

Remember when these were the choice only of the rich eco-obsessed? What where peoples excuses to not use them even though they were cheaper in the long term even when fairly expensive? Here’s some I recall:

  • “They give a dull light” – well they weren’t instant in the early bulbs, taking an hour to reach near full brightness, even now you have to pay more for ones that reach full brightness quicker.
  • “They take so much energy to turn them on its not worth it” – thankfully non-sense.
  • “They contain mercury, so are more dangerous environmentally that normal bulbs” – there’s some truth in that, but it still didn’t make them worse than the short lived incandescent bulbs.

Enough of my luminscence reminiscences. I’m not buying any more of them now, I’ve about three more to use and then its LED from then on. The ignitions contain:

  • Mercury (about 5mg)

Bulb electronics contain:

  • Iron
  • Nickel
  • Tin

The glass contains:

  • Silicon
  • Sodium
  • Oxygen
  • Calcium
  • and other bits

The phosphor contains:

  • Phosphorus (oh really?)
  • Zinc
  • Yttrium
  • Other fun stuff, but non with names as entertaining at Yttrium

Definitely not beryllium, cadmium, or thallium which have long been given the elbow from flourescent light production.

And that’s the end of the tour… please make your way to the local dump on your exit, and take some of our WEEE with you.

What have I learnt?

  • Getting precise ingredients for stuff is fairly impossible without in depth research. Unless its designed to be eaten in which case its obsessively documented.
  • There are lot of ingredients in WEEE.
  • Many of them are toxic.
  • This stuff really really really needs to go to a place where its treated with the fear and respect it deserves.
  • Don’t buy throw away plastic stuff with electronics in it.
  • The ingredients in our waste do seem to be getting gradually better.