protobuf 安装中问题的解决

解决办法: 把自带的gtest 1.4 换成1.5

安装的版本是2.6.4 我在服务器的centos上安装是没问题的。但是我在我的ubuntu系统上安装的时候,make check是不成功的。然后google了下,说是gtest的版本问题。见这个:https://code.google.com/p/protobuf/issues/detail?id=433。
然后我下载了个gtest 1.5编译安装,然后protobuf的make check也可以通过了。

报错的内容:


Making check in .
make[1]: Entering directory `/home/sisinc/Desktop/protobuf-2.4.1'
make  check-local
make[2]: Entering directory `/home/sisinc/Desktop/protobuf-2.4.1'
Making lib/libgtest.a lib/libgtest_main.a in gtest
make[3]: Entering directory `/home/sisinc/Desktop/protobuf-2.4.1/gtest'
depbase=`echo src/gtest.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/bash ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./build-aux  -I. -I./include   -g -DNDEBUG -MT src/gtest.lo -MD -MP -MF $depbase.Tpo -c -o src/gtest.lo src/gtest.cc &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./include -g -DNDEBUG -MT src/gtest.lo -MD -MP -MF src/.deps/gtest.Tpo -c src/gtest.cc  -fPIC -DPIC -o src/.libs/gtest.o
In file included from ./include/gtest/gtest-param-test.h:159:0,
                 from ./include/gtest/gtest.h:59,
                 from src/gtest.cc:34:
./include/gtest/internal/gtest-param-util-generated.h: In instantiation of ‘testing::internal::ValueArray2<T1, T2>::operator testing::internal::ParamGenerator<T>() const [with T = bool; T1 = bool; T2 = bool]’:
./include/gtest/gtest-param-test.h:1186:28:   required from here
./include/gtest/internal/gtest-param-util-generated.h:80:26: error: ‘ValuesIn’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from ./include/gtest/gtest.h:59:0,
                 from src/gtest.cc:34:
./include/gtest/gtest-param-test.h:288:58: note: ‘template<class Container> testing::internal::ParamGenerator<typename Container::value_type> testing::ValuesIn(const Container&)’ declared here, later in the translation unit
make[3]: *** [src/gtest.lo] Error 1
make[3]: Leaving directory `/home/sisinc/Desktop/protobuf-2.4.1/gtest'
make[2]: *** [check-local] Error 2
make[2]: Leaving directory `/home/sisinc/Desktop/protobuf-2.4.1'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/sisinc/Desktop/protobuf-2.4.1'

猜你喜欢

转载自huangyunbin.iteye.com/blog/1900366
今日推荐