grpc
How to Installprotocol buffer
How to Install - You need version 3.0 of protoc to be able to generate code from the given proto files. - I would suggest the best place to install this version is from the grpc repository itself. (grpc/third_party/protobuf/
) - In the instructions for installing protoc 3.0,make check
might fail. continue installing even after that. If compilation works fine with this new protoc, all set for the project.- You need to be able to compile c++11 code on your Linux system
- [sudo] apt-get install build-essential autoconf libtool
- Create a new directory somewhere where you will pull code from github to install grpc and protobuf.
Then:
cd $this_new_dir
- git clone --recursive
-b $(curl -L http://grpc.io/release)
https://github.com/grpc/grpc - cd grpc/third_party/protobuf
- sudo apt-get install autoconf automake libtool curl make g++ unzip
- ./autogen.sh (it might fail, try further steps anyhow, might not create problems)
- ./configure
- sudo make
- make check (it might fail, try further steps anyhow, might not create problems)
- sudo make install
- sudo ldconfig
- cd ../../
- make
- sudo make install
Although you are going to submit your solution through t-square only, after the clone, we recommend creating a branch and developing your code on that branch:
git checkout -b develop
(assuming develop is the name of your branch)
Should the TAs need to push out an update to the assignment, commit (or stash if you are more comfortable with git) the changes that are unsaved in your repository:
git commit -am "<some funny message>"
Then update the master branch from remote:
git pull origin master
This updates your local copy of the master branch. Now try to merge the master branch into your development branch:
git merge master
(assuming that you are on your development branch)
There are likely to be merge conflicts during this step. If so, first check what files are in conflict:
git status
The files in conflict are the ones that are "Not staged for commit". Open these files using your favourite editor and look for lines containing <<<<
and >>>>
. Resolve conflicts as seems best and then save the file. Once you have resolved all conflicts, stage the files that were in conflict:
git add -A .
Finally, commit the new updates to your branch and continue developing:
git commit -am "<I did it>"