I try compile Bitcoin lightningnetwork library with depended code. I have error: “lnrpc\rpc.pb.go:93:8: no buildable Go source files in d:\code\go\src\github.com\grpc-ecosystem\grpc-gateway\third_party\googleapis\google\api” m there are files: annotations.proto and http.proto,
annotations.proto begin with:
I have downloaded file protoc.exe. But when I try >protoc --go_out=. *.proto I have errors:
google/api/http.proto: File not found.
google/protobuf/descriptor.proto: File not found.
annotations.proto: Import “google/api/http.proto” was not found or had errors.
annotations.proto: Import “google/protobuf/descriptor.proto” was not found or had errors.
annotations.proto:28:8: “google.protobuf.MethodOptions” is not defined.
http.proto is in current directory, no file descriptor.proto
I think you should file a bug on the repository, as they should include the generated serialization code in the package so you don’t have to compile the protobuf files yourself.
Doing so is surprisingly messy (in getting the various include paths right) so I’m not able to give you any specific advice.
First you need to install ProtocolBuffers 3.0.0-beta-3 or later.
mkdir tmp
cd tmp
git clone https://github.com/google/protobuf
cd protobuf
./autogen.sh
./configure
make
make check
sudo make install
Then, go get -u as usual the following packages:
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get -u github.com/golang/protobuf/protoc-gen-go
I try compiling on Windows, download protoc.exe and do "go get -u " without errors but still are problems with *.proto, I issued.
Yes, I have downloaded binary, when I do “go get -u github.com…” I only make protoc-gen-go.exe, protoc-gen-swagger.exe and protoc-gen-grpc-gateway.exe but not solve problem with proto