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

Error while building gru #52

Closed
apolegoshko opened this issue Dec 13, 2017 · 3 comments
Closed

Error while building gru #52

apolegoshko opened this issue Dec 13, 2017 · 3 comments

Comments

@apolegoshko
Copy link

apolegoshko commented Dec 13, 2017

Hi,

I'm getting the output below, while trying to build gru after downloading it from github. Could you please take a look ?

root@pc:/home/user/go/gru#

ls
catalog classifier client contrib docs graph gructl integration LICENSE main.go Makefile minion README.md resource site task utils version
root@pc:/home/user/go/gru# make
go get -v -t -d ./...
github.com/dnaeon/gru (download)
created GOPATH=/root/go; see 'go help gopath'
github.com/coreos/etcd (download)
github.com/coreos/go-semver (download)
github.com/ugorji/go (download)
github.com/deckarep/golang-set (download)
github.com/blang/semver (download)
github.com/coreos/go-systemd (download)
github.com/godbus/dbus (download)
github.com/coreos/pkg (download)
github.com/pborman/uuid (download)
github.com/vmware/govmomi (download)
github.com/yuin/gopher-lua (download)
Fetching https://layeh.com/gopher-luar?go-get=1
Parsing meta tags from https://layeh.com/gopher-luar?go-get=1 (status code 200)
get "layeh.com/gopher-luar": found meta tag get.metaImport{Prefix:"layeh.com/gopher-luar", VCS:"git", RepoRoot:"https://github.com/layeh/gopher-luar"} at https://layeh.com/gopher-luar?go-get=1
layeh.com/gopher-luar (download)
github.com/dnaeon/backoff (download)
github.com/gosuri/uiprogress (download)
github.com/gosuri/uilive (download)
github.com/gosuri/uitable (download)
github.com/mattn/go-runewidth (download)
github.com/urfave/cli (download)
github.com/dnaeon/go-vcr (download)
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
go build -ldflags="-s -w" -o bin/gructl -v
github.com/coreos/etcd/pkg/pathutil
github.com/coreos/etcd/pkg/types
github.com/coreos/go-semver/semver
github.com/ugorji/go/codec
github.com/deckarep/golang-set
github.com/coreos/etcd/version
github.com/blang/semver
github.com/coreos/etcd/pkg/srv
github.com/godbus/dbus
github.com/dnaeon/gru/graph
github.com/coreos/pkg/dlopen
github.com/pborman/uuid
github.com/dnaeon/gru/utils
github.com/vmware/govmomi/vim25/debug
github.com/vmware/govmomi/vim25/progress
github.com/vmware/govmomi/vim25/types
github.com/coreos/go-systemd/util
github.com/coreos/go-systemd/dbus
github.com/vmware/govmomi/vim25/xml
github.com/yuin/gopher-lua/ast
github.com/yuin/gopher-lua/parse
github.com/yuin/gopher-lua/pm
github.com/yuin/gopher-lua
github.com/dnaeon/gru/classifier
github.com/dnaeon/backoff
github.com/dnaeon/gru/task
github.com/gosuri/uilive
github.com/gosuri/uiprogress/util/strutil
github.com/gosuri/uiprogress
github.com/mattn/go-runewidth
github.com/gosuri/uitable/util/strutil
github.com/gosuri/uitable/util/wordwrap
github.com/gosuri/uitable
github.com/urfave/cli
github.com/dnaeon/gru/version
layeh.com/gopher-luar
github.com/coreos/etcd/client
github.com/vmware/govmomi/vim25/soap
github.com/vmware/govmomi/vim25/methods
github.com/vmware/govmomi/vim25
github.com/vmware/govmomi/vim25/mo
github.com/vmware/govmomi/property
github.com/vmware/govmomi/session
github.com/vmware/govmomi/list
github.com/vmware/govmomi/nfc
github.com/vmware/govmomi/task
github.com/vmware/govmomi
github.com/vmware/govmomi/object
github.com/vmware/govmomi/find
github.com/dnaeon/gru/resource

github.com/dnaeon/gru/resource

/root/go/src/github.com/dnaeon/gru/resource/vsphere_cluster.go:134:18: obj.ReconfigureCluster undefined (type *object.ClusterComputeResource has no field or method ReconfigureCluster)
Makefile:4: recipe for target 'build' failed
make: *** [build] Error 2

@dnaeon
Copy link
Owner

dnaeon commented Dec 14, 2017

Seems like dependencies have been updated. I'll look at this one tomorrow and vendor the dependencies.

@purpleidea
Copy link

purpleidea commented Dec 14, 2017 via email

@dnaeon
Copy link
Owner

dnaeon commented Dec 15, 2017

@purpleidea You are right about that, but unfortunately upstream dependencies tend to break API compatibility from time to time and that causes issues in the long run.

I'd like to avoid vendoring large dependencies, but unfortunately I don't have enough spare time these days to spend time fixing issues caused by upstream changes.

Also turned out there is an issue in recent versions of etcd, which is not yet fixed, and causes build issues as well.

Here are the steps that I've followed in order to build the project.

go version
go version go1.9.2 darwin/amd64

Build the project by following these steps. Running below command would initially fail with the errors you've seen already.

go get -v github.com/dnaeon/gru

Get the dep tool.

go get -v -u github.com/golang/dep/cmd/dep

Now vendor the dependencies by executing below command.

cd $GOPATH/src/github.com/dnaeon/gru
dep init

At this point if you try and build the project you would hit the etcd issue described in etcd-io/etcd#8715 . Until this one gets fixed you need to remove the generated file, so it will be re-generated during build.

rm vendor/github.com/coreos/etcd/client/keys.generated.go

Now you should be able to build the project just fine.

make

The resulting binary is located in bin/ directory.

I've also built and uploaded binary releases of Darwin and Linux available here.

@dnaeon dnaeon closed this as completed Dec 15, 2017
@dnaeon dnaeon reopened this Dec 15, 2017
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

No branches or pull requests

3 participants