and here is the patch... (thanks Fernando)


On Wed, 2 Dec 2015 15:00:06 +0100, Frederic Bonnard <[email protected]> wrote:
> Source: docker.io
> Source-Version: 1.8.3~ds1-2
> Tags: patch
> User: [email protected]
> Usertags: ppc64el
> 
> --
> 
> 
> Hello,
> golang 1.5.1 his available for debian so, but docker.io fails to build on
> ppc64el.
> 
> I found 2 problems : 
> 
> 1. compilation problem with some flag :
> ---------
> +++ go build -o bundles/1.8.3/dynbinary/dockerinit-1.8.3 -a -tags 'netgo 
> static_build apparmor selinux daemon' -installsuffix netgo -ldflags '
>     -w
>     -linkmode external
>     -extldflags "-static"
>   ' ./dockerinit
> # _/home/debian/docker.io-1.8.3~ds1/dockerinit
> 2015/12/01 15:15:39 cannot use -linkmode=external with -H linux
> debian/rules:59: recipe for target 'override_dh_auto_build' failed
> ---------
>  So I added a section similar to one already in hack/make.sh for windows
>  that prevent to use -linkmode external in linux case.
>  This may not be the best way as it was suppose to build as-is on linux.
>  I tried to check on amd64, but I can't build because of missing dependency on
>  golang-github-docker-notary-dev which requires golang-golang-x-crypto-dev
>  which seems unavailable on sid...
> 
> 2. A compilation error on ppc64el :
> ---------
> +++ go build -o bundles/1.8.3/dynbinary/docker-1.8.3 -a -tags 'apparmor 
> selinux daemon' -installsuffix netgo -ldflags '
>     -w
>     
>   ' ./docker
> # github.com/docker/libnetwork/drivers/bridge
> .gopath/src/github.com/docker/libnetwork/drivers/bridge/netlink_deprecated_linux.go:108:
>  cannot use ifrDataByte(hw[i]) (type int8) as type uint8 in assignment
> debian/rules:59: recipe for target 'override_dh_auto_build' failed
> ---------
> Looking for that I stumbled on https://github.com/docker/docker/issues/13856 .
> I adapted the fix for docker 1.8 in debian.
> 
> The package built after that.
> 
> F.
diff -Nru docker.io-1.8.3~ds1/debian/patches/ppc64el-fixes docker.io-1.8.3~ds1/debian/patches/ppc64el-fixes
--- docker.io-1.8.3~ds1/debian/patches/ppc64el-fixes	1970-01-01 00:00:00.000000000 +0000
+++ docker.io-1.8.3~ds1/debian/patches/ppc64el-fixes	2015-12-01 16:58:48.000000000 +0000
@@ -0,0 +1,29 @@
+--- a/hack/make.sh
++++ b/hack/make.sh
+@@ -140,6 +140,10 @@
+ if [ "$(go env GOOS)" == 'windows' ]; then
+ 	LDFLAGS_STATIC=''
+ fi
++# Cgo -H linux is incompatible with -linkmode external.
++if [ "$(go env GOOS)" == 'linux' ]; then
++	LDFLAGS_STATIC=''
++fi
+ EXTLDFLAGS_STATIC='-static'
+ # ORIG_BUILDFLAGS is necessary for the cross target which cannot always build
+ # with options like -race.
+--- a/libnetwork/drivers/bridge/netlink_deprecated_linux_armppc64.go
++++ b/libnetwork/drivers/bridge/netlink_deprecated_linux_armppc64.go
+@@ -1,4 +1,4 @@
+-// +build arm ppc64
++// +build arm ppc64 ppc64le
+ 
+ package bridge
+ 
+--- a/libnetwork/drivers/bridge/netlink_deprecated_linux_notarm.go
++++ b/libnetwork/drivers/bridge/netlink_deprecated_linux_notarm.go
+@@ -1,4 +1,4 @@
+-// +build !arm,!ppc64
++// +build !arm,!ppc64,!ppc64le
+ 
+ package bridge
+ 
diff -Nru docker.io-1.8.3~ds1/debian/patches/series docker.io-1.8.3~ds1/debian/patches/series
--- docker.io-1.8.3~ds1/debian/patches/series	2015-11-04 08:08:49.000000000 +0000
+++ docker.io-1.8.3~ds1/debian/patches/series	2015-12-01 15:42:36.000000000 +0000
@@ -17,3 +17,4 @@
 
 overlay.patch
 cgroupdriver-cgroupfs.patch
+ppc64el-fixes

Reply via email to