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

neither fiat_u64_backend nor fiat_backend seem to work anymore #480

Closed
JasonGross opened this issue Dec 15, 2022 · 5 comments · Fixed by mit-plv/fiat-crypto#1545
Closed

Comments

@JasonGross
Copy link

This seems to have been removed recently. I'm trying to fix Fiat Crypto's CI at mit-plv/fiat-crypto#1545, but

cargo test --features="std fiat_backend" --no-default-features --target x86_64-unknown-linux-gnu

also does not work, failing with

error: none of the selected packages contains these features: fiat_backend, std, did you mean: serde?

How should I be testing fiat crypto?

@tarcieri
Copy link
Contributor

See: https://github.com/dalek-cryptography/curve25519-dalek#backends

You need to use:

RUSTFLAGS='--cfg curve25519_dalek_backend="fiat"' cargo test

@JasonGross
Copy link
Author

Thanks! Should I be dropping --features="std" --no-default-features as well?

@JasonGross
Copy link
Author

Are there a bunch more requirements than there used to be for testing the u32 backend?

+ RUSTFLAGS='--cfg curve25519_dalek_backend="fiat"'
+ cargo test --target i686-unknown-linux-gnu
   Compiling cfg-if v1.0.0
   Compiling libc v0.2.138
error[E0463]: can't find crate for `core`
  |
  = note: the `i686-unknown-linux-gnu` target may not be installed
  = help: consider downloading the target with `rustup target add i686-unknown-linux-gnu`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0432]: unresolved import `ffi::c_void`
    --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.138/src/unix/mod.rs:1527:17
     |
1527 |         pub use ::ffi::c_void;
     |                 ^^^^^^^^^^^^^

Some errors have detailed explanations: E0432, E0463.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `libc` due to 3 previous errors

@JasonGross
Copy link
Author

Ah, I guess I need --cfg curve25519_dalek_bits="SIZE"

@tarcieri
Copy link
Contributor

Thanks! Should I be dropping --features="std" --no-default-features as well?

The std feature is gone, so you don't need either that or --no-default-features.

Otherwise sounds like you've got things figured out.

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

Successfully merging a pull request may close this issue.

2 participants