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"
export XDG_DATA_DIRS="$PREFIX/share:$XDG_DATA_DIRS"
and then to get updated with the latest changes from the constantly moving code base you regularly do
git clone git://git.gnome.org/gimp
cd gimp
source $PREFIX/share/config.site
./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
source $PREFIX/share/config.site
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!

21 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?
I am using Ubuntu 10.10, I have downloaded and compiled Babl, GEGL and GIMP several times over the past week. GIMP will start and I can create a new file but none of the tools work.
I figure that it can't be THAT broken so the problem must be my end.
CCLD gimp-2.7
tools/libapptools.a(gimpcagetool.o): In function `gimp_cage_tool_compute_coef':
/home/ego/Gimpdev/gimp/app/tools/gimpcagetool.c:690: undefined reference to `babl_format_n'
gegl/libappgegl.a(gimpoperationcagecoefcalc.o): In function `gimp_operation_cage_coef_calc_process':
/home/ego/Gimpdev/gimp/app/gegl/gimpoperationcagecoefcalc.c:196: undefined reference to `babl_format_n'
gegl/libappgegl.a(gimpoperationcagecoefcalc.o): In function `gimp_operation_cage_coef_calc_prepare':
/home/ego/Gimpdev/gimp/app/gegl/gimpoperationcagecoefcalc.c:98: undefined reference to `babl_format_n'
gegl/libappgegl.a(gimpoperationcagetransform.o): In function `gimp_operation_cage_transform_init':
/home/ego/Gimpdev/gimp/app/gegl/gimpoperationcagetransform.c:127: undefined reference to `babl_format_n'
gegl/libappgegl.a(gimpoperationcagetransform.o): In function `gimp_cage_transform_compute_destination':
/home/ego/Gimpdev/gimp/app/gegl/gimpoperationcagetransform.c:493: undefined reference to `babl_format_n'
gegl/libappgegl.a(gimpoperationcagetransform.o):/home/ego/Gimpdev/gimp/app/gegl/gimpoperationcagetransform.c:199: more undefined references to `babl_format_n' follow
collect2: ld returned 1 exit status
Re "undefined reference to `babl_format_n'"
You need a git version of babl.
Do a 'git clone git://git.gnome.org/babl babl-git' and compile that first.
- Peder
just wanted to share my appreciation. new to GNOME development, this has saved me some headache :)
I got two problems :
aclocal-1.11: couldn't open directory `/home/simon/Informatique/softs/gimp-git/share/aclocal': Aucun fichier ou dossier de ce type
a simple mkdir fixed it, and the other :
configure.ac:443: warning: macro `AM_GLIB_GNU_GETTEXT' not found in library
configure.ac:468: warning: macro `AM_PATH_GLIB_2_0' not found in library
configure.ac:497: warning: macro `AM_PATH_GTK_2_0' not found in library
libtoolize: putting auxiliary files in `.'.
libtoolize: linking file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4macros'.
libtoolize: linking file `m4macros/libtool.m4'
libtoolize: linking file `m4macros/ltoptions.m4'
libtoolize: linking file `m4macros/ltsugar.m4'
libtoolize: linking file `m4macros/ltversion.m4'
libtoolize: linking file `m4macros/lt~obsolete.m4'
configure.ac:156: installing `./compile'
configure.ac:160: installing `./config.guess'
configure.ac:160: installing `./config.sub'
configure.ac:74: installing `./install-sh'
configure.ac:74: installing `./missing'
app/Makefile.am: installing `./depcomp'
plug-ins/pygimp/Makefile.am:119: installing `./py-compile'
configure.ac:451: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:480: error: possibly undefined macro: AM_PATH_GLIB_2_0
configure.ac:509: error: possibly undefined macro: AM_PATH_GTK_2_0
:-(
I am using Fedora 15, by the way, your post helped me for others softs ;) thank you
This comment has been removed by the author.
OK. Think I'm getting close. Just keep seeing this after trying to run the .autogen.sh line in the terminal:
aclocal-1.11: couldn't open directory `/home/jason/Development/Gimp/share/aclocal': No such file or directory
The folder "aclocal" is in the right place... any help?
1: continue expounding upon these bits for compile noobs
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:
2: need anything be changed to follow gimp 2.8.x?
3: what neeeds to be changed commandwise if one wishes to install into
/hooray
instead of mucking up one users home directory?
Post a Comment
Subscribe to Post Comments [Atom]
<< Home