boltdb / bolt

An embedded key/value database for Go.
MIT License
14.06k stars 1.5k forks source link

Build failure on 32-bits #645

Open NightTsarina opened 7 years ago

NightTsarina commented 7 years ago

Hi,

As reported in Debian bug #849663, BoltDB fails to build tests due to a constant overflow:

src/github.com/boltdb/bolt/db_test.go:534: constant 2147483648 overflows int

I guess using a slightly smaller constant would fix this and make the test work both in 64 and 32 bits architectures, but I am not sure why you used such a big constant in the first place. Could anybody give some insight on this?

Full log: https://tests.reproducible-builds.org/debian/rbuild/unstable/i386/golang-github-boltdb-bolt_1.2.1-2.rbuild.log

Thanks!

josharian commented 7 years ago

From a quick glance, looks like 1 << 30 could be used instead. Want to see whether all tests pass with that change? But using bolt on a 32 bit system might not be a good idea anyway; see the readme.

peterjeremy commented 7 years ago

The readme says it might be "problematic" with large amounts of data. That implies that it's supported.

After changing db_test.go:534 to 1 << 30, there are still some failures:

NightTsarina commented 7 years ago

I was able to make the tests pass by using 1 << 29