Hi,
System : Arch
When? : While building from source
Command : make check
Error Log
make[3]: Entering directory '/home/rishabh/code/protobuf/third_party/googletest/googlemock'
depbase=`echo src/gmock-all.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I./build-aux -I./../googletest/include -I./include -pthread -DGTEST_HAS_PTHREAD=1 -g -std=c++11 -DNDEBUG -MT src/gmock-all.lo -MD -MP -MF $depbase.Tpo -c -o src/gmock-all.lo src/gmock-all.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: Version mismatch error. This is libtool 2.4.6, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.40-6ca5-dirty.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6
libtool: and run autoconf again.
make[3]: *** [Makefile:961: src/gmock-all.lo] Error 63
make[3]: Leaving directory '/home/rishabh/code/protobuf/third_party/googletest/googlemock'
make[2]: *** [Makefile:1968: check-local] Error 2
make[2]: Leaving directory '/home/rishabh/code/protobuf'
make[1]: *** [Makefile:1828: check-am] Error 2
make[1]: Leaving directory '/home/rishabh/code/protobuf'
make: *** [Makefile:1540: check-recursive] Error 1
I tried searching for a solution, but I don't know how to build aclocal.m4 since I could not find the path. Please let me know if any additional information is needed.
I tried autoreconf --force --install before ./configure but it didn't work either.
How do I proceed with the build? Need help.
It looks like that error is coming from the third_party/googletest/googlemock directory--could you try cding there and running autoreconf --force --install in that directory?
Didn't work. I cded and ran autoreconf --force --install
I'm attaching the files from each step.
autoreconf.log
configure.log
make.log
makecheck.log
What source are you building from? Is this from a source tarball or a checked-out Git repo?
I'm building this from the checked-out Git repo.
Could you try doing a fresh git clone and seeing if the build works after that? The reason I think that might help is that the answer to this StackOverflow question suggests that this error happens when certain generated files are built by different versions of the build tools. So perhaps you somehow ended up with a bad generated file like libtool or aclocal.m4 and starting fresh might help.
I tried the above solution and I'm still getting the same error.
I am bumping into the same question, after I have tried the methods online, I gave up getting the project through git and download the release version
then I can make check without any problem.
I hopes it can help u.
Hmm, if a fresh Git clone doesn't solve the problem then I'm not sure what else to try. That's good to hear that the release tarballs work at least. @rishacha If you're able to figure out a fix then let us know.
Same issue, building from a Git Clone doesn't work.
Using the release tarballs works fine.
Hi @rishacha @Zhangs7117 , I also met the issue when I compile protocbuf.
I read the answers you mentioned, try to download a released version protocbuf to compile.
However, it did't work, still display:
libtool: Version mismatch error. This is libtool 2.4.6, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.40-6ca5-dirty.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6
I tried to edit the libtool file(in /protocbuf/googletest/googlmock) in line 43
marco_version=2.4.2 ->replace with: marco_version=2.4.6
but afterter make command, it get back to marco_version=2.4.2.
Does anyone meet the similar issues? It will be appreciated if you have some suggestions.
Most helpful comment
I am bumping into the same question, after I have tried the methods online, I gave up getting the project through git and download the release version
then I can make check without any problem.
I hopes it can help u.