KoblentsBlog Photography
Contact About
Ches
Libtool mismatch error in compiling openocd 0.8.0
So, a fun problem. Compiling openocd 0.8.0, using libtool 2.4.2 in /usr/bin/libtool. On some machines, this worked fine. On others, even though as far as I could tell my tools were identical, not so much. (Fedora 20, on both machines; the problematic one was a VM.)
The error looked like this.
1234
libtool: Version mismatch error. This is libtool 2.4 [snip], but the
libtool: definition of this LT_INIT comes from libtool 2.4.2.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4 [snip]
libtool: and run autoconf again.
As you might imagine, this was fairly infuriating. For one thing, why was there an issue at all? Turns out that openocd 0.8.0
configure
creates a local copy of libtool 2.4, but somewhere, somehow, autoconf pollutes setup files (aclocal.m4) with references to 2.4.2, the system's version. Why this didn't happen or didn't matter on an almost identical machine escapes me entirely.
Rather than fixing it at the source (in openocd source), especially since I was using the release and not the latest code from github (meaning this may already have been fixed), I found a nice workaround.
From stack overflow, someone suggested to run the following in the root directory of the project.
123
autoreconf --force --install
./configure
make
Well, after I added the right parameters to configure, this actually worked, but that wasn't enough. I already had a working version on my main machine, trying to get it set up in the VM, using the automated toolchain building process. So I needed to fix it in the toolchain build process. The quick and dirty way I ended up doing this was by editing the makefile. Previously:
123456
# Makefile pseudocode
make target directory;
copy source directory to target directory;
configure --options;
make all;
make install;
New:
12345678
# Makefile pseudocode
make target directory;
copy source directory to target directory;
# Added this line!
autoreconf --force --install;
configure --options;
make all;
make install;
Ches Koblents
January 31, 2015
 
« Newer Older »
© Copyright Koblents.com, 2012-2024