Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with *.proto as "no buildable Go source files" #338

Closed
andr1972 opened this issue Mar 27, 2017 · 6 comments
Closed

Problem with *.proto as "no buildable Go source files" #338

andr1972 opened this issue Mar 27, 2017 · 6 comments

Comments

@andr1972
Copy link

This repository compilation I call from compilation github.com\lightningnetwork\lnd. When I download all depended reposotories, it appear error:

d:\code\go\src\github.com\lightningnetwork\lnd>go build
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

I read README.md of this repository. There is about protobuf installation on Linux. I try compiling on Windows, have download protoc-3.2.0-win32.zip and put protoc.exe to %PATH% directory (for exmaple Go directory), next I do:

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

without errors but still I can't compile due to *.proto

@tmc
Copy link
Collaborator

tmc commented Mar 27, 2017

@borneq thanks for your issue report. It appears lnd uses an outdated protoc invocation. I've opened lightningnetwork/lnd#169 to solve this problem.

@tmc
Copy link
Collaborator

tmc commented Mar 28, 2017

This has been fixed upstream.

@tmc tmc closed this as completed Mar 28, 2017
@c4milo
Copy link

c4milo commented Mar 29, 2017

@tmc I'm having this same issue with master branch and libprotoc 3.2.0.

Manually commenting the following line, in the generated code, fixed it.

import _ "github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api"

@c4milo
Copy link

c4milo commented Mar 29, 2017

I fixed it based on lightningnetwork/lnd#169 Thanks!

@tamalsaha tamalsaha mentioned this issue Mar 30, 2017
1 task
@nicerobot
Copy link

nicerobot commented May 7, 2017

@tmc @c4milo Sorry, I don't understand why this is "fixed" by lightningnetwork/lnd#169 nor where it's fixed in #340

The issue is that the folder

github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api

no longer contains the generated http.pb.go and annotations.pb.go so when, for example, including annotations into a .proto file, the error occurs:

no buildable Go source files in .../github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api

@baopham
Copy link

baopham commented Sep 30, 2017

@nicerobot You are probably using the old go_out option, if you follow this fix philips/grpc-gateway-example#15 and regenerate the files, it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants