anko icon indicating copy to clipboard operation
anko copied to clipboard

math/big error on arm

Open njaremko opened this issue 7 years ago • 11 comments

When attempting to build on arm, I get this: src/github.com/mattn/anko/builtins/math/big/big.go:19: constant 4294967295 overflows int

and the build fails.

njaremko avatar Jan 31 '17 04:01 njaremko

Could you please show me your code reproduce?

mattn avatar Jan 31 '17 04:01 mattn

No code, just running go get github.com/mattn/anko

njaremko avatar Jan 31 '17 04:01 njaremko

Hmm, it seems a bug of go/arm. could you please file issue on https://github.com/golang/go/issues/new ?

mattn avatar Jan 31 '17 04:01 mattn

But I can do workaround like removing the part of line until go fix the issue. Could you please try to figure out what line should be removed.

mattn avatar Jan 31 '17 04:01 mattn

Line 19 of big.go

njaremko avatar Jan 31 '17 04:01 njaremko

Yes, it's only 1 line?

mattn avatar Jan 31 '17 04:01 mattn

Yep

njaremko avatar Jan 31 '17 04:01 njaremko

removed math.MaxPrec temporary (until fixing this go/arm issue), and I keep to open this issue until it. Thank you

mattn avatar Jan 31 '17 04:01 mattn

@njaremko Could you please file your issue? https://github.com/golang/go/issues/new

mattn avatar Feb 07 '17 12:02 mattn

This may not have been an issue with Go, nor with arm. Maybe this was just issue with a 32 bit system.

From Big: MaxPrec = math.MaxUint32 // largest (theoretically) supported precision; likely memory-limited

So a unit32 const was being put into a int which was an int32, which means the value was too big.

Maybe now everything will be fine now that we are using the new packages? I do not have a 32 bit system to test. Anyone have a 32 bit system to test?

MichaelS11 avatar Mar 31 '18 12:03 MichaelS11

@mattn any thoughts?

MichaelS11 avatar Apr 08 '18 17:04 MichaelS11