-1

I have cloned this repository https://github.com/grpc/grpc.git for installing the grpc. I want to use the framework with C++ programming so I followed the instructions given in folder src/cpp.

To build grpc for C++ from the source (in OpenSUSE) there are some pre-requisites given in this link

 $ [sudo] apt-get install build-essential autoconf libtool pkg-config

As mentioned, to build from source and run tests, one needs

$ [sudo] apt-get install libgflags-dev libgtest-dev
$ [sudo] apt-get install clang libc++-dev

I could not find any build-essential, libgflags-dev and libgtest-dev. I don't know whether this is the reason for not getting grpc installed.

Later, I have manually installed protocol buffer compiler protoc before running the make.

When I run make in the grpc root directory. I get this error

[PROTOC]  Generating protobuf CC file from src/proto/grpc/channelz/channelz.proto
make: protoc: Command not found
make: *** [Makefile:2601: /home/rohan/Downloads/grpc/gens/src/proto/grpc/channelz/channelz.pb.cc] Error 127

Unable to figure out why this error is showing as I already have installed protoc. Is some linking problem, then please share how to solve it. I am new to Linux so I really am a little bit hesitant to change and env file or some make file by my own.

Please suggest some help. Thanks for your time.

RC0993
  • 898
  • 1
  • 13
  • 44
  • Where did you manually install `protoc`? In a path that is in your `PATH` I hope? – Matthieu Brucher Jan 16 '19 at 10:36
  • Hi @MatthieuBrucher I have no `PATH` set in `.bashrc`. Is that what you are asking? that said, I think protobuff is installed in some default location, say `/usr/include` and `/usr/lib64`. **How do I make sure of it though?** also when I do `protoc --IPATH` it gives **Missing value for flag: --IPATH** – RC0993 Jan 16 '19 at 10:47
  • You will have to figure this out, because the path but be added to the environment variable `PATH`. Not sure what you think `protoc -IPATH` is supposed to do. – Matthieu Brucher Jan 16 '19 at 10:49
  • If you type `which protoc`, it will search your `PATH`, and tell you where it is installed, if it can find it. – Nick ODell Jan 16 '19 at 17:28
  • Hi @NickODell and @MatthieuBrucher, This was definitely `protobuf` installation problem. As I reinstalled the protobuff again this problem was solved. apparently I downloaded erroneous git repo which is now fixed. *Since I am new to SO I don't know how to close this Issue without any answer.* – RC0993 Jan 24 '19 at 06:03
  • We only close questions if the question cannot be answered. (E.g. "Is cereal a soup?") Write an answer to your question, so the next person to have this problem knows how to solve it. – Nick ODell Jan 24 '19 at 15:39

1 Answers1

2

I have resolved this problem by installing protocol buffer compiler properly.

The important step which I forgot to do earlier is to update the submodules with git submodule update --init --recursive when you are building protoc with git repository.

The steps for C++ version are mentioned at this link.

Thanks,

RC0993
  • 898
  • 1
  • 13
  • 44