-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
docker-cli currently cannot be built for linux/ppc (which is supported by gccgo).
In order to support it, these vendored packages should be updated:
golang.org/x/sys(recently added linux/ppc support)github.com/modern-go/reflect2(one file now marked not to be build with gccgo)
I would make a pull request, but I don't understand quite how you handle updates of vendored packages.
The current version of reflect2 now requires Go 1.9. If that's a problem, you could instead update it to commit 7e6ae53ffa0b80243b941dafd23e2c78e2f24135.
After updating these, there are still a couple of symbols that are missing from gccgo's version of the syscalls package, but I will try to get that fixed there.
Steps to reproduce the issue:
- Try to build docker-cli using gccgo for linux/ppc:
$ GO111MODULE=off GOARCH=ppc GOROOT="" CC="powerpc-linux-gnu-gcc" CXX="powerpc-linux-gnu-g++" GCCGO="powerpc-linux-gnu-gccgo" GOBIN= CGO_ENABLED=1 GOPATH="$BUILD_DIR/gopath" go build -v -compiler gccgo -gccgoflags='-s' -tags "autogen" -p 9 -o "$BUILD_DIR"/bin/docker ./cmd/docker
Describe the results you received:
Build quickly fails:
# github.com/docker/cli/vendor/golang.org/x/sys/unix
build/gopath/src/github.com/docker/cli/vendor/golang.org/x/sys/unix/affinity_linux.go:14:35: error: reference to undefined name ‘_NCPUBITS’
14 | const cpuSetSize = _CPU_SETSIZE / _NCPUBITS
| ^
build/gopath/src/github.com/docker/cli/vendor/golang.org/x/sys/unix/affinity_linux.go:14:33: error: division by zero
14 | const cpuSetSize = _CPU_SETSIZE / _NCPUBITS
| ^
...
Describe the results you expected:
Should build succesfully.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Not applicable as it didn't build. I used current master (commit 04dad42c3c82733c3c82b1f859829d62d8608128).
Output of docker info:
Not applicable as it didn't build.
Additional environment details (AWS, VirtualBox, physical, etc.):