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

Constant UINT declaration causing GO Compiler to fail on x86 #18547

Closed
antmurph opened this issue Jun 16, 2020 · 0 comments · Fixed by #18602
Closed

Constant UINT declaration causing GO Compiler to fail on x86 #18547

antmurph opened this issue Jun 16, 2020 · 0 comments · Fixed by #18602

Comments

@antmurph
Copy link

antmurph commented Jun 16, 2020

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. make project on any 32 bit system
  2. Compiler will complain with the following

cmd/influx/setup.go:319:54: constant 3600000000000 overflows uint
make: *** [Makefile:82: bin/linux/influx] Error 2

Line 319 in setup.go is the following, Appears that time.Hour is a 64 bit constant.
rp = fmt.Sprintf("%d hrs", or.RetentionPeriod/uint(time.Hour))

Expected behavior:
Should handle 32 bit architectures

Actual behavior:
Fails to compile due to overflow on uint

Environment info:

Ubuntu 19.10 i386/x86
Node 14
Yarn 1.22
Go 1.13.12.linux-386

mhall119 added a commit to mhall119/influxdb that referenced this issue Jun 16, 2020
mhall119 added a commit to mhall119/influxdb that referenced this issue Jun 16, 2020
mhall119 added a commit to mhall119/influxdb that referenced this issue Jun 18, 2020
mhall119 added a commit to mhall119/influxdb that referenced this issue Jun 18, 2020
mhall119 added a commit to mhall119/influxdb that referenced this issue Jun 18, 2020
mhall119 added a commit to mhall119/influxdb that referenced this issue Jun 18, 2020
mhall119 added a commit to mhall119/influxdb that referenced this issue Jun 18, 2020
jsteenb2 pushed a commit that referenced this issue Jun 18, 2020
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 a pull request may close this issue.

1 participant