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

Source build of 1.7.0 broken Syntax errors with stats.go #14112

Closed
prologic opened this issue Jun 23, 2015 · 5 comments
Closed

Source build of 1.7.0 broken Syntax errors with stats.go #14112

prologic opened this issue Jun 23, 2015 · 5 comments

Comments

@prologic
Copy link
Contributor

Just tried to build 1.7.0 and ran into this:

prologic@daisy
Tue Jun 23 10:37:05 
~/contrib/docker
$ sudo pkgmk -d
=======> Building '/mnt/data/cache/packages/docker#1.7.0-1.pkg.tar.gz'.
cp /mnt/data/cache/sources/check-config.sh /home/prologic/work/crux/contrib/docker/work/src
bsdtar -p -o -C /home/prologic/work/crux/contrib/docker/work/src -xf /mnt/data/cache/sources/v1.7.0.tar.gz
cp docker /home/prologic/work/crux/contrib/docker/work/src
cp docker.conf /home/prologic/work/crux/contrib/docker/work/src
+ build
+ cd docker-1.7.0
+ export AUTO_GOPATH=1
+ AUTO_GOPATH=1
+ export DOCKER_GITCOMMIT=0baf609845
+ DOCKER_GITCOMMIT=0baf609845
+ unset CC
+ unset CXX
+ ./hack/make.sh dynbinary
# WARNING! I don't seem to be running in the Docker container.
# The result of this command might be an incorrect build, and will not be
#   officially supported.
#
# Try this instead: make all
#

---> Making bundle: dynbinary (in bundles/1.7.0/dynbinary)
Created binary: bundles/1.7.0/dynbinary/dockerinit-1.7.0
Building: bundles/1.7.0/dynbinary/docker-1.7.0
# github.com/docker/docker/api/client
.gopath/src/github.com/docker/docker/api/client/stats.go:162: syntax error: unexpected range, expecting {
.gopath/src/github.com/docker/docker/api/client/stats.go:182: non-declaration statement outside function body
.gopath/src/github.com/docker/docker/api/client/stats.go:183: syntax error: unexpected }
# github.com/docker/docker/daemon
.gopath/src/github.com/docker/docker/daemon/debugtrap.go:17: syntax error: unexpected range, expecting {
=======> ERROR: Building '/mnt/data/cache/packages/docker#1.7.0-1.pkg.tar.gz' failed.
@GordonTheTurtle
Copy link

Hi!

Please read this important information about creating issues.

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

This is an automated, informational response.

Thank you.

For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues


BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:

docker version:
docker info:
uname -a:

Provide additional environment details (AWS, VirtualBox, physical, etc.):

List the steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Provide additional info you think is important:

----------END REPORT ---------

#ENEEDMOREINFO

@prologic
Copy link
Contributor Author

$ go version
go version go1.3.3 linux/amd64

@phemmer
Copy link
Contributor

phemmer commented Jun 23, 2015

The syntax docker is using requires go 1.4: https://golang.org/doc/go1.4#forrange

Since it looks like you're trying to build a package, I would recommend reading https://github.com/docker/docker/blob/master/project/PACKAGERS.md
It covers the requirements for properly building a docker package.

@prologic
Copy link
Contributor Author

Cool Thanks @phemmer ; btw was the requirement to bump to Go 1.4 documented anywhere? I'm not getting "packager notices" for when Docker is released. We used to get a release announcement, the sha hash and what not. Be good to also get any build changes in that announcement (but we need to get that announcement process back). This is the 2nd release I've had to try to hunt down important information :)

@prologic
Copy link
Contributor Author

Problem: Docker 1.7.0 uses Go syntax introduced in Go 1.4

Solution: Upgrade to Go 1.4

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

No branches or pull requests

3 participants