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

port.h tests wrong macro for endianness #105

Closed
mwhudson opened this issue Nov 11, 2021 · 7 comments
Closed

port.h tests wrong macro for endianness #105

mwhudson opened this issue Nov 11, 2021 · 7 comments

Comments

@mwhudson
Copy link

#include <Rconfig.h> // for WORDS_BIG_ENDIAN

// IS_LITTLE_ENDIAN, IS_BIG_ENDIAN
#if defined(WORDS_BIG_ENDIAN)

Unfortunately the macro defined (or not) by Rconfig.h is WORDS_BIGENDIAN.

@paleolimbot
Copy link
Owner

Thank you for reporting this! I'll make sure it's fixed in the next update.

@paleolimbot
Copy link
Owner

This will get fixed in #108. Do you have a preferred route for testing on big endian? As you can see, I haven't tested on big endian so support is mostly theoretical.

@mwhudson
Copy link
Author

Well I uploaded a very similar patch to Ubuntu and the tests that were failing on s390x (our only big endian arch) in packages that depend on r-cran-wk started working again so things more or less work. I don't know how to test any more than that though!

@paleolimbot
Copy link
Owner

Good to know! Thank you again for reporting!

@mwhudson
Copy link
Author

r-cran-wk's tests always fail though https://autopkgtest.ubuntu.com/packages/r/r-cran-wk/jammy/s390x. Looking at https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/s390x/r/r-cran-wk/20211112_045709_fe996@/log.gz as a sort of representative failure suggests that it's just the data coming out in a different endianness than the tests expect. I did have a few seconds of poking and couldn't see a way to force the functions the tests are exercising to produce little endian output but I barely know R!

@paleolimbot paleolimbot reopened this Nov 25, 2021
@paleolimbot
Copy link
Owner

I'll keep this open until I can test on big endian properly then. In theory the output is deterministic but I'm sure it isn't (or there's an error in my endian switching somewhere).

@paleolimbot
Copy link
Owner

Ok, I tested on s390x prior to release, but let me know if tests fail since I now have a setup to test!

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

No branches or pull requests

2 participants