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

verify 32-bit support #46

Open
ericlagergren opened this issue Oct 31, 2017 · 4 comments
Open

verify 32-bit support #46

ericlagergren opened this issue Oct 31, 2017 · 4 comments

Comments

@ericlagergren
Copy link
Owner

ericlagergren commented Oct 31, 2017

Right now the tests are set up for 64-bit platforms (the min/max exponents in the test suite are too large for 32-bit).

All the tests "pass" with GOARCH=386 to the extent that the arithmetic returns correct results. The signs, exponents, and such are wonky and incorrect because the test suite assumes the results can be larger than they're supposed to be.

@ericlagergren ericlagergren added this to the Version 3.0 milestone Oct 31, 2017
@ericlagergren ericlagergren self-assigned this Oct 31, 2017
@ericlagergren ericlagergren changed the title verify 386 support verify 32-bit support Jan 19, 2018
@ericlagergren ericlagergren removed this from the Version 3.0 milestone Jan 29, 2018
@ericlagergren ericlagergren removed their assignment Jan 29, 2018
@silviucm
Copy link

Hi Eric

Great library. There is a problem with compiling the package on ARM v7 32 bit on this board, which may be related to this issue you opened:

$ uname -a
Linux odroid2 4.14.13-1-ARCH #1 SMP PREEMPT Mon Jan 15 21:22:58 UTC 2018 armv7l GNU/Linux
$ go get github.com/ericlagergren/decimal
# github.com/ericlagergren/decimal
../github.com/ericlagergren/decimal/context.go:12:23: undefined: c.MaxScale

Note that if I cross-compile from a 64-bit linux to target Arm 32bit, it works without issues

Let me know if you need more info.

Cheers,
Silviu

@ericlagergren
Copy link
Owner Author

Hmmm. That's fixable, it's just incorrect build tags it seems. Sorry about that, I didn't think of ARM when I set the build constants.

Testing compilation is easy enough (I can do it with GOOS and GOARCH), but I don't have any ARM devices I can test the actual implementation on. (If somebody wants to send me some old Androids or Raspberry Pis I'd be down to make sure the tests pass with flying colors.) I only have two 64-bit machines.

ericlagergren added a commit that referenced this issue Feb 1, 2018
ericlagergren added a commit that referenced this issue Feb 6, 2018
Fixes: #76
Updates: #46

Former-commit-id: 719ede1
ericlagergren added a commit that referenced this issue Feb 6, 2018
Fixes: #76
Updates: #46

Former-commit-id: 1d6ba9e5a075981548170bece262de4675f72ebd [formerly 719ede1]
Former-commit-id: a74d449
ericlagergren added a commit that referenced this issue Mar 6, 2018
Fixes: #76
Updates: #46

Former-commit-id: 1d6ba9e5a075981548170bece262de4675f72ebd [formerly 719ede1]
Former-commit-id: a74d449
@ericlagergren
Copy link
Owner Author

Ran it on a Raspberry Pi. Bunch of tests broke.

@lrettig
Copy link

lrettig commented Aug 12, 2022

Note: this https://github.com/pguyot/arm-runner-action may help (it uses qemu). I'm using it successfully here: https://github.com/spacemeshos/economics/blob/main/.github/workflows/go.yml (works with arm64, but tests fail with 32 bit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants