treacher / namespace-rolebinding-operator

Apache License 2.0
70 stars 18 forks source link

Unable to build operator #1

Closed gugahoi closed 7 years ago

gugahoi commented 7 years ago

It seems there are some dependencies missing from the project as I can't seem to build it

❯ go version
go version go1.8.3 darwin/amd64

❯ make install_deps build
glide install
[WARN]    The name listed in the config file (github.com/treacher/namespace-rolebinding-operator) does not match the current location (github.com/gugahoi/namespace-rolebinding-operator)
[WARN]    Lock file may be out of date. Hash check of YAML failed. You may need to run 'update'
[INFO]    Downloading dependencies. Please wait...
[INFO]    --> Found desired version locally github.com/davecgh/go-spew 782f4967f2dc4564575ca782fe2d04090b5faca8!
[INFO]    --> Found desired version locally github.com/emicklei/go-restful ff4f55a206334ef123e4f79bbf348980da81ca46!
[INFO]    --> Found desired version locally github.com/emicklei/go-restful-swagger12 dcef7f55730566d41eae5db10e7d6981829720f6!
[INFO]    --> Found desired version locally github.com/ghodss/yaml 73d445a93680fa1a78ae23a5839bad48f32ba1ee!
[INFO]    --> Found desired version locally github.com/go-openapi/jsonpointer 46af16f9f7b149af66e5d1bd010e3574dc06de98!
[INFO]    --> Found desired version locally github.com/go-openapi/jsonreference 13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272!
[INFO]    --> Found desired version locally github.com/go-openapi/spec 6aced65f8501fe1217321abf0749d354824ba2ff!
[INFO]    --> Found desired version locally github.com/go-openapi/swag 1d0bd113de87027671077d3c71eb3ac5d7dbba72!
[INFO]    --> Found desired version locally github.com/gogo/protobuf c0656edd0d9eab7c66d1eb0c568f9039345796f7!
[INFO]    --> Found desired version locally github.com/golang/glog 44145f04b68cf362d9c4df2182967c2275eaefed!
[INFO]    --> Found desired version locally github.com/google/gofuzz 44d81051d367757e1c7c6a5a86423ece9afcf63c!
[INFO]    --> Found desired version locally github.com/hashicorp/golang-lru a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4!
[INFO]    --> Found desired version locally github.com/howeyc/gopass bf9dde6d0d2c004a008c27aaee91170c786f6db8!
[INFO]    --> Found desired version locally github.com/imdario/mergo 6633656539c1639d9d78127b7d47c622b5d7b6dc!
[INFO]    --> Found desired version locally github.com/juju/ratelimit 5b9ff866471762aa2ab2dced63c9fb6f53921342!
[INFO]    --> Found desired version locally github.com/mailru/easyjson d5b7844b561a7bc640052f1b935f7b800330d7e0!
[INFO]    --> Found desired version locally github.com/PuerkitoBio/purell 8a290539e2e8629dbc4e6bad948158f790ec31f4!
[INFO]    --> Found desired version locally github.com/PuerkitoBio/urlesc 5bd2802263f21d8788851d5305584c82a5c75d7e!
[INFO]    --> Found desired version locally github.com/spf13/pflag 9ff6c6923cfffbcd502984b8e0c80539a94968b7!
[INFO]    --> Found desired version locally github.com/ugorji/go ded73eae5db7e7a0ef6f55aace87a2873c5d2b74!
[INFO]    --> Found desired version locally golang.org/x/crypto d172538b2cfce0c13cee31e647d0367aa8cd2486!
[INFO]    --> Found desired version locally golang.org/x/net f2499483f923065a842d38eb4c7f1927e6fc6e6d!
[INFO]    --> Found desired version locally golang.org/x/sys 8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9!
[INFO]    --> Found desired version locally golang.org/x/text 2910a502d2bf9e43193af9d68ca516529614eed3!
[INFO]    --> Found desired version locally gopkg.in/inf.v0 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4!
[INFO]    --> Found desired version locally gopkg.in/yaml.v2 53feefa2559fb8dfa8d81baad31be332c97d6c77!
[INFO]    --> Found desired version locally k8s.io/api e012d1a19ed30848135c78dca93b6d6a0f82d9e0!
[INFO]    --> Found desired version locally k8s.io/apimachinery dc1f89aff9a7509782bde3b68824c8043a3e58cc!
[INFO]    --> Found desired version locally k8s.io/client-go 9675d048204baf818bb24f7c74d0e64f6254902e!
[INFO]    --> Fetching github.com/googleapis/gnostic.
[INFO]    --> Fetching github.com/golang/protobuf.
[INFO]    Setting references.
[INFO]    --> Setting version for github.com/go-openapi/jsonpointer to 46af16f9f7b149af66e5d1bd010e3574dc06de98.
[INFO]    --> Setting version for github.com/mailru/easyjson to d5b7844b561a7bc640052f1b935f7b800330d7e0.
[INFO]    --> Setting version for github.com/PuerkitoBio/purell to 8a290539e2e8629dbc4e6bad948158f790ec31f4.
[INFO]    --> Setting version for github.com/go-openapi/jsonreference to 13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272.
[INFO]    --> Setting version for github.com/golang/protobuf to 4bd1920723d7b7c925de087aa32e2187708897f7.
[INFO]    --> Setting version for github.com/PuerkitoBio/urlesc to 5bd2802263f21d8788851d5305584c82a5c75d7e.
[INFO]    --> Setting version for github.com/google/gofuzz to 44d81051d367757e1c7c6a5a86423ece9afcf63c.
[INFO]    --> Setting version for github.com/golang/glog to 44145f04b68cf362d9c4df2182967c2275eaefed.
[INFO]    --> Setting version for github.com/juju/ratelimit to 5b9ff866471762aa2ab2dced63c9fb6f53921342.
[INFO]    --> Setting version for github.com/gogo/protobuf to c0656edd0d9eab7c66d1eb0c568f9039345796f7.
[INFO]    --> Setting version for github.com/googleapis/gnostic to 68f4ded48ba9414dab2ae69b3f0d69971da73aa5.
[INFO]    --> Setting version for github.com/ghodss/yaml to 73d445a93680fa1a78ae23a5839bad48f32ba1ee.
[INFO]    --> Setting version for github.com/ugorji/go to ded73eae5db7e7a0ef6f55aace87a2873c5d2b74.
[INFO]    --> Setting version for github.com/imdario/mergo to 6633656539c1639d9d78127b7d47c622b5d7b6dc.
[INFO]    --> Setting version for github.com/go-openapi/spec to 6aced65f8501fe1217321abf0749d354824ba2ff.
[INFO]    --> Setting version for github.com/emicklei/go-restful-swagger12 to dcef7f55730566d41eae5db10e7d6981829720f6.
[INFO]    --> Setting version for github.com/davecgh/go-spew to 782f4967f2dc4564575ca782fe2d04090b5faca8.
[INFO]    --> Setting version for github.com/howeyc/gopass to bf9dde6d0d2c004a008c27aaee91170c786f6db8.
[INFO]    --> Setting version for github.com/hashicorp/golang-lru to a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4.
[INFO]    --> Setting version for github.com/spf13/pflag to 9ff6c6923cfffbcd502984b8e0c80539a94968b7.
[INFO]    --> Setting version for github.com/emicklei/go-restful to ff4f55a206334ef123e4f79bbf348980da81ca46.
[INFO]    --> Setting version for github.com/go-openapi/swag to 1d0bd113de87027671077d3c71eb3ac5d7dbba72.
[INFO]    --> Setting version for golang.org/x/net to f2499483f923065a842d38eb4c7f1927e6fc6e6d.
[INFO]    --> Setting version for golang.org/x/crypto to d172538b2cfce0c13cee31e647d0367aa8cd2486.
[INFO]    --> Setting version for golang.org/x/sys to 8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9.
[INFO]    --> Setting version for golang.org/x/text to 2910a502d2bf9e43193af9d68ca516529614eed3.
[INFO]    --> Setting version for k8s.io/api to e012d1a19ed30848135c78dca93b6d6a0f82d9e0.
[INFO]    --> Setting version for gopkg.in/yaml.v2 to 53feefa2559fb8dfa8d81baad31be332c97d6c77.
[INFO]    --> Setting version for gopkg.in/inf.v0 to 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4.
[INFO]    --> Setting version for k8s.io/client-go to 9675d048204baf818bb24f7c74d0e64f6254902e.
[INFO]    --> Setting version for k8s.io/apimachinery to dc1f89aff9a7509782bde3b68824c8043a3e58cc.
[INFO]    Exporting resolved dependencies...
[INFO]    --> Exporting github.com/davecgh/go-spew
[INFO]    --> Exporting github.com/emicklei/go-restful
[INFO]    --> Exporting github.com/ghodss/yaml
[INFO]    --> Exporting github.com/emicklei/go-restful-swagger12
[INFO]    --> Exporting github.com/go-openapi/jsonpointer
[INFO]    --> Exporting github.com/golang/glog
[INFO]    --> Exporting github.com/golang/protobuf
[INFO]    --> Exporting github.com/imdario/mergo
[INFO]    --> Exporting github.com/go-openapi/swag
[INFO]    --> Exporting github.com/google/gofuzz
[INFO]    --> Exporting github.com/PuerkitoBio/urlesc
[INFO]    --> Exporting github.com/go-openapi/jsonreference
[INFO]    --> Exporting github.com/hashicorp/golang-lru
[INFO]    --> Exporting github.com/spf13/pflag
[INFO]    --> Exporting github.com/PuerkitoBio/purell
[INFO]    --> Exporting github.com/ugorji/go
[INFO]    --> Exporting github.com/go-openapi/spec
[INFO]    --> Exporting github.com/juju/ratelimit
[INFO]    --> Exporting github.com/gogo/protobuf
[INFO]    --> Exporting github.com/mailru/easyjson
[INFO]    --> Exporting github.com/howeyc/gopass
[INFO]    --> Exporting github.com/googleapis/gnostic
[INFO]    --> Exporting golang.org/x/crypto
[INFO]    --> Exporting golang.org/x/net
[INFO]    --> Exporting golang.org/x/sys
[INFO]    --> Exporting k8s.io/api
[INFO]    --> Exporting golang.org/x/text
[INFO]    --> Exporting gopkg.in/yaml.v2
[INFO]    --> Exporting k8s.io/apimachinery
[INFO]    --> Exporting gopkg.in/inf.v0
[INFO]    --> Exporting k8s.io/client-go
[INFO]    Replacing existing vendor dependencies
rm -rf bin/%/namespace-rolebinding-operator
go build -v -i -o bin/namespace-rolebinding-operator ./cmd
../../treacher/namespace-rolebinding-operator/pkg/controller/controller.go:9:2: cannot find package "k8s.io/api/core/v1" in any of:
        /usr/local/Cellar/go/1.9/libexec/src/k8s.io/api/core/v1 (from $GOROOT)
        /Users/guga/.go/src/k8s.io/api/core/v1 (from $GOPATH)
../../treacher/namespace-rolebinding-operator/pkg/controller/controller.go:10:2: cannot find package "k8s.io/api/rbac/v1beta1" in any of:
        /usr/local/Cellar/go/1.9/libexec/src/k8s.io/api/rbac/v1beta1 (from $GOROOT)
        /Users/guga/.go/src/k8s.io/api/rbac/v1beta1 (from $GOPATH)
../../treacher/namespace-rolebinding-operator/pkg/controller/controller.go:11:2: cannot find package "k8s.io/apimachinery/pkg/apis/meta/v1" in any of:
        /usr/local/Cellar/go/1.9/libexec/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOROOT)
        /Users/guga/.go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOPATH)
../../treacher/namespace-rolebinding-operator/pkg/controller/controller.go:12:2: cannot find package "k8s.io/apimachinery/pkg/runtime" in any of:
        /usr/local/Cellar/go/1.9/libexec/src/k8s.io/apimachinery/pkg/runtime (from $GOROOT)
        /Users/guga/.go/src/k8s.io/apimachinery/pkg/runtime (from $GOPATH)
../../treacher/namespace-rolebinding-operator/pkg/controller/controller.go:13:2: cannot find package "k8s.io/apimachinery/pkg/watch" in any of:
        /usr/local/Cellar/go/1.9/libexec/src/k8s.io/apimachinery/pkg/watch (from $GOROOT)
        /Users/guga/.go/src/k8s.io/apimachinery/pkg/watch (from $GOPATH)
../../treacher/namespace-rolebinding-operator/pkg/controller/controller.go:14:2: cannot find package "k8s.io/client-go/kubernetes" in any of:
        /usr/local/Cellar/go/1.9/libexec/src/k8s.io/client-go/kubernetes (from $GOROOT)
        /Users/guga/.go/src/k8s.io/client-go/kubernetes (from $GOPATH)
../../treacher/namespace-rolebinding-operator/pkg/controller/controller.go:15:2: cannot find package "k8s.io/client-go/tools/cache" in any of:
        /usr/local/Cellar/go/1.9/libexec/src/k8s.io/client-go/tools/cache (from $GOROOT)
        /Users/guga/.go/src/k8s.io/client-go/tools/cache (from $GOPATH)
make: *** [build] Error 1
treacher commented 7 years ago

Interesting, I just deleted all my dependencies and cloned a fresh copy and it worked fine. What version of glide are you using? I'm using GO 1.9.

Edit: Have you cloned into $GOPATH/src/github.com/treacher/namespace-rolebinding-operator?

gugahoi commented 7 years ago

Built fine today :shrug: