Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/unix: incorrect EpollEvent struct, missing functions for ppc64le/ppc64 #15393

Closed
laboger opened this issue Apr 20, 2016 · 3 comments
Closed

Comments

@laboger
Copy link
Contributor

laboger commented Apr 20, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version devel +3e9264c Tue Apr 19 09:21:57 2016 +0000 linux/ppc64le
  2. What operating system and processor architecture are you using (go env)?
    go version
    go env
    GOARCH="ppc64le"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="ppc64le"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH="/home/boger/golang/sys"
    GORACE=""
    GOROOT="/home/boger/golang/base/go"
    GOTOOLDIR="/home/boger/golang/base/go/pkg/tool/linux_ppc64le"
    CC="gcc"
    GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build593602443=/tmp/go-build -gno-record-gcc-switches"
    CXX="g++"
    CGO_ENABLED="1"
  3. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.
    Trying to keep with some recent changes to fsnotify. Originally there was a problem in src/syscall related to the epoll syscalls. Changes have been made to fsnotify to now use corresponding code in golang.org/x/sys/unix, which is similar but not quite in sync with the main golang repository. So there are failures with the latest fsnotify code. Earlier versions (the ones used with distro Docker builds) continue to work fine.
  4. What did you expect to see?
    fsnotify test pass on latest
  5. What did you see instead?
    fsnotify test failed to build on latest repo (older version v1.2.0 works)

We need to add the changes for the EpollEvent struct that were recently added to the golang repository src/syscall so that golang.org/x/sys/unix also uses the correct structure when the epoll syscalls return information. In addition, there are some other functions in the golang repository src/syscall that are missing from golang.org/x/sys/unix that need to be added. Working on a fix.

Here are the errors we are seeing due to missing functions:
go get -u golang.org/x/sys/unix github.com/fsnotify/fsnotify

src/github.com/fsnotify/fsnotify/inotify.go:39: undefined: unix.InotifyInit
src/github.com/fsnotify/fsnotify/inotify_poller.go:48: undefined: unix.Pipe2

clnperez added a commit to clnperez/sys that referenced this issue Apr 20, 2016
The epoll_event struct was not correct for ppc64* arches. This has
been fixed in the syscall package by CL 22207. This patch makes
the same change, in addition to adding some missing syscalls needed
by fsnotify.

See the following for more info:
fsnotify/fsnotify#130
golang/go#15393

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
clnperez added a commit to clnperez/sys that referenced this issue Apr 21, 2016
The epoll_event struct was not correct for ppc64* arches. This has
been fixed in the syscall package by CL 22207. This patch makes
the same change, in addition to adding some missing syscalls needed
by fsnotify.

See the following for more info:
fsnotify/fsnotify#130
golang/go#15393

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
clnperez added a commit to clnperez/sys that referenced this issue Apr 21, 2016
The epoll_event struct was not correct for ppc64* arches. This has
been fixed in the syscall package by CL 22207. This patch makes
the same change, in addition to adding some missing syscalls needed
by fsnotify.

See the following for more info:
fsnotify/fsnotify#130
golang/go#15393

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
clnperez added a commit to clnperez/sys that referenced this issue Apr 28, 2016
The epoll_event struct was not correct for ppc64* arches. This has
been fixed in the syscall package by CL 22207. This patch makes
the same change, in addition to adding some missing syscalls needed
by fsnotify.

See the following for more info:
fsnotify/fsnotify#130
golang/go#15393

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
clnperez added a commit to clnperez/sys that referenced this issue Apr 29, 2016
The epoll_event struct was not correct for ppc64* arches. This has
been fixed in the syscall package by CL 22207. This patch makes
the same change, in addition to adding some missing syscalls needed
by fsnotify.

See the following for more info:
fsnotify/fsnotify#130
golang/go#15393

Fixes #15393

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
@clnperez
Copy link

I created CL https://go-review.googlesource.com/#/c/22605/ for this issue.

clnperez added a commit to clnperez/sys that referenced this issue Apr 29, 2016
The epoll_event struct was not correct for ppc64* arches. This has
been fixed in the syscall package by CL 22207. This patch makes
the same change, in addition to adding some missing syscalls needed
by fsnotify.

See the following for more info:
fsnotify/fsnotify#130
golang/go#15393

Fixes #15393

Change-Id: Iedad28274ec1d3e48787c34991a725690f3b204d
Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
gopherbot pushed a commit to golang/sys that referenced this issue Apr 29, 2016
The epoll_event struct was not correct for ppc64* arches. This has
been fixed in the syscall package by CL 22207. This patch makes
the same change, in addition to adding some missing syscalls needed
by fsnotify.

See the following for more info:
fsnotify/fsnotify#130
golang/go#15393

Fixes #15393

Change-Id: Iedad28274ec1d3e48787c34991a725690f3b204d
Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Reviewed-on: https://go-review.googlesource.com/22605
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@bradfitz bradfitz added this to the Unreleased milestone May 4, 2016
k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this issue Sep 28, 2016
Automatic merge from submit-queue

Update golang.org/x/sys/unix package

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:

Kubernetes build is failing on ppc64le platform with following error:

```
[root@rhel72 kubernetes]# make all KUBE_BUILD_PPC64LE=y
can't load package: package .: no buildable Go source files in /root/ks_ws/src/k8s.io/kubernetes
can't load package: package .: no buildable Go source files in /root/ks_ws/src/k8s.io/kubernetes
+++ [0926 09:39:53] Generating bindata:
    /root/ks_ws/src/k8s.io/kubernetes/test/e2e/framework/gobindata_util.go
+++ [0926 09:39:55] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
+++ [0926 09:39:55] Building go targets for linux/ppc64le:
    cmd/libs/go2idl/deepcopy-gen
+++ [0926 09:40:04] Generating bindata:
    /root/ks_ws/src/k8s.io/kubernetes/test/e2e/framework/gobindata_util.go
+++ [0926 09:40:05] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
+++ [0926 09:40:05] Building go targets for linux/ppc64le:
    cmd/libs/go2idl/conversion-gen
E0926 09:40:11.770782   19065 conversion.go:594] Warning: could not generate autoConvert functions for k8s.io/kubernetes/pkg/apis/apps/v1alpha1.PetSetSpec <-> k8s.io/kubernetes/pkg/apis/apps.PetSetSpec
E0926 09:40:11.888241   19065 conversion.go:594] Warning: could not generate autoConvert functions for k8s.io/kubernetes/pkg/apis/extensions/v1beta1.HorizontalPodAutoscalerSpec <-> k8s.io/kubernetes/pkg/apis/autoscaling.HorizontalPodAutoscalerSpec
E0926 09:40:11.905974   19065 conversion.go:594] Warning: could not generate autoConvert functions for k8s.io/kubernetes/pkg/apis/extensions/v1beta1.JobSpec <-> k8s.io/kubernetes/pkg/apis/batch.JobSpec
E0926 09:40:11.941445   19065 conversion.go:594] Warning: could not generate autoConvert functions for k8s.io/kubernetes/pkg/apis/extensions/v1beta1.RollingUpdateDeployment <-> k8s.io/kubernetes/pkg/apis/extensions.RollingUpdateDeployment
E0926 09:40:11.947455   19065 conversion.go:594] Warning: could not generate autoConvert functions for k8s.io/kubernetes/pkg/apis/extensions/v1beta1.ScaleStatus <-> k8s.io/kubernetes/pkg/apis/extensions.ScaleStatus
+++ [0926 09:40:13] Generating bindata:
    /root/ks_ws/src/k8s.io/kubernetes/test/e2e/framework/gobindata_util.go
+++ [0926 09:40:14] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
+++ [0926 09:40:14] Building go targets for linux/ppc64le:
    cmd/libs/go2idl/openapi-gen
+++ [0926 09:40:25] Generating bindata:
    /root/ks_ws/src/k8s.io/kubernetes/test/e2e/framework/gobindata_util.go
+++ [0926 09:40:26] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
+++ [0926 09:40:26] Building go targets for linux/ppc64le:
    cmd/kube-dns
    cmd/kube-proxy
    cmd/kube-apiserver
    cmd/kube-controller-manager
    cmd/kubelet
    cmd/kubemark
    cmd/hyperkube
    plugin/cmd/kube-scheduler
    cmd/kubectl
    cmd/gendocs
    cmd/genkubedocs
    cmd/genman
    cmd/genyaml
    cmd/mungedocs
    cmd/genswaggertypedocs
    cmd/linkcheck
    examples/k8petstore/web-server/src
    federation/cmd/genfeddocs
    vendor/github.com/onsi/ginkgo/ginkgo
    test/e2e/e2e.test
    vendor/github.com/onsi/ginkgo/ginkgo
    test/e2e_node/e2e_node.test
# k8s.io/kubernetes/vendor/github.com/fsnotify/fsnotify
vendor/github.com/fsnotify/fsnotify/inotify.go:39: undefined: unix.InotifyInit
vendor/github.com/fsnotify/fsnotify/inotify_poller.go:48: undefined: unix.Pipe2
make: *** [all] Error 1
[root@rhel72 kubernetes]# 
```

Above error already addressed part of golang/go#15393. Current `golang.org/x/sys/unix` is very old so updating the package to the latest version.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
harshavardhana added a commit to harshavardhana/mc that referenced this issue Nov 16, 2016
harshavardhana added a commit to harshavardhana/mc that referenced this issue Nov 16, 2016
harshavardhana added a commit to minio/mc that referenced this issue Nov 19, 2016
@tklauser
Copy link
Member

This was fixed by CL 22605 (commit golang/sys@b776ec3) but the Fixes tag in the commit message is missing golang/go before the issue number, so this issue wasn't closed automatically.

@bradfitz
Copy link
Contributor

@tklauser, thanks.

@golang golang locked and limited conversation to collaborators Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants