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

Unable to build packer plugin #786

Open
akry opened this issue May 31, 2016 · 5 comments
Open

Unable to build packer plugin #786

akry opened this issue May 31, 2016 · 5 comments

Comments

@akry
Copy link
Contributor

akry commented May 31, 2016

Since the latest commit on packer-builder branch it is unable to do go build. Here is the error message:

[root@packer packer-builder-wakamevdc]# go get
# github.com/axsh/wakame-vdc/client/packer-builder-wakamevdc/wakamevdc
/root/newgo/src/github.com/axsh/wakame-vdc/client/packer-builder-wakamevdc/wakamevdc/builder.go:56: cannot use commHost (type func("github.com/mitchellh/multistep".StateBag) (string, error)) as type func("github.com/mitchellh/packer/vendor/github.com/mitchellh/multistep".StateBag) (string, error) in field value
/root/newgo/src/github.com/axsh/wakame-vdc/client/packer-builder-wakamevdc/wakamevdc/builder.go:57: cannot use sshConfig (type func("github.com/mitchellh/multistep".StateBag) (*"golang.org/x/crypto/ssh".ClientConfig, error)) as type func("github.com/mitchellh/packer/vendor/github.com/mitchellh/multistep".StateBag) (*"github.com/mitchellh/packer/vendor/golang.org/x/crypto/ssh".ClientConfig, error) in field value
/root/newgo/src/github.com/axsh/wakame-vdc/client/packer-builder-wakamevdc/wakamevdc/builder.go:59: cannot use new(common.StepProvision) (type *common.StepProvision) as type "github.com/mitchellh/multistep".Step in array or slice literal:
        *common.StepProvision does not implement "github.com/mitchellh/multistep".Step (wrong type for Cleanup method)
                have Cleanup("github.com/mitchellh/packer/vendor/github.com/mitchellh/multistep".StateBag)
                want Cleanup("github.com/mitchellh/multistep".StateBag)
/root/newgo/src/github.com/axsh/wakame-vdc/client/packer-builder-wakamevdc/wakamevdc/builder.go:69: cannot use common.MultistepDebugFn(ui) (type "github.com/mitchellh/packer/vendor/github.com/mitchellh/multistep".DebugPauseFn) as type "github.com/mitchellh/multistep".DebugPauseFn in field value
/root/newgo/src/github.com/axsh/wakame-vdc/client/packer-builder-wakamevdc/wakamevdc/config.go:46: cannot use &md (type *"github.com/mitchellh/mapstructure".Metadata) as type *"github.com/mitchellh/packer/vendor/github.com/mitchellh/mapstructure".Metadata in field value

This is due to the source code is already obsoleted. Some interfaces used in the code base must be referenced by different import path. Simply replacing the old import paths to the latest ones does not work at all because go does not allow users to import packages directly from vendor directory of the dependency.

@akry
Copy link
Contributor Author

akry commented Jun 1, 2016

Seems like it's known issue.

go get github.com/mitchellh/packer
cd $GOPATH/src/github.com/mitchellh/packer
godep restore

then build your own go project.

@akry
Copy link
Contributor Author

akry commented Jun 1, 2016

$ godep restore
...
godep: Downloading dependency (if needed): gopkg.in/fsnotify.v1

resolving this dependency take soooo long time...

@akry
Copy link
Contributor Author

akry commented Jun 1, 2016

The solution does not solve anything unfortunately... :(

@ghost
Copy link

ghost commented Aug 10, 2016

@akry Have you fixed the issue? any solution ?

@akry
Copy link
Contributor Author

akry commented Aug 15, 2016

@thatcabbage @unakatsuo solved this issue. The building procedure is written on the another page.

https://github.com/axsh/wakame-vdc/tree/packer-builder/client/packer-builder-wakamevdc

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

1 participant