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

Bump golang to 1.19 #3151

Merged
merged 1 commit into from
Aug 4, 2022
Merged

Bump golang to 1.19 #3151

merged 1 commit into from
Aug 4, 2022

Conversation

bobbypage
Copy link
Collaborator

Signed-off-by: David Porter david@porter.me

Signed-off-by: David Porter <david@porter.me>
@bobbypage
Copy link
Collaborator Author

Might be a bit early...

Unable to find image 'golang:1.19-buster' locally
1.19-buster: Pulling from library/golang
docker: no matching manifest for linux/amd64 in the manifest list entries.
See 'docker run --help'.

@dims
Copy link
Collaborator

dims commented Aug 3, 2022

just re-ran the jobs in GH actions, seems like at least the amd64 image made it, so jobs should be ✅

@bobbypage bobbypage merged commit 9c6fb75 into google:master Aug 4, 2022
@paketb0te
Copy link

it's breaking when I try to build locally, when using the same image from dockerhub (golang:1.19-alpine3.16) it works - it appears the base image is not (publicly) available at gcr.io?

$ docker build -t cadvisor:local_test -f deploy/Dockerfile .
Sending build context to Docker daemon  62.94MB
Step 1/23 : FROM mirror.gcr.io/library/golang:1.19-alpine3.16 AS build
manifest for mirror.gcr.io/library/golang:1.19-alpine3.16 not found: manifest unknown: Failed to fetch "1.19-alpine3.16" from request "/v2/library/golang/manifests/1.19-alpine3.16".

@akhilerm akhilerm mentioned this pull request Aug 11, 2022
@rockerzhu
Copy link

rockerzhu commented Apr 14, 2023

if golang is 1.19, but "go 1.16" in go.mod and cmd/go.mod, build/build.sh failed with "go mod vendor" by golang
1.19.
so whether "go 1.16" in go.mod and cmd/go.mod need to upate by "go 1.19"?

sh-5.1# pwd
/builddir/build/BUILD/cadvisor-0.47.0/cmd
sh-5.1# go mod vendor
go: downloading k8s.io/klog/v2 v2.80.1
go: downloading github.com/stretchr/testify v1.8.1
go: downloading github.com/abbot/go-http-auth v0.4.0
go: downloading github.com/prometheus/client_golang v1.14.0
go: downloading k8s.io/utils v0.0.0-20211116205334-6203023598ed
go: downloading google.golang.org/api v0.104.0
go: downloading golang.org/x/oauth2 v0.3.0
go: downloading gopkg.in/olivere/elastic.v2 v2.0.61
go: downloading github.com/SeanDolphin/bqschema v1.0.0
go: downloading github.com/influxdb/influxdb v0.9.6-0.20151125225445-9eab56311373
go: downloading github.com/Shopify/sarama v1.37.2
go: downloading github.com/gomodule/redigo v1.8.9
go: downloading github.com/Rican7/retry v0.3.1
go: downloading github.com/mesos/mesos-go v0.0.11
go: downloading github.com/docker/go-units v0.5.0
go: downloading github.com/opencontainers/runc v1.1.4
go: downloading github.com/aws/aws-sdk-go v1.35.24
go: downloading cloud.google.com/go/compute/metadata v0.2.2
go: downloading github.com/go-logr/logr v1.2.3
go: downloading cloud.google.com/go/compute v1.13.0
go: downloading golang.org/x/crypto v0.1.0
go: downloading golang.org/x/net v0.4.0
go: downloading cloud.google.com/go v0.105.0
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/prometheus/client_model v0.3.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/prometheus/common v0.38.0
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading github.com/prometheus/procfs v0.8.0
go: downloading golang.org/x/sys v0.3.0
go: downloading google.golang.org/protobuf v1.28.1
go: downloading github.com/blang/semver v3.5.1+incompatible
go: downloading github.com/docker/docker v20.10.21+incompatible
go: downloading github.com/docker/go-connections v0.4.0
go: downloading github.com/eapache/go-resiliency v1.3.0
go: downloading github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21
go: downloading github.com/eapache/queue v1.1.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/jcmturner/gofork v1.7.6
go: downloading github.com/jcmturner/gokrb5/v8 v8.4.3
go: downloading github.com/klauspost/compress v1.15.11
go: downloading github.com/pierrec/lz4/v4 v4.1.17
go: downloading github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
go: downloading github.com/karrick/godirwalk v1.17.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/stretchr/objx v0.5.0
go: downloading github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible
go: downloading github.com/moby/sys/mountinfo v0.6.2
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7
go: downloading github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78
go: downloading google.golang.org/grpc v1.51.0
go: downloading github.com/cyphar/filepath-securejoin v0.2.3
go: downloading github.com/euank/go-kmsg-parser v2.0.0+incompatible
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.2
go: downloading github.com/opencontainers/image-spec v1.0.2
go: downloading github.com/docker/distribution v2.8.1+incompatible
go: downloading github.com/opencontainers/go-digest v1.0.0
go: downloading google.golang.org/appengine v1.6.7
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/hashicorp/errwrap v1.0.0
go: downloading github.com/jcmturner/dnsutils/v2 v2.0.0
go: downloading github.com/hashicorp/go-uuid v1.0.3
go: downloading github.com/checkpoint-restore/go-criu/v5 v5.3.0
go: downloading github.com/containerd/console v1.0.3
go: downloading github.com/mrunalp/fileutils v0.5.0
go: downloading github.com/opencontainers/selinux v1.10.0
go: downloading github.com/vishvananda/netlink v1.1.0
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534
go: downloading github.com/containerd/ttrpc v1.1.0
go: downloading github.com/Microsoft/go-winio v0.4.15
go: downloading github.com/jcmturner/rpc/v2 v2.0.3
go: downloading github.com/googleapis/gax-go/v2 v2.7.0
go: downloading go.opencensus.io v0.24.0
go: downloading github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
go: downloading github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646
go: downloading github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df
go: downloading github.com/cilium/ebpf v0.7.0
go: downloading google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6
go: downloading github.com/godbus/dbus/v5 v5.0.6
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading github.com/jcmturner/aescts/v2 v2.0.0
go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.0
go: downloading golang.org/x/text v0.5.0
go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e

sh-5.1# make build

building assets
building binaries
fatal: not a git repository (or any of the parent directories): .git
building cadvisor

golang.org/x/sys/unix

vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/syscall_linux.go:2256:9: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)

github.com/klauspost/compress/huff0

vendor/github.com/klauspost/compress/huff0/decompress.go:774:21: cannot convert out (variable of type []byte) to type *[256]byte:
conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/github.com/klauspost/compress/huff0/decompress.go:775:24: cannot convert out[dstEvery:] (value of type []byte) to type *[256]byte:
conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/github.com/klauspost/compress/huff0/decompress.go:776:24: cannot convert out[dstEvery * 2:] (value of type []byte) to type *[256]byte:
conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/github.com/klauspost/compress/huff0/decompress.go:777:24: cannot convert out[dstEvery * 3:] (value of type []byte) to type *[256]byte:
conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/github.com/klauspost/compress/huff0/decompress.go:1013:21: cannot convert out (variable of type []byte) to type *[256]byte:
conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/github.com/klauspost/compress/huff0/decompress.go:1014:24: cannot convert out[dstEvery:] (value of type []byte) to type *[256]byte:
conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/github.com/klauspost/compress/huff0/decompress.go:1015:24: cannot convert out[dstEvery * 2:] (value of type []byte) to type *[256]byte:
conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/github.com/klauspost/compress/huff0/decompress.go:1016:24: cannot convert out[dstEvery * 3:] (value of type []byte) to type *[256]byte:
conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod)
make: *** [Makefile:61: build] Error 2

@rockerzhu
Copy link

if golang is 1.19, but "go 1.16" in go.mod and cmd/go.mod, build/build.sh failed with "go mod vendor" by golang 1.19. so whether "go 1.16" in go.mod and cmd/go.mod need to upate by "go 1.19"?

sh-5.1# pwd /builddir/build/BUILD/cadvisor-0.47.0/cmd sh-5.1# go mod vendor go: downloading k8s.io/klog/v2 v2.80.1 go: downloading github.com/stretchr/testify v1.8.1 go: downloading github.com/abbot/go-http-auth v0.4.0 go: downloading github.com/prometheus/client_golang v1.14.0 go: downloading k8s.io/utils v0.0.0-20211116205334-6203023598ed go: downloading google.golang.org/api v0.104.0 go: downloading golang.org/x/oauth2 v0.3.0 go: downloading gopkg.in/olivere/elastic.v2 v2.0.61 go: downloading github.com/SeanDolphin/bqschema v1.0.0 go: downloading github.com/influxdb/influxdb v0.9.6-0.20151125225445-9eab56311373 go: downloading github.com/Shopify/sarama v1.37.2 go: downloading github.com/gomodule/redigo v1.8.9 go: downloading github.com/Rican7/retry v0.3.1 go: downloading github.com/mesos/mesos-go v0.0.11 go: downloading github.com/docker/go-units v0.5.0 go: downloading github.com/opencontainers/runc v1.1.4 go: downloading github.com/aws/aws-sdk-go v1.35.24 go: downloading cloud.google.com/go/compute/metadata v0.2.2 go: downloading github.com/go-logr/logr v1.2.3 go: downloading cloud.google.com/go/compute v1.13.0 go: downloading golang.org/x/crypto v0.1.0 go: downloading golang.org/x/net v0.4.0 go: downloading cloud.google.com/go v0.105.0 go: downloading github.com/davecgh/go-spew v1.1.1 go: downloading github.com/pmezard/go-difflib v1.0.0 go: downloading gopkg.in/yaml.v3 v3.0.1 go: downloading github.com/prometheus/client_model v0.3.0 go: downloading github.com/beorn7/perks v1.0.1 go: downloading github.com/cespare/xxhash/v2 v2.1.2 go: downloading github.com/prometheus/common v0.38.0 go: downloading github.com/golang/protobuf v1.5.2 go: downloading github.com/cespare/xxhash v1.1.0 go: downloading github.com/prometheus/procfs v0.8.0 go: downloading golang.org/x/sys v0.3.0 go: downloading google.golang.org/protobuf v1.28.1 go: downloading github.com/blang/semver v3.5.1+incompatible go: downloading github.com/docker/docker v20.10.21+incompatible go: downloading github.com/docker/go-connections v0.4.0 go: downloading github.com/eapache/go-resiliency v1.3.0 go: downloading github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 go: downloading github.com/eapache/queue v1.1.0 go: downloading github.com/hashicorp/go-multierror v1.1.1 go: downloading github.com/jcmturner/gofork v1.7.6 go: downloading github.com/jcmturner/gokrb5/v8 v8.4.3 go: downloading github.com/klauspost/compress v1.15.11 go: downloading github.com/pierrec/lz4/v4 v4.1.17 go: downloading github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 go: downloading github.com/karrick/godirwalk v1.17.0 go: downloading github.com/pkg/errors v0.9.1 go: downloading github.com/stretchr/objx v0.5.0 go: downloading github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible go: downloading github.com/moby/sys/mountinfo v0.6.2 go: downloading github.com/gogo/protobuf v1.3.2 go: downloading github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 go: downloading github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 go: downloading google.golang.org/grpc v1.51.0 go: downloading github.com/cyphar/filepath-securejoin v0.2.3 go: downloading github.com/euank/go-kmsg-parser v2.0.0+incompatible go: downloading github.com/sirupsen/logrus v1.8.1 go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.2 go: downloading github.com/opencontainers/image-spec v1.0.2 go: downloading github.com/docker/distribution v2.8.1+incompatible go: downloading github.com/opencontainers/go-digest v1.0.0 go: downloading google.golang.org/appengine v1.6.7 go: downloading github.com/golang/snappy v0.0.4 go: downloading github.com/hashicorp/errwrap v1.0.0 go: downloading github.com/jcmturner/dnsutils/v2 v2.0.0 go: downloading github.com/hashicorp/go-uuid v1.0.3 go: downloading github.com/checkpoint-restore/go-criu/v5 v5.3.0 go: downloading github.com/containerd/console v1.0.3 go: downloading github.com/mrunalp/fileutils v0.5.0 go: downloading github.com/opencontainers/selinux v1.10.0 go: downloading github.com/vishvananda/netlink v1.1.0 go: downloading github.com/google/uuid v1.3.0 go: downloading github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534 go: downloading github.com/containerd/ttrpc v1.1.0 go: downloading github.com/Microsoft/go-winio v0.4.15 go: downloading github.com/jcmturner/rpc/v2 v2.0.3 go: downloading github.com/googleapis/gax-go/v2 v2.7.0 go: downloading go.opencensus.io v0.24.0 go: downloading github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 go: downloading github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 go: downloading github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df go: downloading github.com/cilium/ebpf v0.7.0 go: downloading google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 go: downloading github.com/godbus/dbus/v5 v5.0.6 go: downloading github.com/jmespath/go-jmespath v0.4.0 go: downloading github.com/jcmturner/aescts/v2 v2.0.0 go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.0 go: downloading golang.org/x/text v0.5.0 go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e

sh-5.1# make build

building assets
building binaries
fatal: not a git repository (or any of the parent directories): .git
building cadvisor

golang.org/x/sys/unix

vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/golang.org/x/sys/unix/syscall_linux.go:2256:9: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)

github.com/klauspost/compress/huff0

vendor/github.com/klauspost/compress/huff0/decompress.go:774:21: cannot convert out (variable of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:775:24: cannot convert out[dstEvery:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:776:24: cannot convert out[dstEvery * 2:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:777:24: cannot convert out[dstEvery * 3:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:1013:21: cannot convert out (variable of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:1014:24: cannot convert out[dstEvery:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:1015:24: cannot convert out[dstEvery * 2:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:1016:24: cannot convert out[dstEvery * 3:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) make: *** [Makefile:61: build] Error 2

make build success after removing cmd/vendor, using mod in GOMODCACHE.

I don't know why

@rockerzhu
Copy link

if golang is 1.19, but "go 1.16" in go.mod and cmd/go.mod, build/build.sh failed with "go mod vendor" by golang 1.19. so whether "go 1.16" in go.mod and cmd/go.mod need to upate by "go 1.19"?
sh-5.1# pwd /builddir/build/BUILD/cadvisor-0.47.0/cmd sh-5.1# go mod vendor go: downloading k8s.io/klog/v2 v2.80.1 go: downloading github.com/stretchr/testify v1.8.1 go: downloading github.com/abbot/go-http-auth v0.4.0 go: downloading github.com/prometheus/client_golang v1.14.0 go: downloading k8s.io/utils v0.0.0-20211116205334-6203023598ed go: downloading google.golang.org/api v0.104.0 go: downloading golang.org/x/oauth2 v0.3.0 go: downloading gopkg.in/olivere/elastic.v2 v2.0.61 go: downloading github.com/SeanDolphin/bqschema v1.0.0 go: downloading github.com/influxdb/influxdb v0.9.6-0.20151125225445-9eab56311373 go: downloading github.com/Shopify/sarama v1.37.2 go: downloading github.com/gomodule/redigo v1.8.9 go: downloading github.com/Rican7/retry v0.3.1 go: downloading github.com/mesos/mesos-go v0.0.11 go: downloading github.com/docker/go-units v0.5.0 go: downloading github.com/opencontainers/runc v1.1.4 go: downloading github.com/aws/aws-sdk-go v1.35.24 go: downloading cloud.google.com/go/compute/metadata v0.2.2 go: downloading github.com/go-logr/logr v1.2.3 go: downloading cloud.google.com/go/compute v1.13.0 go: downloading golang.org/x/crypto v0.1.0 go: downloading golang.org/x/net v0.4.0 go: downloading cloud.google.com/go v0.105.0 go: downloading github.com/davecgh/go-spew v1.1.1 go: downloading github.com/pmezard/go-difflib v1.0.0 go: downloading gopkg.in/yaml.v3 v3.0.1 go: downloading github.com/prometheus/client_model v0.3.0 go: downloading github.com/beorn7/perks v1.0.1 go: downloading github.com/cespare/xxhash/v2 v2.1.2 go: downloading github.com/prometheus/common v0.38.0 go: downloading github.com/golang/protobuf v1.5.2 go: downloading github.com/cespare/xxhash v1.1.0 go: downloading github.com/prometheus/procfs v0.8.0 go: downloading golang.org/x/sys v0.3.0 go: downloading google.golang.org/protobuf v1.28.1 go: downloading github.com/blang/semver v3.5.1+incompatible go: downloading github.com/docker/docker v20.10.21+incompatible go: downloading github.com/docker/go-connections v0.4.0 go: downloading github.com/eapache/go-resiliency v1.3.0 go: downloading github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 go: downloading github.com/eapache/queue v1.1.0 go: downloading github.com/hashicorp/go-multierror v1.1.1 go: downloading github.com/jcmturner/gofork v1.7.6 go: downloading github.com/jcmturner/gokrb5/v8 v8.4.3 go: downloading github.com/klauspost/compress v1.15.11 go: downloading github.com/pierrec/lz4/v4 v4.1.17 go: downloading github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 go: downloading github.com/karrick/godirwalk v1.17.0 go: downloading github.com/pkg/errors v0.9.1 go: downloading github.com/stretchr/objx v0.5.0 go: downloading github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible go: downloading github.com/moby/sys/mountinfo v0.6.2 go: downloading github.com/gogo/protobuf v1.3.2 go: downloading github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 go: downloading github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 go: downloading google.golang.org/grpc v1.51.0 go: downloading github.com/cyphar/filepath-securejoin v0.2.3 go: downloading github.com/euank/go-kmsg-parser v2.0.0+incompatible go: downloading github.com/sirupsen/logrus v1.8.1 go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.2 go: downloading github.com/opencontainers/image-spec v1.0.2 go: downloading github.com/docker/distribution v2.8.1+incompatible go: downloading github.com/opencontainers/go-digest v1.0.0 go: downloading google.golang.org/appengine v1.6.7 go: downloading github.com/golang/snappy v0.0.4 go: downloading github.com/hashicorp/errwrap v1.0.0 go: downloading github.com/jcmturner/dnsutils/v2 v2.0.0 go: downloading github.com/hashicorp/go-uuid v1.0.3 go: downloading github.com/checkpoint-restore/go-criu/v5 v5.3.0 go: downloading github.com/containerd/console v1.0.3 go: downloading github.com/mrunalp/fileutils v0.5.0 go: downloading github.com/opencontainers/selinux v1.10.0 go: downloading github.com/vishvananda/netlink v1.1.0 go: downloading github.com/google/uuid v1.3.0 go: downloading github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534 go: downloading github.com/containerd/ttrpc v1.1.0 go: downloading github.com/Microsoft/go-winio v0.4.15 go: downloading github.com/jcmturner/rpc/v2 v2.0.3 go: downloading github.com/googleapis/gax-go/v2 v2.7.0 go: downloading go.opencensus.io v0.24.0 go: downloading github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 go: downloading github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 go: downloading github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df go: downloading github.com/cilium/ebpf v0.7.0 go: downloading google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 go: downloading github.com/godbus/dbus/v5 v5.0.6 go: downloading github.com/jmespath/go-jmespath v0.4.0 go: downloading github.com/jcmturner/aescts/v2 v2.0.0 go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.0 go: downloading golang.org/x/text v0.5.0 go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
sh-5.1# make build

building assets
building binaries
fatal: not a git repository (or any of the parent directories): .git
building cadvisor

golang.org/x/sys/unix

vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/golang.org/x/sys/unix/syscall_linux.go:2256:9: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)

github.com/klauspost/compress/huff0

vendor/github.com/klauspost/compress/huff0/decompress.go:774:21: cannot convert out (variable of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:775:24: cannot convert out[dstEvery:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:776:24: cannot convert out[dstEvery * 2:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:777:24: cannot convert out[dstEvery * 3:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:1013:21: cannot convert out (variable of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:1014:24: cannot convert out[dstEvery:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:1015:24: cannot convert out[dstEvery * 2:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/github.com/klauspost/compress/huff0/decompress.go:1016:24: cannot convert out[dstEvery * 3:] (value of type []byte) to type *[256]byte: conversion of slices to array pointers requires go1.17 or later (-lang was set to go1.16; check go.mod) make: *** [Makefile:61: build] Error 2

make build success after removing cmd/vendor, using mod in GOMODCACHE.

I don't know why

make build failed when copying modules in GOMODCACHE to cmd/vendor.

  • go build -tags netgo -ldflags '
    -X github.com/google/cadvisor/version.Version=
    -X github.com/google/cadvisor/version.Revision=unknown
    -X github.com/google/cadvisor/version.Branch=unknown
    -X github.com/google/cadvisor/version.BuildUser=root@VM-140-203-centos
    -X github.com/google/cadvisor/version.BuildDate=20230414-15:19:52
    -X github.com/google/cadvisor/version.GoVersion=1.19' -o /builddir/build/BUILD/cadvisor-0.47.0/_output/cadvisor github.com/google/cadvisor/cmd
    go: inconsistent vendoring in /builddir/build/BUILD/cadvisor-0.47.0/cmd:
    github.com/google/cadvisor@v0.0.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    github.com/Rican7/retry@v0.3.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    github.com/SeanDolphin/bqschema@v1.0.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    github.com/Shopify/sarama@v1.37.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    github.com/abbot/go-http-auth@v0.4.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    github.com/gomodule/redigo@v1.8.9: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    github.com/influxdb/influxdb@v0.9.6-0.20151125225445-9eab56311373: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt

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

Successfully merging this pull request may close these issues.

None yet

4 participants