Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Can't build executable kube-aws from the lastest release source code. #87

Closed
zhangtiny123 opened this issue Nov 23, 2016 · 5 comments
Closed
Labels
triage/support Indicates an issue that is a support question.

Comments

@zhangtiny123
Copy link

I must say that I'm not familiar with Go now...

Download the source code package
And try to run ./build, but failed with NOT a git repo

Then I cloned the repo, and run ./build
Some packages could not found at GOROOT and GOPATH, I noticed there a glide.yaml and glide.lock file, so try to install glide and run glide install .
And there's a warning:
[WARN] The name listed in the config file (github.com/coreos/kube-aws) does not match the current location (.)

Continue to run ./build command, and still raise errors:

Building kube-aws for GOOS=linux GOARCH=amd64 Building kube-aws df86ecf75b30cc80b8994699bdf31832cbee6257 cmd/kube-aws/command_destroy.go:8:2: cannot find package "github.com/coreos/kube-aws/cluster" in any of: $GOROOT/src/github.com/coreos/kube-aws/cluster (from $GOROOT) $GOPATH/src/github.com/coreos/kube-aws/cluster (from $GOPATH) cmd/kube-aws/command_destroy.go:9:2: cannot find package "github.com/coreos/kube-aws/config" in any of: $GOROOT/src/github.com/coreos/kube-aws/config (from $GOROOT) $GOPATH/src/github.com/coreos/kube-aws/config (from $GOPATH) cmd/kube-aws/command_render.go:16:2: cannot find package "github.com/coreos/kube-aws/tlsutil" in any of: $GOROOT/src/github.com/coreos/kube-aws/tlsutil (from $GOROOT) $GOPATH/src/github.com/coreos/kube-aws/tlsutil (from $GOPATH) cmd/kube-aws/command_destroy.go:6:2: cannot find package "github.com/spf13/cobra" in any of: $GOROOT/src/github.com/spf13/cobra (from $GOROOT) $GOPATH/src/github.com/spf13/cobra (from $GOPATH)

glide list shows:

INFO] Package github.com/aws/aws-sdk-go/aws/awserr found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/awserr [INFO] Package github.com/aws/aws-sdk-go/aws/credentials found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/credentials [INFO] Package github.com/aws/aws-sdk-go/aws/client found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/client [INFO] Package github.com/aws/aws-sdk-go/aws/corehandlers found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/corehandlers [INFO] Package github.com/aws/aws-sdk-go/aws/credentials/stscreds found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/credentials/stscreds [INFO] Package github.com/aws/aws-sdk-go/aws/defaults found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/defaults [INFO] Package github.com/aws/aws-sdk-go/aws/request found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/request [INFO] Package github.com/aws/aws-sdk-go/private/endpoints found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/endpoints [INFO] Package github.com/go-ini/ini found in vendor/ folder [WARN] Version not set for package github.com/go-ini/ini [INFO] Package github.com/aws/aws-sdk-go/aws/awsutil found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/awsutil [INFO] Package github.com/aws/aws-sdk-go/aws/client/metadata found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/client/metadata [INFO] Package github.com/aws/aws-sdk-go/aws/signer/v4 found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/signer/v4 [INFO] Package github.com/aws/aws-sdk-go/private/protocol found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/protocol [INFO] Package github.com/aws/aws-sdk-go/private/protocol/query found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/protocol/query [INFO] Package github.com/aws/aws-sdk-go/private/waiter found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/waiter [INFO] Package github.com/aws/aws-sdk-go/private/protocol/ec2query found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/protocol/ec2query [INFO] Package github.com/aws/aws-sdk-go/private/protocol/restxml found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/protocol/restxml [WARN] Package github.com/coreos/kube-aws/config is not installed [INFO] Not found in vendor/: github.com/coreos/kube-aws/config (1) [WARN] Package github.com/coreos/kube-aws/cluster is not installed [INFO] Not found in vendor/: github.com/coreos/kube-aws/cluster (1) [WARN] Package github.com/coreos/kube-aws/tlsutil is not installed [INFO] Not found in vendor/: github.com/coreos/kube-aws/tlsutil (1) [INFO] Package github.com/inconshreveable/mousetrap found in vendor/ folder [WARN] Version not set for package github.com/inconshreveable/mousetrap [INFO] Package github.com/spf13/pflag found in vendor/ folder [WARN] Version not set for package github.com/spf13/pflag [INFO] Package github.com/aws/aws-sdk-go/private/protocol/jsonrpc found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/protocol/jsonrpc [INFO] Package github.com/coreos/coreos-cloudinit/config found in vendor/ folder [WARN] Version not set for package github.com/coreos/coreos-cloudinit/config [INFO] Package github.com/coreos/yaml found in vendor/ folder [WARN] Version not set for package github.com/coreos/yaml [WARN] Package github.com/coreos/kube-aws/coreosutil is not installed [INFO] Not found in vendor/: github.com/coreos/kube-aws/coreosutil (1) [INFO] Package github.com/aws/aws-sdk-go/service/sts found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/service/sts [INFO] Package github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds [INFO] Package github.com/aws/aws-sdk-go/aws/credentials/endpointcreds found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/credentials/endpointcreds [INFO] Package github.com/aws/aws-sdk-go/aws/ec2metadata found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/aws/ec2metadata [INFO] Package github.com/jmespath/go-jmespath found in vendor/ folder [WARN] Version not set for package github.com/jmespath/go-jmespath [INFO] Package github.com/aws/aws-sdk-go/private/protocol/rest found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/protocol/rest [INFO] Package github.com/aws/aws-sdk-go/private/protocol/query/queryutil found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/protocol/query/queryutil [INFO] Package github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil [INFO] Package github.com/aws/aws-sdk-go/private/protocol/json/jsonutil found in vendor/ folder [WARN] Version not set for package github.com/aws/aws-sdk-go/private/protocol/json/jsonutil [ERROR] Error listing dependencies: Error resolving imports

Then I reset the changes from glide install, and use go get to install the missing deps, run command ./build again and show the following:
`Building kube-aws df86ecf

# _$HOME/kube-aws/cmd/kube-aws
cmd/kube-aws/command_init.go:60: undefined: config.DefaultClusterConfig
cmd/kube-aws/command_render.go:93: undefined: config.KubeConfigTemplate
cmd/kube-aws/command_render.go:109: undefined: config.CloudConfigController
cmd/kube-aws/command_render.go:110: undefined: config.CloudConfigWorker
cmd/kube-aws/command_render.go:111: undefined: config.CloudConfigEtcd
cmd/kube-aws/command_render.go:112: undefined: config.StackTemplateTemplate`

Could you please give some suggestions or release a binary package?

@pieterlange
Copy link
Contributor

Yes, it looks like something is wrong with your build environment.

https://github.com/coreos/kube-aws/releases/tag/v0.9.1 was released 10 hours ago, a signed binary should appear soon (when the CoreOS folks like @colhom @robszumski @aaronlevy find the right button 😆)

@bookshelfdave
Copy link

I'm having build issues with the 0.9.1 release as well:

ε 09:24:27 ~/src/kube-aws ((v0.9.1))$ make
./build
Building kube-aws v0.9.1
# _/Users/dparfitt/src/kube-aws/cmd/kube-aws
cmd/kube-aws/command_init.go:60: undefined: config.DefaultClusterConfig
cmd/kube-aws/command_render.go:93: undefined: config.KubeConfigTemplate
cmd/kube-aws/command_render.go:109: undefined: config.CloudConfigController
cmd/kube-aws/command_render.go:110: undefined: config.CloudConfigWorker
cmd/kube-aws/command_render.go:111: undefined: config.CloudConfigEtcd
cmd/kube-aws/command_render.go:112: undefined: config.StackTemplateTemplate
make: *** [build] Error 2

Note, trying to compile the source tarball gives me:

ε 09:24:05 ~/Downloads/kube-aws-0.9.1$ make
./build
fatal: Not a git repository (or any of the parent directories): .git
make: *** [build] Error 128

@pieterlange
Copy link
Contributor

Ref #90 add some Go build instructions. I just know what works for me 👍

@mumoshu
Copy link
Contributor

mumoshu commented Nov 24, 2016

Hi @zhangtiny123, thanks for trying kube-aws!

I guess you should git clone kube-aws repo into $GOPATH/src/github.com/coreos/kube-aws.
An error message like cannot find package "github.com/coreos/kube-aws/cluster" in any of: ... $GOPATH/src/github.com/coreos/kube-aws/cluster does indicate that you've git cloned the repo to somewhere outside of $GOPATH therefore go, which expects all the packages including the one going to be built to be locatable under $GOPATH, ends up complaining like that.

glide install shouldn't be needed as all the required packages are already managed by git/saved under the vendor/ directory.

@mumoshu mumoshu added the triage/support Indicates an issue that is a support question. label Nov 24, 2016
@mumoshu mumoshu mentioned this issue Nov 24, 2016
19 tasks
@zhangtiny123
Copy link
Author

Thank you @mumoshu , it's really helpful !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

4 participants