gccopen-sourceautotoolslibtool

Libtool Version mismatch error while building gcc


I am trying to add some files to GCC source code, but after running autoreconf --install --force i get that error

libtool: definition of this LT_INIT comes from libtool 2.2.7a.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6 Debian-2.4.6-14
libtool: and run autoconf again.

even without any source files added if i reconfigure i get the same error.

that's very important as i am adding new functionality to gcc


Solution

  • Using autoreconf --install --force instead of just autoreconf is a bit questionable in this case, but maybe it's for the best. I am surprised that it did not take care of aclocal.m4 for you automatically, but that's a generated file. If everything else is ok then you ought to be able to simply delete the current aclocal.m4 and run autoreconf to generate a new one.

    If you have an autom4te.cache subdirectory then it would probably be best to delete that first (it will be regenerated by autoreconf, too).