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

proto: undefined: proto.InternalMessageInfo #642

Closed
sobhanthakur opened this issue Jun 21, 2018 · 6 comments
Closed

proto: undefined: proto.InternalMessageInfo #642

sobhanthakur opened this issue Jun 21, 2018 · 6 comments
Labels

Comments

@sobhanthakur
Copy link

sobhanthakur commented Jun 21, 2018

I am trying to compile lora-app-server source code. Whenever i run make command after make api. i get following errors

github.com/brocaar/lora-app-server/api
api/application.pb.go:89:46: undefined: proto.InternalMessageInfo
api/application.pb.go:170:47: undefined: proto.InternalMessageInfo
api/application.pb.go:209:43: undefined: proto.InternalMessageInfo
api/application.pb.go:262:44: undefined: proto.InternalMessageInfo
api/application.pb.go:362:46: undefined: proto.InternalMessageInfo

Any solution is welcome

@dsnet
Copy link
Member

dsnet commented Jun 21, 2018

The InternalMessageInfo type was added recently, so it means that your proto package has not been updated. You probably need to update the package:

go get -u github.com/golang/protobuf/proto

Keep in mind that vendoring directories may caused additional complications, so you'll have to check whether you're vendoring the proto package as well.

EDIT: Fixed package path.

@dsnet dsnet changed the title undefined: proto.InternalMessageInfo proto: undefined: proto.InternalMessageInfo Jun 21, 2018
@dsnet dsnet added the question label Jun 21, 2018
@soundrussian
Copy link

I'm having the same issue. Updated protoc:

protoc --version
libprotoc 3.6.0

The generated .go file won't compile:

store/store.pb.go:78:27: undefined: proto.InternalMessageInfo
store/store.pb.go:312:28: undefined: proto.InternalMessageInfo
store/store.pb.go:387:25: undefined: proto.InternalMessageInfo
store/store.pb.go:685:28: undefined: proto.InternalMessageInfo
store/store.pb.go:783:28: undefined: proto.InternalMessageInfo
store/store.pb.go:849:29: undefined: proto.InternalMessageInfo
store/store.pb.go:889:30: undefined: proto.InternalMessageInfo
store/store.pb.go:946:26: undefined: proto.InternalMessageInfo
store/store.pb.go:1019:27: undefined: proto.InternalMessageInfo
store/store.pb.go:1059:29: undefined: proto.InternalMessageInfo
store/store.pb.go:1059:29: too many errors

Updating the package doesn't help:

# go get -u github.com/google/proto
package github.com/google/protobuf/proto: cannot find package "github.com/google/protobuf/proto" in any of:
	/usr/local/go/src/github.com/google/protobuf/proto (from $GOROOT)
	/go/src/github.com/google/protobuf/proto (from $GOPATH)

@dsnet
Copy link
Member

dsnet commented Jun 22, 2018

My mistake, it should be:

go get -u github.com/golang/protobuf/proto

@soundrussian
Copy link

Thanks, the problem was in old package in /vendor/github.com/golang/protobuf, just removed it, and the problem is gone

@dsnet
Copy link
Member

dsnet commented Jun 22, 2018

Great to hear.

@zuochangqin
Copy link

运行glide get github.com/golang/protobuf,将protobuf放到glide依赖里面

@golang golang locked as resolved and limited conversation to collaborators Jun 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants