Skip to content

Docker: Error building container #494

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

Closed
TheCharlatan opened this issue Jun 3, 2020 · 3 comments
Closed

Docker: Error building container #494

TheCharlatan opened this issue Jun 3, 2020 · 3 comments
Labels
dev Developer related (non-product) issues

Comments

@TheCharlatan
Copy link
Contributor

TheCharlatan commented Jun 3, 2020

I wanted to build the docker container to reproduce today's release build, but it failed at installing protoc-gen-doc:

Removing intermediate container 1212580db3af
The command '/bin/sh -c go get -v -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc' returned a non-zero code: 2

I investigated further and ran:

docker exec -ti bitbox02-firmware-dev go get -v -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc

Which in turn showed me the actual error:

opt/go/src/google.golang.org/protobuf/proto/proto_methods.go:18:23: cannot use m.ProtoMethods() (type *protoreflect.Message) as type *struct { pragma.NoUnkeyedLiterals; Flags uint64; Size func(struct { pragma.NoUnkeyedLiterals; Message protoreflect.Message; Flags uint8 }) struct { pragma.NoUnkeyedLiterals; Size int }; Marshal func(struct { pragma.NoUnkeyedLiterals; Message protoreflect.Message; Buf []byte; Flags uint8 }) (struct { pragma.NoUnkeyedLiterals; Buf []byte }, error); Unmarshal func(struct { pragma.NoUnkeyedLiterals; Message protoreflect.Message; Buf []byte; Flags uint8; Resolver interface { FindExtensionByName(protoreflect.FullName) (protoreflect.ExtensionType, error); FindExtensionByNumber(protoreflect.FullName, protowire.Number) (protoreflect.ExtensionType, error) } }) (struct { pragma.NoUnkeyedLiterals; Flags uint8 }, error); Merge func(struct { pragma.NoUnkeyedLiterals; Source protoreflect.Message; Destination protoreflect.Message }) struct { pragma.NoUnkeyedLiterals; Flags uint8 }; CheckInitialized func(struct { pragma.NoUnkeyedLiterals; Message protoreflect.Message }) (struct { pragma.NoUnkeyedLiterals }, error) } in return argument

After reading through this: golang/protobuf#1094 I am thinking that the problem is the go version. Should the Dockerfile be updated to 1.13?

Edit:
I tested building with a bumped go version and that indeed did the trick.

@TheCharlatan
Copy link
Contributor Author

Seems like this kind of problem will pop up in the future again the way the dependencies are imported right now. Everything that is downloaded should be versioned and checked. I'm also not a fan of using rustup to get the rust toolchain. Can this be replaced by a static script?

@benma
Copy link
Collaborator

benma commented Jun 5, 2020

Fixed in #495

@NickeZ
Copy link
Collaborator

NickeZ commented Jun 9, 2020

Actually fixed in #496

@benma benma closed this as completed Jun 19, 2020
@x1ddos x1ddos added the dev Developer related (non-product) issues label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Developer related (non-product) issues
Projects
None yet
Development

No branches or pull requests

4 participants