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

Build on OS X Fails with "cannot use cmd.Flags()" #127

Open
leeparayno opened this issue Apr 4, 2018 · 1 comment
Open

Build on OS X Fails with "cannot use cmd.Flags()" #127

leeparayno opened this issue Apr 4, 2018 · 1 comment

Comments

@leeparayno
Copy link

leeparayno commented Apr 4, 2018

Trying to build on OS X 10.12.6 (Sierra):

/bin/cp hyperkit/build/hyperkit /Users/xxxxxxx/code/kubernetes/corectl/bin/corectld.runner
/bin/rm -rf examples/dtrace
cd hyperkit;
/usr/bin/sed -i.bak -e "s,hyperkit,corectld.runner,g" dtrace/.d;
/bin/rm -rf dtrace/
.bak ;
/bin/cp -r dtrace ../examples
/bin/rm -rf /Users/xxxxxxx/code/kubernetes/corectl/bin/corectl
/bin/rm -rf /Users/xxxxxxx/code/kubernetes/corectl/bin/corectld
/bin/mkdir -p /Users/xxxxxxx/code/kubernetes/corectl/bin
cd cmd; GOPATH=/Users/xxxxxxx/code/GoLang GO15VENDOREXPERIMENT=1 GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -o /Users/xxxxxxx/code/kubernetes/corectl/bin/corectl
-gcflags "" -ldflags " -w -s -X github.com/TheNewNormal/corectl/release.Version=v0.7.18-21-gf9d212+untagged -X github.com/TheNewNormal/corectl/release.BuildDate=2018-04-04T14:52:22PDT"

_/Users/xxxxxxx/code/kubernetes/corectl/cmd

./halt.go:32:47: cannot use cmd.Flags() (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/TheNewNormal/corectl/vendor/github.com/spf13/pflag".FlagSet in argument to session.Caller.CmdLine.BindPFlags
./load.go:46:47: cannot use cmd.Flags() (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/TheNewNormal/corectl/vendor/github.com/spf13/pflag".FlagSet in argument to session.Caller.CmdLine.BindPFlags
./main.go:60:28: cannot use cmd.Flags() (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/TheNewNormal/corectl/vendor/github.com/spf13/pflag".FlagSet in argument to cli.BindPFlags
./main.go:123:59: cannot use rootCmd.PersistentFlags() (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/TheNewNormal/corectl/vendor/github.com/spf13/pflag".FlagSet in argument to session.Caller.CmdLine.BindPFlags
./panic.go:36:47: cannot use cmd.Flags() (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/TheNewNormal/corectl/vendor/github.com/spf13/pflag".FlagSet in argument to session.Caller.CmdLine.BindPFlags
./ps.go:43:47: cannot use cmd.Flags() (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/TheNewNormal/corectl/vendor/github.com/spf13/pflag".FlagSet in argument to session.Caller.CmdLine.BindPFlags
./run.go:52:26: cannot use cli (type *"github.com/TheNewNormal/corectl/vendor/github.com/spf13/viper".Viper) as type *"github.com/spf13/viper".Viper in argument to vmBootstrap
./server.go:97:21: multiple-value mack.Tell() in single-value context
./ssh.go:34:47: cannot use cmd.Flags() (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/TheNewNormal/corectl/vendor/github.com/spf13/pflag".FlagSet in argument to session.Caller.CmdLine.BindPFlags
./ssh.go:50:47: cannot use cmd.Flags() (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/TheNewNormal/corectl/vendor/github.com/spf13/pflag".FlagSet in argument to session.Caller.CmdLine.BindPFlags
./ssh.go:50:47: too many errors
make: *** [cmd] Error 2
$ ./halt.go:32:47: cannot use cmd.Flags() (type *"github.com/spf13/pflag".FlagSet)
-bash: syntax error near unexpected token (' $ $ ./halt.go:32:47: cannot use cmd.Flags() (type *"github.com/spf13/pflag".FlagSet) -bash: syntax error near unexpected token ('

Running pflag tests appears "OK"

$ go test github.com/spf13/pflag
ok github.com/spf13/pflag 0.014s

@polderudo
Copy link

run dep ensure againe and retry

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

2 participants