hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.06k stars 3.32k forks source link

failed compiling packer on ubuntu xenial #4745

Closed lmayorga1980 closed 7 years ago

lmayorga1980 commented 7 years ago

I am trying to create a small dev/test environment to review PR's and contribute to the vmware-iso esxi builder.

Followed the instructions to use make but i get the following error below.

go version: go version go1.6.2 linux/amd64

ubuntu@ubuntu-xenial:~/go/src/github.com/mitchellh/packer$ make
go get github.com/mitchellh/gox
go get golang.org/x/tools/cmd/stringer
go get github.com/kardianos/govendor
^[[1;5Cgovendor sync
go generate .
2017/03/30 20:03:42 Generated command/plugin.go
gofmt -w command/plugin.go
/home/ubuntu/go/src/github.com/mitchellh/packer/scripts/gofmtcheck.sh $(find . -not -path "./vendor/*" -name "*.go")
==> Checking that code complies with gofmt requirements...
Check passed.
ok      github.com/mitchellh/packer     0.028s
ok      github.com/mitchellh/packer/builder/amazon/chroot       0.050s
ok      github.com/mitchellh/packer/builder/amazon/common       0.532s
ok      github.com/mitchellh/packer/builder/amazon/ebs  0.030s
ok      github.com/mitchellh/packer/builder/amazon/ebssurrogate 0.017s
ok      github.com/mitchellh/packer/builder/amazon/ebsvolume    0.029s
ok      github.com/mitchellh/packer/builder/amazon/instance     0.093s
ok      github.com/mitchellh/packer/builder/azure/arm   4.605s
ok      github.com/mitchellh/packer/builder/azure/common        0.020s
?       github.com/mitchellh/packer/builder/azure/common/constants      [no test files]
?       github.com/mitchellh/packer/builder/azure/common/lin    [no test files]
?       github.com/mitchellh/packer/builder/azure/common/logutil        [no test files]
ok      github.com/mitchellh/packer/builder/azure/common/template       0.029s
ok      github.com/mitchellh/packer/builder/azure/pkcs12        0.260s
ok      github.com/mitchellh/packer/builder/azure/pkcs12/rc2    0.007s
ok      github.com/mitchellh/packer/builder/cloudstack  0.056s
ok      github.com/mitchellh/packer/builder/digitalocean        0.060s
ok      github.com/mitchellh/packer/builder/docker      0.047s
ok      github.com/mitchellh/packer/builder/file        0.015s
ok      github.com/mitchellh/packer/builder/googlecompute       4.759s
ok      github.com/mitchellh/packer/builder/hyperv/common       0.016s
ok      github.com/mitchellh/packer/builder/hyperv/iso  0.047s
ok      github.com/mitchellh/packer/builder/null        0.021s
ok      github.com/mitchellh/packer/builder/oneandone   0.040s
ok      github.com/mitchellh/packer/builder/openstack   0.032s
ok      github.com/mitchellh/packer/builder/parallels/common    2.541s
ok      github.com/mitchellh/packer/builder/parallels/iso       0.048s
ok      github.com/mitchellh/packer/builder/parallels/pvm       0.028s
ok      github.com/mitchellh/packer/builder/profitbricks        0.016s
ok      github.com/mitchellh/packer/builder/qemu        0.077s
ok      github.com/mitchellh/packer/builder/triton      0.017s
ok      github.com/mitchellh/packer/builder/virtualbox/common   5.529s
ok      github.com/mitchellh/packer/builder/virtualbox/iso      0.058s
ok      github.com/mitchellh/packer/builder/virtualbox/ovf      0.028s
ok      github.com/mitchellh/packer/builder/vmware/common       5.342s
ok      github.com/mitchellh/packer/builder/vmware/iso  0.068s
ok      github.com/mitchellh/packer/builder/vmware/vmx  0.027s
ok      github.com/mitchellh/packer/command     0.182s
ok      github.com/mitchellh/packer/common      0.127s
ok      github.com/mitchellh/packer/common/json 0.006s
ok      github.com/mitchellh/packer/common/powershell   0.017s
?       github.com/mitchellh/packer/common/powershell/hyperv    [no test files]
?       github.com/mitchellh/packer/common/ssh  [no test files]
ok      github.com/mitchellh/packer/common/uuid 0.005s
ok      github.com/mitchellh/packer/communicator/none   0.017s
ok      github.com/mitchellh/packer/communicator/ssh    0.123s
ok      github.com/mitchellh/packer/communicator/winrm  0.065s
ok      github.com/mitchellh/packer/fix 0.013s
ok      github.com/mitchellh/packer/helper/builder/testing      0.023s
ok      github.com/mitchellh/packer/helper/communicator 0.013s
ok      github.com/mitchellh/packer/helper/config       0.021s
?       github.com/mitchellh/packer/helper/enumflag     [no test files]
ok      github.com/mitchellh/packer/helper/flag-kv      0.013s
ok      github.com/mitchellh/packer/helper/flag-slice   0.020s
ok      github.com/mitchellh/packer/packer      0.270s
ok      github.com/mitchellh/packer/packer/plugin       0.330s
ok      github.com/mitchellh/packer/packer/rpc  0.192s
ok      github.com/mitchellh/packer/plugin/example      0.023s
?       github.com/mitchellh/packer/post-processor/amazon-import        [no test files]
ok      github.com/mitchellh/packer/post-processor/artifice     0.010s
ok      github.com/mitchellh/packer/post-processor/atlas        0.019s
ok      github.com/mitchellh/packer/post-processor/checksum     0.017s
ok      github.com/mitchellh/packer/post-processor/compress     0.049s
ok      github.com/mitchellh/packer/post-processor/docker-import        0.024s
ok      github.com/mitchellh/packer/post-processor/docker-push  0.014s
ok      github.com/mitchellh/packer/post-processor/docker-save  0.013s
ok      github.com/mitchellh/packer/post-processor/docker-tag   0.016s
ok      github.com/mitchellh/packer/post-processor/googlecompute-export 0.012s
?       github.com/mitchellh/packer/post-processor/manifest     [no test files]
ok      github.com/mitchellh/packer/post-processor/shell-local  0.029s
ok      github.com/mitchellh/packer/post-processor/vagrant      0.022s
ok      github.com/mitchellh/packer/post-processor/vagrant-cloud        0.011s
ok      github.com/mitchellh/packer/post-processor/vsphere      0.011s
ok      github.com/mitchellh/packer/provisioner 0.008s
ok      github.com/mitchellh/packer/provisioner/ansible 0.146s
ok      github.com/mitchellh/packer/provisioner/ansible-local   0.024s
ok      github.com/mitchellh/packer/provisioner/chef-client     0.025s
# github.com/mitchellh/packer/provisioner/converge
provisioner/converge/provisioner_test.go:30: t.Run undefined (type *testing.T has no field or method Run)
provisioner/converge/provisioner_test.go:31: t.Run undefined (type *testing.T has no field or method Run)
provisioner/converge/provisioner_test.go:46: t.Run undefined (type *testing.T has no field or method Run)
provisioner/converge/provisioner_test.go:61: t.Run undefined (type *testing.T has no field or method Run)
provisioner/converge/provisioner_test.go:77: t.Run undefined (type *testing.T has no field or method Run)
provisioner/converge/provisioner_test.go:78: t.Run undefined (type *testing.T has no field or method Run)
provisioner/converge/provisioner_test.go:79: t.Run undefined (type *testing.T has no field or method Run)
provisioner/converge/provisioner_test.go:92: t.Run undefined (type *testing.T has no field or method Run)
provisioner/converge/provisioner_test.go:106: t.Run undefined (type *testing.T has no field or method Run)
ok      github.com/mitchellh/packer/provisioner/chef-solo       0.034s
FAIL    github.com/mitchellh/packer/provisioner/converge [build failed]
ok      github.com/mitchellh/packer/provisioner/file    0.019s
ok      github.com/mitchellh/packer/provisioner/powershell      0.215s
ok      github.com/mitchellh/packer/provisioner/puppet-masterless       0.032s
ok      github.com/mitchellh/packer/provisioner/puppet-server   0.020s
ok      github.com/mitchellh/packer/provisioner/salt-masterless 0.025s
ok      github.com/mitchellh/packer/provisioner/shell   0.031s
ok      github.com/mitchellh/packer/provisioner/shell-local     0.015s
ok      github.com/mitchellh/packer/provisioner/windows-restart 0.197s
ok      github.com/mitchellh/packer/provisioner/windows-shell   0.187s
?       github.com/mitchellh/packer/scripts     [no test files]
ok      github.com/mitchellh/packer/template    0.055s
ok      github.com/mitchellh/packer/template/interpolate        0.012s
?       github.com/mitchellh/packer/version     [no test files]
Makefile:60: recipe for target 'test' failed
make: *** [test] Error 2
mwhooker commented 7 years ago

Thanks for the report @lmayorga1980. We only support the latest version of go for packer. Can you try upgrading to 1.8 and seeing if compiling works? (It should work in 1.7, too, but best to use the latest).

Reply here if it doesn't work and I'll reopen

lmayorga1980 commented 7 years ago

Ok 👍. Seems like ubuntu keeps an old version 1.6