Libtool version mismatch error

When creating my application with kdevelop 3.5 on Ubuntu 10.04, I get the following errors:

libtool: Version mismatch error. This is libtool 2.2.6 Debian-2.2.6a-4, 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.2.6 Debian-2.2.6a-4 libtool: and run autoconf again. make[2]: *** [wktools4] Error 63 make[2]: Target `all' not remade because of errors. make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 *** Exited with status: 2 *** 

Where can I get the right version of libtool or how can I recreate aclocal.m4?

+65
autotools libtool
Jun 22 '10 at 20:42
source share
9 answers

Try to run

 autoreconf --force --install ./configure make 

in the root directory of your project.

If this does not work, try running make maintainer-clean , and then go to step 1.

If this still does not work, run make maintainer-clean , and then delete each 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.

Why it works: libtool and aclocal.m4 are both files that are generated by your build system. If they are not synchronized (generated by different versions of the build tools), you will get this error. Usually this should not happen, but an example of something that might cause this is that you are checking the generated files for the original control.

What is this solution is to delete and restore all auto-generated files. Once they are erased and restored, they can no longer sync.

+121
Jul 08 2018-10-10T00:
source share

Try

 autoreconf -i 

The -i option is important.

+10
Jan 09 '11 at 3:00 p.m.
source share

If you use Anaconda, then this may be due to libtool and autoconf from different sources. You can verify this by doing

which libtool

which autoconf

My libtool was from conda, and autoconf was a system package. Uninstalled autoconf and installed it again using conda

apt remove -y autoconf (Ubuntu / Debian)

conda install -c anaconda autoconf

Note: you may need to install automake too.

conda install -c anaconda automake

+6
Apr 12 '18 at 5:23
source share

You may have installed two different versions of libtools. Try apt-get remove all (until you get nothing when you type which libtool at the command line), then apt-get install one you like.

+3
Mar 21 '12 at 8:26
source share

Try running aclocal

+1
Jun 22 2018-10-22T00:
source share

I solve this uninstalling the system libtool and installing from the upstream: git clone git: //git.savannah.gnu.org/libtool.git

  sudo apt-get install texinfo autoconf automake make
 ./bootstrap
 ./configure
 make
 sudo make install 
0
Dec 12 '12 at 10:47
source share

None of this has been done.

Then it worked:

 autoconf -f ./configure make 
0
Dec 20 '15 at 2:23
source share

None of the above worked. After I deactivated the conda environment, it worked:

source deactivate

0
Mar 03 '18 at 20:19
source share

I also run into this problem. In my case, the output. /autogen.sh is:

libtoolize: You must add the contents of the following files to 'aclocal.m4': libtoolize: '/aclocal/libtool.m4' libtoolize: '/aclocal/ltoptions.m4' libtoolize: '/aclocal/ltversion.m4' libtoolize: Try adding " AC_CONFIG_MACRO_DIRS ([m4]) "in the configure.ac file, libtoolize: and re-run libtoolize and aclocal. libtoolize: consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

I just add the contents of the three * .m4 files to / aclocal / in the aclocal.m4 file:

 cat <a path>/aclocal/libtool.m4 <a path>/aclocal/ltoptions.m4 <a path>/aclocal/ltversion.m4 >> aclocal.m4 

then do it.

0
May 9 '19 at 17:54
source share



All Articles