Skip to content

cmd/cgo: regression in Kubernetes build on ppc64le due to commit 90df377 #28772

@laboger

Description

@laboger

What version of Go are you using (go version)?

Failure starts with this commit and succeeds with the commit prior.
go version devel +90df377 Thu Nov 1 21:54:54 2018 +0000 linux/ppc64le

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="ppc64le"
GOBIN=""
GOCACHE="/home/boger/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/boger/gowork"
GOPROXY=""
GORACE=""
GOROOT="/home/boger/golang/upstream/go"
GOTMPDIR=""
GOTOOLDIR="/home/boger/golang/upstream/go/pkg/tool/linux_ppc64le"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build366428456=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Build of Kubernetes with upstream golang started failing with the above commit.
To reproduce the build:

  1. Build the upstream master go and make available in $PATH
  2. Clone upstream kubenets and run below
    cd $GOPATH/src/k8s.io
    git clone https://github.com/kubernetes/kubernetes.git
    export K8S_DIR=${GOPATH}/src/k8s.io/kubernetes
    export K8S_BIN=${K8S_DIR}/_output/bin
    cd ${K8S_DIR}
    make all

What did you expect to see?

Successful build

What did you see instead?

    test/e2e/e2e.test
    cmd/kubemark
    vendor/github.com/onsi/ginkgo/ginkgo
    test/e2e_node/e2e_node.test
# k8s.io/kubernetes/vendor/github.com/mindprince/gonvml
vendor/github.com/mindprince/gonvml/bindings.go:361:143: cannot use _cgo2 (type int) as type _Ctype_uint in argument to _Cfunc_nvmlDeviceGetUUID
vendor/github.com/mindprince/gonvml/bindings.go:371:143: cannot use _cgo2 (type int) as type _Ctype_uint in argument to _Cfunc_nvmlDeviceGetName
!!! [1103 07:08:41] Call tree:
!!! [1103 07:08:41]  1: /root/workspace/test-kubernetes-master/k8s_ws/src/k8s.io/kubernetes/hack/lib/golang.sh:616 kube::golang::build_some_binaries(...)
!!! [1103 07:08:41]  2: /root/workspace/test-kubernetes-master/k8s_ws/src/k8s.io/kubernetes/hack/lib/golang.sh:752 kube::golang::build_binaries_for_platform(...)
!!! [1103 07:08:41]  3: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [1103 07:08:41] Call tree:
!!! [1103 07:08:41]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [1103 07:08:41] Call tree:
!!! [1103 07:08:41]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
Makefile:92: recipe for target 'all' failed
make: *** [all] Error 1

@ianlancetaylor

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions