hashicorp / vault

A tool for secrets management, encryption as a service, and privileged access management
https://www.vaultproject.io/
Other
30.95k stars 4.18k forks source link

Unable to build "release/1.14.x" branch using Go version 1.21.0 #22292

Closed SchweinDeBurg closed 1 year ago

SchweinDeBurg commented 1 year ago

I've tried to build "release/1.14.x" branch using Go version 1.21.0 and got the following errors:

+ env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/vault -a -p 1 -v -ldflags '-B 0x7dade292805348e98476271dd839d96901397d5a -compressdwarf=false'
go: downloading cloud.google.com/go v0.110.2
go: downloading google.golang.org/api v0.126.0
go: downloading github.com/hashicorp/vault-plugin-auth-azure v0.16.0
go: downloading cloud.google.com/go/storage v1.29.0
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc
go: downloading google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc
go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc
../../../../.go/pkg/mod/google.golang.org/grpc@v1.55.0/status/status.go:35:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/vault-plugin-auth-gcp@v0.16.0/plugin/cli.go:15:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/go-gcp-common@v0.8.0/gcputil/compute.go:8:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/go-gcp-common@v0.8.0/gcputil/credentials.go:23:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/go-gcp-common@v0.8.0/gcputil/iam_admin.go:6:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/vault-plugin-auth-gcp@v0.16.0/plugin/backend.go:19:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/vault-plugin-auth-gcp@v0.16.0/plugin/cli.go:21:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/vault-plugin-auth-gcp@v0.16.0/plugin/backend.go:22:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/vault-plugin-auth-jwt@v0.16.0/provider_gsuite.go:17:2: GOPROXY list is not the empty string, but contains no entries
internalshared/configutil/telemetry.go:14:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/google/go-metrics-stackdriver@v0.2.0/stackdriver.go:32:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/google/go-metrics-stackdriver@v0.2.0/stackdriver.go:33:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/google/go-metrics-stackdriver@v0.2.0/stackdriver.go:35:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/google/go-metrics-stackdriver@v0.2.0/stackdriver.go:36:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/go-kms-wrapping/wrappers/gcpckms/v2@v2.0.8/gcpckms.go:9:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/go-kms-wrapping/wrappers/gcpckms/v2@v2.0.8/gcpckms.go:10:2: GOPROXY list is not the empty string, but contains no entries
helper/builtinplugins/registry.go:10:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/vault-plugin-secrets-gcp@v0.16.0/plugin/path_impersonated_account_secrets.go:13:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/vault-plugin-secrets-gcpkms@v0.15.0/path_keys.go:21:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/vault-plugin-secrets-gcpkms@v0.15.0/path_decrypt.go:15:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/github.com/hashicorp/vault-plugin-secrets-gcpkms@v0.15.0/path_keys.go:22:2: GOPROXY list is not the empty string, but contains no entries
../../../../.go/pkg/mod/go.etcd.io/etcd/api/v3@v3.5.7/etcdserverpb/rpc.pb.go:17:2: GOPROXY list is not the empty string, but contains no entries
physical/gcs/gcs.go:18:2: GOPROXY list is not the empty string, but contains no entries
physical/spanner/spanner.go:15:2: GOPROXY list is not the empty string, but contains no entries
error: Bad exit status from /var/tmp/rpm-tmp.7z82QW (%build)
maxb commented 1 year ago

To fix this, fix the incorrect local setting of GOPROXY that you have, that Go is complaining about:

GOPROXY list is not the empty string, but contains no entries

VioletHynes commented 1 year ago

I think this is an instance of https://github.com/golang/go/issues/61928 -- i.e. not Vault specific. Based on a little reading, it looks like it's something to do with the go.env file, though the specifics will depend on your environment.

I'm going to close this, as this is more of a Go issue than a Vault issue. Good luck getting this resolved!