baidu / sofa-pbrpc

A light-weight RPC implement of google protobuf RPC framework.
Other
2.13k stars 655 forks source link

Some problems of build guide in the wiki #151

Closed demiaowu closed 7 years ago

demiaowu commented 7 years ago

Hi, folks: When I try to build sofa-pbrpc for testing I have found some problems in the building.

Problem1: Since the googlecode.com have been shutdown, there are some dead links in the build guide(wiki中的构建指引). Suggesting update the download link for protobuf, googletest and snappy. The latest links as follows: Protobuf 2.4.1 : https://github.com/google/protobuf/releases/download/v2.4.1/protobuf-2.4.1.tar.gz googletest-1.7.0 : https://github.com/google/googletest/archive/release-1.7.0.tar.gz Snappy 1.1.3 : https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz Note that the snappy only reserved 1.1.3 in the official repository.

Problem 2: An error has occurred while I make and install protobuf-2.4.1. My gcc version is "gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12)". The error infromation as follows : google/protobuf/compiler/command_line_interface.cc:913:78: error: no matching function for call to ‘make_pair(std::cxx11::string&, std::cxx11::string&)’ protopath.push_back(make_pair<string, string>(virtual_path, disk_path));

Solutions Considering that the template types can be implicitly deduced from the arguments passed to make_pair [1]. we suggest replace "protopath.push_back(make_pair<string, string>(virtual_path, disk_path));" to "protopath.push_back(make_pair(virtual_path, disk_path));" for google/protobuf/compiler/command_line_interface.cc :913:78 [2].

   If possible, hope you add it as notes in the wiki. Thanks.

References: [1]. http://www.cplusplus.com/reference/utility/make_pair/ [2]. http://protobuf.narkive.com/k5b4gxGM/issue-388-in-protobuf-patch-of-protobuf-src-google-protobuf-compiler-command-line-interface-cc

Best regards

qinzuoyan commented 7 years ago

Good catch, thanks for your issue. I have fix the README and wiki according to your suggestion.

demiaowu commented 7 years ago

:-)