BABL: Recreate aclocal.m4 with macros from libtool 2.4

I am trying to install the development version gimp2.7.2 on my Ubuntu 11.04 box.I was following these instructions for the same.I ran into an error at the step where I had to make babl.

sudo make
make  all-recursive
make[1]: Entering directory `/home/abc/gimp2.7/gimp-2.7.2/babl'
Making all in babl
make[2]: Entering directory `/home/abc/gimp2.7/gimp-2.7.2/babl/babl'
Making all in base
make[3]: Entering directory `/home/abc/gimp2.7/gimp-2.7.2/babl/babl/base'
  CC     babl-base.lo
libtool: Version mismatch error.  This is libtool 2.4 Debian-2.4-2, but the
libtool: definition of this LT_INIT comes from libtool 2.2.6b.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4 Debian-2.4-2
libtool: and run autoconf again.
make[3]: *** [babl-base.lo] Error 63
make[3]: Leaving directory `/home/abc/gimp2.7/gimp-2.7.2/babl/babl/base'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/abc/gimp2.7/gimp-2.7.2/babl/babl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/abc/gimp2.7/gimp-2.7.2/babl'
make: *** [all] Error 2

The error line is

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

How do I recreate aclocal.m4 with macros from libtool 2.4?


Solution 1:

Try running

autoreconf 
./configure
make

in the root directory of your project.

If that doesn't work, try running make maintainer-clean first and then go to step 1.

If that still doesn't work, run make maintainer-clean, then delete every generated file in the root directory of your project; including aclocal.m4, any m4 directory, any autom4te.cache directory, configure, Makefile.in, config.h, config.h.in, config.status, libtool, ltmain.sh, etc. Then go to step 1.

From user mspoerr over at our friends at Stackoverflow.

Solution 2:

In Gentoo this works:

$ phpize 
$ aclocal && libtoolize --force && autoreconf
$ ./configure bbbb#again

Might work in Ubuntu too.