1 得到grpc源码
git clone
cd grpc
# 切换到 Release 1.11.0 的版本号:
git reset --hard bd44e48
# 获取 third_party/ 下的依赖包的源码
git submodule update --init
2 编译Protobuff
1 修过grpc\third_party\protobuf\autogen.sh
# Check that gmock is present. Usually it is already there since the
# directory is set up as an SVN external.
#if test ! -e gmock; then
# echo "Google Mock not present. Fetching gmock-1.7.0 from the web..."
# curl $curlopts -L -O
# unzip -q release-1.7.0.zip
# rm release-1.7.0.zip
# mv googlemock-release-1.7.0 gmock
#fi
#if test ! -e gmock/gtest; then
# curl $curlopts -L -O
# unzip -q release-1.7.0.zip
# rm release-1.7.0.zip
# mv googletest-release-1.7.0 gmock/gtest
#fi
原因是如果gmock,在线需要VPN,我没有,我就下载
gmock-1.7.0到Protobuff下 grpc\third_party\protobuf\gmock
2../autogen.sh
3../configure
4.make && make check && sudo make install && sudo ldconfig
这里有个错误,gmock没有Makefile,cd gmock-->./configure,重新编译
阅读(4288) | 评论(0) | 转发(0) |