Skip to content

Docker: Error building container #494

@sedited

Description

@sedited

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    devDeveloper related (non-product) issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions