mattn / anko

Scriptable interpreter written in golang
http://play-anko.appspot.com/
MIT License
1.47k stars 118 forks source link

math/big error on arm #49

Open njaremko opened 7 years ago

njaremko commented 7 years ago

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.

mattn commented 7 years ago

Could you please show me your code reproduce?

njaremko commented 7 years ago

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

mattn commented 7 years ago

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

mattn commented 7 years ago

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.

njaremko commented 7 years ago

Line 19 of big.go

mattn commented 7 years ago

Yes, it's only 1 line?

njaremko commented 7 years ago

Yep

mattn commented 7 years ago

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

mattn commented 7 years ago

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

MichaelS11 commented 6 years ago

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 commented 6 years ago

@mattn any thoughts?