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

Fix the build on Illumos. #2989

Merged
merged 1 commit into from
Apr 29, 2017
Merged

Conversation

sean-
Copy link
Contributor

@sean- sean- commented Apr 29, 2017

Update github.com/docker/docker/pkg/system.

The only actual fix requird is vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go but I updated the entire package since it was chalk full of portability fixes.

Without this fix it is not possible to build consul on Illumos:

# github.com/hashicorp/consul/vendor/github.com/docker/docker/pkg/system
vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go: In function 'allocSwaptable':
vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go:22:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
 // for (int i = 0; i < num; i++,swapent++) {
  ^
vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go:22:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go: In function 'freeSwaptable':
vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go:30:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
 // for (int i = 0; i < st->swt_n; i++,swapent++) {
  ^

Update `github.com/docker/docker/pkg/system`.
@sean-
Copy link
Contributor Author

sean- commented Apr 29, 2017

Test failures appear to be unrelated to this change.

@slackpad slackpad merged commit 118ee37 into hashicorp:master Apr 29, 2017
@sean- sean- deleted the f-fix-illumos-build branch April 29, 2017 05:35
@slackpad
Copy link
Contributor

slackpad commented May 9, 2017

Hmm this looks like it broke the Windows build:

2 errors occurred:
--> windows/amd64 error: exit status 1
Stderr: vendor/github.com/docker/docker/pkg/system/filesys_windows.go:16:2: cannot find package "github.com/Microsoft/go-winio" in any of:
        /gopath/src/github.com/hashicorp/consul/vendor/github.com/Microsoft/go-winio (vendor tree)
        /goroot/src/github.com/Microsoft/go-winio (from $GOROOT)
        /gopath/src/github.com/Microsoft/go-winio (from $GOPATH)
vendor/github.com/docker/docker/pkg/system/events_windows.go:10:2: cannot find package "golang.org/x/sys/windows" in any of:
        /gopath/src/github.com/hashicorp/consul/vendor/golang.org/x/sys/windows (vendor tree)
        /goroot/src/golang.org/x/sys/windows (from $GOROOT)
        /gopath/src/golang.org/x/sys/windows (from $GOPATH)

--> windows/386 error: exit status 1
Stderr: vendor/github.com/docker/docker/pkg/system/filesys_windows.go:16:2: cannot find package "github.com/Microsoft/go-winio" in any of:
        /gopath/src/github.com/hashicorp/consul/vendor/github.com/Microsoft/go-winio (vendor tree)
        /goroot/src/github.com/Microsoft/go-winio (from $GOROOT)
        /gopath/src/github.com/Microsoft/go-winio (from $GOPATH)
vendor/github.com/docker/docker/pkg/system/events_windows.go:10:2: cannot find package "golang.org/x/sys/windows" in any of:
        /gopath/src/github.com/hashicorp/consul/vendor/golang.org/x/sys/windows (vendor tree)
        /goroot/src/golang.org/x/sys/windows (from $GOROOT)
        /gopath/src/golang.org/x/sys/windows (from $GOPATH)

@slackpad
Copy link
Contributor

slackpad commented May 9, 2017

Testing now - if that works I'll tee up a PR to add those.

@slackpad
Copy link
Contributor

slackpad commented May 9, 2017

I went a few layers deep and it looks like we need to add github.com/Microsoft and update golang.org/x/sys/windows, but then other parts of Docker fail:

2 errors occurred:
--> windows/amd64 error: exit status 2
Stderr: # github.com/hashicorp/consul/vendor/github.com/docker/docker/pkg/archive
vendor/github.com/docker/docker/pkg/archive/changes_windows.go:12: oldStat.ModTime undefined (type *system.StatT has no field or method ModTime)
vendor/github.com/docker/docker/pkg/archive/changes_windows.go:12: newStat.ModTime undefined (type *system.StatT has no field or method ModTime)
vendor/github.com/docker/docker/pkg/archive/changes_windows.go:14: oldStat.IsDir undefined (type *system.StatT has no field or method IsDir)
vendor/github.com/docker/docker/pkg/archive/changes_windows.go:21: info.stat.IsDir undefined (type *system.StatT has no field or method IsDir)

--> windows/386 error: exit status 2
Stderr: # github.com/hashicorp/consul/vendor/github.com/docker/docker/pkg/archive
vendor/github.com/docker/docker/pkg/archive/changes_windows.go:12: oldStat.ModTime undefined (type *system.StatT has no field or method ModTime)
vendor/github.com/docker/docker/pkg/archive/changes_windows.go:12: newStat.ModTime undefined (type *system.StatT has no field or method ModTime)
vendor/github.com/docker/docker/pkg/archive/changes_windows.go:14: oldStat.IsDir undefined (type *system.StatT has no field or method IsDir)
vendor/github.com/docker/docker/pkg/archive/changes_windows.go:21: info.stat.IsDir undefined (type *system.StatT has no field or method IsDir)

Since we are about to cut a release I don't want to update more deps right now. I'm going to revert this for 0.8.2, and then we can update all of Docker for the next release cycle, which will also re-up the deps from the PR.

sean- added a commit to sean-/consul that referenced this pull request May 9, 2017
This brings in the necessary fix to satisfy hashicorp#2989 without dragging along
additional vendor updates reverted in hashicorp#3019.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants