TheNewNormal/corectl

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

leeparayno opened this issue · 1 comments

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

run dep ensure againe and retry