diff --git a/hack/make/cross b/hack/make/cross index d4dbb369a6..94d2ddf678 100644 --- a/hack/make/cross +++ b/hack/make/cross @@ -31,6 +31,11 @@ for platform in $DOCKER_CROSSPLATFORMS; do if [ "$GOOS" != "solaris" ]; then # TODO. Solaris cannot be cross build because of CGO calls. + + # go install docker/docker/pkg packages to ensure that + # they build cross platform. + go install github.com/docker/docker/pkg/... + if [ -z "${daemonSupporting[$platform]}" ]; then # we just need a simple client for these platforms export LDFLAGS_STATIC_DOCKER="" diff --git a/pkg/devicemapper/devmapper.go b/pkg/devicemapper/devmapper.go index d970c542c9..07161d43e8 100644 --- a/pkg/devicemapper/devmapper.go +++ b/pkg/devicemapper/devmapper.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,cgo package devicemapper diff --git a/pkg/devicemapper/devmapper_log.go b/pkg/devicemapper/devmapper_log.go index 8477e36fec..7dd0c60891 100644 --- a/pkg/devicemapper/devmapper_log.go +++ b/pkg/devicemapper/devmapper_log.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,cgo package devicemapper diff --git a/pkg/devicemapper/devmapper_wrapper.go b/pkg/devicemapper/devmapper_wrapper.go index 91fbc85b3a..4f270fba0b 100644 --- a/pkg/devicemapper/devmapper_wrapper.go +++ b/pkg/devicemapper/devmapper_wrapper.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,cgo package devicemapper diff --git a/pkg/devicemapper/devmapper_wrapper_deferred_remove.go b/pkg/devicemapper/devmapper_wrapper_deferred_remove.go index dc361eab76..5bdd97d9c0 100644 --- a/pkg/devicemapper/devmapper_wrapper_deferred_remove.go +++ b/pkg/devicemapper/devmapper_wrapper_deferred_remove.go @@ -1,4 +1,4 @@ -// +build linux,!libdm_no_deferred_remove +// +build linux,cgo,!libdm_no_deferred_remove package devicemapper diff --git a/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go b/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go index 8249ccf854..968b2ce0c0 100644 --- a/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go +++ b/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go @@ -1,4 +1,4 @@ -// +build linux,libdm_no_deferred_remove +// +build linux,cgo,libdm_no_deferred_remove package devicemapper diff --git a/pkg/devicemapper/ioctl.go b/pkg/devicemapper/ioctl.go index 581b57eb86..b745291442 100644 --- a/pkg/devicemapper/ioctl.go +++ b/pkg/devicemapper/ioctl.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,cgo package devicemapper diff --git a/pkg/loopback/attach_loopback.go b/pkg/loopback/attach_loopback.go index 971f45eb48..dafa94bede 100644 --- a/pkg/loopback/attach_loopback.go +++ b/pkg/loopback/attach_loopback.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,cgo package loopback diff --git a/pkg/loopback/ioctl.go b/pkg/loopback/ioctl.go index 0714eb5f87..ea6841958d 100644 --- a/pkg/loopback/ioctl.go +++ b/pkg/loopback/ioctl.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,cgo package loopback diff --git a/pkg/loopback/loop_wrapper.go b/pkg/loopback/loop_wrapper.go index e1100ce156..a50de7f07a 100644 --- a/pkg/loopback/loop_wrapper.go +++ b/pkg/loopback/loop_wrapper.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,cgo package loopback diff --git a/pkg/loopback/loopback.go b/pkg/loopback/loopback.go index bc0479284c..c2d91da6f0 100644 --- a/pkg/loopback/loopback.go +++ b/pkg/loopback/loopback.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,cgo package loopback diff --git a/pkg/plugins/plugins_linux.go b/pkg/plugins/plugins_unix.go similarity index 91% rename from pkg/plugins/plugins_linux.go rename to pkg/plugins/plugins_unix.go index 9c5a0b5632..02f1da69a1 100644 --- a/pkg/plugins/plugins_linux.go +++ b/pkg/plugins/plugins_unix.go @@ -1,3 +1,5 @@ +// +build !windows + package plugins // BasePath returns the path to which all paths returned by the plugin are relative to.