leonidlm / packer-builder-softlayer

A builder plugin for packer.io for a SoftLayer cloud
MIT License
38 stars 32 forks source link

Cannot build packer-builder-softlayer (conflicts with multistep) #34

Closed ldanielw1 closed 7 years ago

ldanielw1 commented 7 years ago

I cloned the repository per instructions in Readme of this repo, and tried to build. At first, I ran into these errors: builder/softlayer/step_create_ssh_key.go:4:2: cannot find package "code.google.com/p/gosshold/ssh" in any of: /aspera/usr/builder/packer/go/src/code.google.com/p/gosshold/ssh (from $GOROOT) /aspera/usr/builder/packer/gopath/src/code.google.com/p/gosshold/ssh (from $GOPATH)

builder/softlayer/builder.go:6:2: cannot find package "github.com/mitchellh/multistep" in any of: /aspera/usr/builder/packer/go/src/github.com/mitchellh/multistep (from $GOROOT) /aspera/usr/builder/packer/gopath/src/github.com/mitchellh/multistep (from $GOPATH)

builder/softlayer/ssh.go:7:2: cannot find package "golang.org/x/crypto/ssh" in any of: /aspera/usr/builder/packer/go/src/golang.org/x/crypto/ssh (from $GOROOT) /aspera/usr/builder/packer/gopath/src/golang.org/x/crypto/ssh (from $GOPATH)

But then I ran these commands: go get github.com/mitchellh/multistep go build github.com/mitchellh/multistep go get golang.org/x/crypto/ssh go build golang.org/x/crypto/ssh

I also replaced "code.google.com/p/gosshold/ssh" with "golang.org/x/crypto/ssh" in step_create_ssh_key.go, per instructions here: https://github.com/leonidlm/packer-builder-softlayer/issues/27

However, now I'm running into this issue: builder/softlayer/builder.go:202: 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

builder/softlayer/builder.go:203: 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

builder/softlayer/builder.go:205: 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)

What should i do to get builds running again?

ldanielw1 commented 7 years ago

This is also a problem with https://github.com/watson-platform/packer-builder-softlayer

blakfeld commented 7 years ago

Was there ever a resolution to this?

ldanielw1 commented 7 years ago

I had to downgrade my version of go to 1.6, and it started working.

ldanielw1 commented 7 years ago

er, that is, I had to use https://github.com/watson-platform/packer-builder-softlayer, and also downgrade go to 1.6. After that, we were in business.

blakfeld commented 7 years ago

Rock on, thanks for the answer!