Best way to keep up with GIMP from git
The more people that use the latest GIMP code from git the better. It keeps the required effort to contribute code upstreams small, which in turn increases the likelihood of upstream contributions, and it makes bugs more vulnerable to early discovery which minimizes their impact.
However, keeping up with GIMP from git means extra work compared to using prebuilt packages. Unless you know of an easy way you might not withstand it. What follows is a description of how I do it, which is almost effortless once setup. I assume you know how to install necessary dependencies (note you can use the method I describe for the key dependencies, including babl, GLib, GEGL and GTK+), what "the install prefix" means, and that you run Linux. The approach I use differs in two principal way compared to the many guides found on the net:
- I use autoconf's config.site feature instead of setting up environment variables manually
- I install in my home directory
$PREFIX/share/config.site where $PREFIX is in your home directory such as PREFIX=/home/martin/gimp-git, either manually or using this script:export PATH="$PREFIX/bin:$PATH"Then, assuming you have all the dependencies, you build GIMP the first time with:
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal $ACLOCAL_FLAGS"
git clone git://git.gnome.org/gimpand then to get updated with the latest changes from the constantly moving code base you regularly do
cd gimp
./autogen.sh --prefix=$PREFIX
make
make install
git pull --rebaseNote that the latter works without requiring any environment variables to be set since configure will source config.site. And because autogen.sh passes --enable-maintainer-mode to configure, it will also work when Makefile.am's or configure.ac are changed. In those rare occasions where things break, just run
make
make install
git clean -xdf which removes all non-version-controlled files so that you can start over from autogen.sh.The above approach works for as good as all GNOME projects, including GLib, babl, GEGL and GTK+. This makes it easy to adapt to GIMP's build requirements of these and other libraries even if your distro doesn't meet them. Let me know if you have problems!

13 Comments:
thanks a lot for this simple instruction. i wanted to try out GIMP source for a while, but put it off because i thought i'd have to get into the whole git-thing first.
my C++ skills are more than rusty so i doubt i'll be able to contribute anything soon, but i should be able to help with testing at least--and get an idea what you're really up to in the near future.
hmm, great. but hard for windows/osx noobs like me... hmm
hey cool! i like those tips
It would be nice if a Windows bleeding edge version was available. Then I could contribute info on features / bugs.
any news about the reselease of GIMP 2.8 ?
Please upload somewhere a test version for Gimp for Windows.
You make want to mention that you have to "git" babl and gegl as well as gimp if this is the first time compiling the 2.7.x code. Adding the -j option to make can also speed up compiling (i.e. make -j3 if you have a duo core machine or make -j5 for a quad core)
Thanks for all your work on gimp.
I run openSuSE 11.2 which has its own pre-compiled packages, and I've always updated from their download site. I am not sure how to follow the procedure you recommend. Should I uninstall Gimp and remove all traces, then build from scratch? Or what? I tend to like running on the bleeding edge of everything. Must be a character flaw, or something. You can tell me I'm just being frivolous, or an insane thrill-seeker. Just curious.
thanks for this easy guid. i love gimp 2.7 from now!!
Seems that there are quite a few new dependencies with the most recent builds. Any recommendations on the fastest way to meet those?
@John:
First "yum-builddep gimp gegl babl" or "apt-get build-dep gimp gegl babl" which will give you most build dependencies. Then "yum search" or "apt-cache search" or "yum provides" or "apt-file find" to find the last missing ones. And finally use the method described above for the rest.
$ git pull --rebase
fatal: Not a git repository (or any parent up to mount parent )
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
You need to be in the source dir. What is your working directory when you issue that command?
Post a Comment
Subscribe to Post Comments [Atom]
<< Home