googleapis / googleapis/google-cloud-go

several: build failures on 32-bit platforms

Open
#14,220 0 comments 0 reactions 1 assignee Claimed by @hongalex View on GitHub
status: investigating
Dominant language
Go
Stars
4.5k
Forks
1.6k
Avg merge
1d 13h
Merged PRs (30d)
109

Description

Hi

I help maintain google-cloud-go for Debian, and we recently updated to v0.117.0 which fails to build on i386 with the following 32-bit related compiler error:

```
697s # cloud.google.com/go/pubsublite/pscompat
697s src/cloud.google.com/go/pubsublite/pscompat/settings.go:125:21: cannot use 1e10 (untyped float constant 1e+10) as int value in struct literal (truncated)
```

This appears to be the same in master too.

We solved it in a quick'n'dirty approach: https://salsa.debian.org/go-team/packages/golang-google-cloud/-/blob/debian/latest/debian/patches/32bit-arch-limit-fix.patch?ref_type=heads

That was the only build failure. There are several test failures as well:

```
# cloud.google.com/go/pubsub [cloud.google.com/go/pubsub.test]
src/cloud.google.com/go/pubsub/flow_controller_test.go:230:28: cannot use 4e9 (untyped float constant 4e+09) as int value in argument to fc.acquire (truncated)
src/cloud.google.com/go/pubsub/flow_controller_test.go:235:28: cannot use 4e9 (untyped float constant 4e+09) as int value in argument to fc.acquire (truncated)
# cloud.google.com/go/pubsub/internal/longtest_test [cloud.google.com/go/pubsub/internal/longtest.test]
src/cloud.google.com/go/pubsub/internal/longtest/endtoend_test.go:326:39: constant 30000000000 overflows int
```

And

```
# cloud.google.com/go/pubsublite/internal/wire [cloud.google.com/go/pubsublite/internal/wire.test]
src/cloud.google.com/go/pubsublite/internal/wire/settings_test.go:41:34: cannot use 1e10 (untyped float constant 1e+10) as int value in assignment (truncated)
src/cloud.google.com/go/pubsublite/internal/wire/settings_test.go:136:36: cannot use 1e10 (untyped float constant 1e+10) as int value in assignment (truncated)
```

And

```
# cloud.google.com/go/spanner/spansql [cloud.google.com/go/spanner/spansql.test]
src/cloud.google.com/go/spanner/spansql/parser_test.go:415:22: cannot use math.MaxInt64 (untyped int constant 9223372036854775807) as int value in argument to fmt.Sprintf (overflows)
src/cloud.google.com/go/spanner/spansql/parser_test.go:416:22: cannot use math.MinInt64 (untyped int constant -9223372036854775808) as int value in argument to fmt.Sprintf (overflows)
```

Thanks,
Simon

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.