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

deno/dispatch.go:10:26: undefined: BaseMsg #71

Closed
FrankFang opened this issue Jun 1, 2018 · 10 comments
Closed

deno/dispatch.go:10:26: undefined: BaseMsg #71

FrankFang opened this issue Jun 1, 2018 · 10 comments

Comments

@FrankFang
Copy link
Contributor

I run go get -u github.com/ry/deno/... following the README.md,
and got this message

$ go get  -u github.com/ry/deno/...
# github.com/ry/deno
../deno/dispatch.go:10:26: undefined: BaseMsg
../deno/dispatch.go:30:10: undefined: BaseMsg
../deno/dispatch.go:62:14: undefined: BaseMsg
../deno/dispatch.go:68:34: undefined: Msg
../deno/dispatch.go:119:13: select case must be receive, send or assign recv
../deno/fetch.go:13:11: undefined: Msg
../deno/fetch.go:16:8: undefined: Msg_FETCH_REQ
../deno/fetch.go:29:14: undefined: Msg
../deno/main.go:38:15: undefined: Asset
../deno/main.go:110:19: undefined: Msg
../deno/main.go:110:19: too many errors
@FrankFang
Copy link
Contributor Author

$ go version
go version go1.10.2 darwin/amd64

@qti3e
Copy link
Contributor

qti3e commented Jun 1, 2018

The error states that BaseMsg is undefined, and that's because BaseMsg is defined inside msg.pb.go, this file should be generated using:

protoc --go_out=. msg.proto

and actually that's not how you supposed to build deno, you should use make deno, it will do all the build-related stuff for you : )

PS make sure you have all the deps (read README)

sudo apt-get install libgtk-3-dev pkg-config ccache

@ztplz
Copy link
Contributor

ztplz commented Jun 1, 2018

When i run go get -u github.com/ry/deno/..., I got the same error.
I found BaseMsg is not defined in the dispatch.go.
BaseMsg should be a struct, but it is not defined.

@yuqingc
Copy link
Contributor

yuqingc commented Jun 1, 2018

FYI: BaseMsg is defined inside msg.pb.go

type BaseMsg struct {
	Channel              string   `protobuf:"bytes,1,opt,name=channel" json:"channel,omitempty"`
	Payload              []byte   `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

@ulivz
Copy link
Contributor

ulivz commented Jun 1, 2018

Met the same error, but I guess you can still run the rest build steps successfully.

@FrankFang
Copy link
Contributor Author

@qti3e Thanks! make (under GOPATH/src/github.com/ry/deno) works.
@yuqingc Thanks too.

@FrankFang
Copy link
Contributor Author

@ulivz yes.

@FrankFang
Copy link
Contributor Author

image

Thank you guys.

@qti3e
Copy link
Contributor

qti3e commented Jun 1, 2018

@ztplz Have you solved your issue...?

@ztplz
Copy link
Contributor

ztplz commented Jun 1, 2018

@qti3e
Yes, thanks for your help.
I have build success in my mac.
When I run make, I got some error message like this
protoc --go_out=. msg.proto protoc-gen-go: program not found or is not executable
I type conmand below
export PATH="$PATH:$GOPATH/bin"
It is work fine for me.
Hope my solution can help some macOS user.

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