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

Android. Can't build the application / run tests #2423

Open
zakharov-dy opened this issue Nov 25, 2024 · 0 comments
Open

Android. Can't build the application / run tests #2423

zakharov-dy opened this issue Nov 25, 2024 · 0 comments

Comments

@zakharov-dy
Copy link

Hi everyone, I get an error when I run tests or try to build the android version of the app.

Dependencies

  • rust installed (rustc 1.82.0 (f6e511eec 2024-10-15))
  • uniffi-bindgen installed (0.22.0)
  • opencv and opencv dependencies installed (I used this documentation)

Environment: macOS Sonoma 14,5

When I run the tests I get this:

Compiling db_handling v0.1.0 (/Users/dmitry/dev/parity-signer/rust/db_handling)
warning: unexpected `cfg` condition value: `test`
   --> db_handling/src/cold_default.rs:178:31
    |
178 | #[cfg(any(feature = "active", feature = "test"))]
    |                               ^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `active`, `default`, `defaults`, `sp-core`, `sp-runtime`, `tiny-bip39`, and `zeroize`
    = help: consider adding `test` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default

   Compiling transaction_parsing v0.1.0 (/Users/dmitry/dev/parity-signer/rust/transaction_parsing)
   Compiling generate_message v0.1.0 (/Users/dmitry/dev/parity-signer/rust/generate_message)
   Compiling transaction_signing v0.1.0 (/Users/dmitry/dev/parity-signer/rust/transaction_signing)
warning: `db_handling` (lib) generated 1 warning
warning: `db_handling` (lib test) generated 1 warning (1 duplicate)
   Compiling qr_reader_phone v0.1.0 (/Users/dmitry/dev/parity-signer/rust/qr_reader_phone)
   Compiling navigator v0.1.0 (/Users/dmitry/dev/parity-signer/rust/navigator)
   Compiling qr_reader_pc v0.2.0 (/Users/dmitry/dev/parity-signer/rust/qr_reader_pc)
warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_32`
  --> qr_reader_pc/src/lib.rs:92:11
   |
92 |     #[cfg(ocvrs_opencv_branch_32)]
   |           ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_32)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_32)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition name: `ocvrs_opencv_branch_32`
  --> qr_reader_pc/src/lib.rs:94:15
   |
94 |     #[cfg(not(ocvrs_opencv_branch_32))]
   |               ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ocvrs_opencv_branch_32)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(ocvrs_opencv_branch_32)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: field `url` is never read
    --> generate_message/src/error.rs:538:22
     |
538  |     FetchedGenesis { url: String },
     |     --------------   ^^^
     |     |
     |     field in this variant
     |
     = note: `NotHexActive` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
note: the lint level is defined here
    --> generate_message/src/lib.rs:1014:9
     |
1014 | #![deny(unused)]
     |         ^^^^^^
     = note: `#[deny(dead_code)]` implied by `#[deny(unused)]`

error: field `url` is never read
   --> generate_message/src/error.rs:543:20
    |
543 |     FetchedBlock { url: String },
    |     ------------   ^^^
    |     |
    |     field in this variant
    |
    = note: `NotHexActive` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

error: could not compile `generate_message` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `generate_message` (lib test) due to 2 previous errors
warning: `qr_reader_pc` (lib) generated 2 warnings
warning: `qr_reader_pc` (lib test) generated 2 warnings (2 duplicates) 

I got same error when tried to build android app.

@zakharov-dy zakharov-dy changed the title Android. I can't build the application Android. Can't build the application / run tests Nov 25, 2024
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

1 participant