GoogleCloudPlatform / config-validator

Golang library which provides functionality to evaluate GCP resources against Rego-based policies
Apache License 2.0
45 stars 34 forks source link

Config validator master branch fail to compile, recipe for target 'tools' failed #158

Closed krab-skunk closed 3 years ago

krab-skunk commented 3 years ago

When trying to compile latest master today , i got the following error

Successfully tagged gcv-proto-builder:latest
docker run \
    -v `pwd`:/go/src/github.com/forseti-security/config-validator \
    gcv-proto-builder \
    protoc -I/proto -I./api --go_out=plugins=grpc:./pkg/api/validator ./api/validator.proto
go build ./cmd/...
cmd/policy-tool/policy-tool.go:22:2: cannot find package "github.com/forseti-security/config-validator/cmd/policy-tool/debug" in any of:
    /usr/lib/go-1.10/src/github.com/forseti-security/config-validator/cmd/policy-tool/debug (from $GOROOT)
    /root/go/src/github.com/forseti-security/config-validator/cmd/policy-tool/debug (from $GOPATH)
cmd/policy-tool/policy-tool.go:23:2: cannot find package "github.com/forseti-security/config-validator/cmd/policy-tool/lint" in any of:
    /usr/lib/go-1.10/src/github.com/forseti-security/config-validator/cmd/policy-tool/lint (from $GOROOT)
    /root/go/src/github.com/forseti-security/config-validator/cmd/policy-tool/lint (from $GOPATH)
cmd/policy-tool/policy-tool.go:24:2: cannot find package "github.com/forseti-security/config-validator/cmd/policy-tool/status" in any of:
    /usr/lib/go-1.10/src/github.com/forseti-security/config-validator/cmd/policy-tool/status (from $GOROOT)
    /root/go/src/github.com/forseti-security/config-validator/cmd/policy-tool/status (from $GOPATH)
cmd/policy-tool/policy-tool.go:25:2: cannot find package "github.com/golang/glog" in any of:
    /usr/lib/go-1.10/src/github.com/golang/glog (from $GOROOT)
    /root/go/src/github.com/golang/glog (from $GOPATH)
cmd/policy-tool/policy-tool.go:26:2: cannot find package "github.com/spf13/cobra" in any of:
    /usr/lib/go-1.10/src/github.com/spf13/cobra (from $GOROOT)
    /root/go/src/github.com/spf13/cobra (from $GOPATH)
cmd/policy-tool/policy-tool.go:27:2: cannot find package "github.com/spf13/pflag" in any of:
    /usr/lib/go-1.10/src/github.com/spf13/pflag (from $GOROOT)
    /root/go/src/github.com/spf13/pflag (from $GOPATH)
cmd/policy-tool/debug/debug.go:10:2: cannot find package "github.com/forseti-security/config-validator/pkg/gcv" in any of:
    /usr/lib/go-1.10/src/github.com/forseti-security/config-validator/pkg/gcv (from $GOROOT)
    /root/go/src/github.com/forseti-security/config-validator/pkg/gcv (from $GOPATH)
cmd/policy-tool/status/status.go:22:2: cannot find package "github.com/forseti-security/config-validator/pkg/bundlemanager" in any of:
    /usr/lib/go-1.10/src/github.com/forseti-security/config-validator/pkg/bundlemanager (from $GOROOT)
    /root/go/src/github.com/forseti-security/config-validator/pkg/bundlemanager (from $GOPATH)
cmd/server/main.go:26:2: cannot find package "github.com/forseti-security/config-validator/pkg/api/validator" in any of:
    /usr/lib/go-1.10/src/github.com/forseti-security/config-validator/pkg/api/validator (from $GOROOT)
    /root/go/src/github.com/forseti-security/config-validator/pkg/api/validator (from $GOPATH)
cmd/server/main.go:29:2: cannot find package "google.golang.org/grpc" in any of:
    /usr/lib/go-1.10/src/google.golang.org/grpc (from $GOROOT)
    /root/go/src/google.golang.org/grpc (from $GOPATH)
cmd/server/main.go:30:2: cannot find package "google.golang.org/grpc/codes" in any of:
    /usr/lib/go-1.10/src/google.golang.org/grpc/codes (from $GOROOT)
    /root/go/src/google.golang.org/grpc/codes (from $GOPATH)
cmd/server/main.go:31:2: cannot find package "google.golang.org/grpc/status" in any of:
    /usr/lib/go-1.10/src/google.golang.org/grpc/status (from $GOROOT)
    /root/go/src/google.golang.org/grpc/status (from $GOPATH)
Makefile:74: recipe for target 'tools' failed
make: *** [tools] Error 1

Does anyone have an idea please ?

Thanks