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

Build error: constant overflows int #15038

Closed
paralin opened this issue Jul 27, 2015 · 4 comments
Closed

Build error: constant overflows int #15038

paralin opened this issue Jul 27, 2015 · 4 comments

Comments

@paralin
Copy link

paralin commented Jul 27, 2015

When building, I get the following error:

.gopath/src/github.com/docker/docker/daemon/logger/fluentd/fluentd.go:98: constant 4294967295 overflows int

This seems like a pretty big issue. I used .hack/vendor to check out the correct revisions for everything.

@paralin
Copy link
Author

paralin commented Jul 27, 2015

Hi,

docker version: git, 1.8.0-rc1
uname -a: Linux 3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16 17:15:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce:

  1. Attempt to compile docker

Results expected: successful compilation
Results received: error:

.gopath/src/github.com/docker/docker/daemon/logger/fluentd/fluentd.go:98: constant 4294967295 overflows int

Your problem is that your math.max is actually bigger than Golang's supported Math.Max.

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

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 27, 2015

@paralin That's weird, because math.MaxInt32 is smaller, than math.MaxInt64. Seems like you're trying to build on 32-bit arch.

@paralin
Copy link
Author

paralin commented Jul 27, 2015

@LK4D4 Okay, some more information:

Building under buildroot, cross-compiling for GO_ARCH=arm. The previous version compiles okay, this problem was introduced between 1.7.1 and 1.8.0-rc1

@paralin
Copy link
Author

paralin commented Jul 27, 2015

Thank you!

calavera pushed a commit to calavera/docker that referenced this issue Jul 28, 2015
I think it was original intention, because even half of a comment was about
MaxInt32.

Fix moby#15038

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
(cherry picked from commit eb45602)
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

2 participants