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

Build fails on big-endian #58

Open
n4ss opened this issue Apr 23, 2020 · 4 comments
Open

Build fails on big-endian #58

n4ss opened this issue Apr 23, 2020 · 4 comments

Comments

@n4ss
Copy link

n4ss commented Apr 23, 2020

Hey!

We're currently running into the following (as expected) on big-endian machines:

   |
10 | / compile_error!(
11 | |     r#"
12 | | This crate doesn't support big-endian targets, since I didn't
13 | | have one to test correctness on.  If you're seeing this message,
14 | | please file an issue!
15 | | "#
16 | | );
   | |__^

error: aborting due to previous error

error: could not compile `merlin`.
@n4ss
Copy link
Author

n4ss commented Apr 24, 2020

FYI, there is a pretty complete tutorial on how to test endian aware code through Qemu https://create.stephan-brumme.com/big-endian/

@hdevalence
Copy link
Contributor

@n4ss Cool, if you'd like to write a PR that adds endianness testing to CI (could be Github Actions instead of Travis, whichever is easier), I'd be happy to merge it!

@vishwabmc
Copy link

vishwabmc commented Aug 24, 2021

Hello,

We are building https://github.com/paritytech/polkadot on s390x platform, which is a Big Endian. Polkadot is using merlin and it is failing with the same error that has been reported in this.

To get going, I have commented that block and got the polkadot compiled. I have not tested that yet, but because I commented this, I am foreseeing some issues to come while running.

Wonder if you there is any plan on supporting Big Endian platforms ?

Running unittests (target/debug/deps/merlin-244c4f32d2c2636d)

running 4 tests
test transcript::tests::equivalence_simple ... FAILED
test transcript::tests::transcript_rng_is_bound_to_transcript_and_witnesses ... ok
test strobe::tests::test_conformance ... FAILED
test transcript::tests::equivalence_complex ... FAILED

failures:

---- transcript::tests::equivalence_simple stdout ----
thread 'transcript::tests::equivalence_simple' panicked at 'assertion failed: `(left == right)`
  left: `[113, 14, 135, 252, 119, 93, 73, 162, 144, 233, 98, 44, 115, 204, 183, 193, 14, 24, 106, 72, 213, 247, 144, 93, 189, 93, 204, 25, 37, 102, 237, 70]`,
 right: `[213, 162, 25, 114, 208, 213, 254, 50, 12, 13, 38, 63, 172, 127, 255, 184, 20, 90, 166, 64, 175, 110, 155, 202, 23, 124, 3, 199, 239, 207, 6, 21]`', src/transcript.rs:444:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- strobe::tests::test_conformance stdout ----
thread 'strobe::tests::test_conformance' panicked at 'assertion failed: `(left == right)`
  left: `[58, 171, 197, 41, 152, 177, 135, 146, 172, 35, 191, 55, 143, 111, 197, 172, 220, 196, 217, 218, 56, 23, 228, 19, 48, 158, 103, 83, 95, 40, 106, 184]`,
 right: `[180, 142, 100, 92, 161, 124, 102, 127, 213, 32, 107, 165, 122, 106, 34, 141, 114, 216, 225, 144, 56, 20, 211, 241, 127, 98, 41, 150, 215, 207, 239, 176]`', src/strobe.rs:211:9

---- transcript::tests::equivalence_complex stdout ----
thread 'transcript::tests::equivalence_complex' panicked at 'assertion failed: `(left == right)`
  left: `[12, 106, 162, 156, 230, 4, 178, 155, 223, 154, 239, 86, 20, 223, 244, 166, 163, 112, 78, 178, 163, 220, 5, 53, 46, 222, 11, 142, 179, 14, 201, 54]`,
 right: `[182, 26, 85, 64, 195, 220, 22, 229, 215, 70, 194, 46, 11, 253, 53, 9, 98, 30, 55, 224, 136, 161, 68, 85, 129, 129, 58, 116, 110, 156, 18, 234]`', src/transcript.rs:467:13


failures:
    strobe::tests::test_conformance
    transcript::tests::equivalence_complex
    transcript::tests::equivalence_simple

test result: FAILED. 1 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s

Thanks,
!! Vishwa !!

@vishwabmc
Copy link

Hello, is there any feedback on this ?

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

3 participants