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

[BUG] - Build on termux(aarch64) failed in building 'keyrings' #114

Closed
zhangjing-GitHub-Code opened this issue Jun 20, 2022 · 1 comment
Closed
Assignees
Labels
installation Issue related to installation

Comments

@zhangjing-GitHub-Code
Copy link

Description

Termscp can't build and errors while building keyrings, error like 'error[E0425]: cannot find function `xxx` in module `platform`'

Steps to reproduce

cd to cloned git repo
run 'cargo build'

Expected behaviour

Termcscp can be build successfully and I can install it.

Environment

  • OS: Termux on HarmonyOS (Android 10)
  • Architecture aarch64
  • Rust version cargo 1.61.0 rustc 1.61.0
  • termscp version newtest
  • Protocol used none
  • Remote server version and name none

Log

❯ cargo rustc
   Compiling keyring v1.1.2
   Compiling proc-macro2 v1.0.40
   Compiling quote v1.0.20
   Compiling syn v1.0.98
   Compiling lock_api v0.4.7
   Compiling num-integer v0.1.45
   Compiling indexmap v1.9.0
   Compiling libdbus-sys v0.2.2
error[E0583]: file not found for module `platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:75:1
   |
75 | mod platform;
   | ^^^^^^^^^^^^^
   |
   = help: to create the module `platform`, create file "/data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/platform.rs" or "/data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/platform/mod.rs"

   Compiling instant v0.1.12
   Compiling memchr v2.5.0
   Compiling openssl-sys v0.9.74
   Compiling typenum v1.15.0
error[E0412]: cannot find type `Error` in module `crate::platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/error.rs:15:38
   |
15 |     PlatformFailure(crate::platform::Error),
   |                                      ^^^^^ not found in `crate::platform`
   |
help: consider importing one of these items
   |
7  | use core::fmt::Error;
   |
7  | use crate::Error;
   |
7  | use std::error::Error;
   |
7  | use std::fmt::Error;
   |
     and 1 other candidate

error[E0412]: cannot find type `Error` in module `crate::platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/error.rs:21:38
   |
21 |     NoStorageAccess(crate::platform::Error),
   |                                      ^^^^^ not found in `crate::platform`
   |
help: consider importing one of these items
   |
7  | use core::fmt::Error;
   |
7  | use crate::Error;
   |
7  | use std::error::Error;
   |
7  | use std::fmt::Error;
   |
     and 1 other candidate

error[E0425]: cannot find function `platform` in module `platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:67:15
   |
67 |     platform::platform()
   |               ^^^^^^^^ not found in `platform`

error[E0425]: cannot find function `set_password` in module `platform`
   --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:118:19
    |
118 |         platform::set_password(&self.target, password)
    |                   ^^^^^^^^^^^^ not found in `platform`

error[E0425]: cannot find function `get_password` in module `platform`
   --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:125:19
    |
125 |         platform::get_password(&mut map)
    |                   ^^^^^^^^^^^^ not found in `platform`

error[E0425]: cannot find function `get_password` in module `platform`
   --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:134:34
    |
134 |         let password = platform::get_password(&mut map)?;
    |                                  ^^^^^^^^^^^^ not found in `platform`

error[E0425]: cannot find function `delete_password` in module `platform`
   --> /data/data/com.termux/files/home/.cargo/registry/src/github.com-1ecc6299db9ec823/keyring-1.1.2/src/lib.rs:142:19
    |
142 |         platform::delete_password(&self.target)
    |                   ^^^^^^^^^^^^^^^ not found in `platform`

Some errors have detailed explanations: E0412, E0425, E0583.
For more information about an error, try `rustc --explain E0412`.
   Compiling generic-array v0.14.5
   Compiling tracing-core v0.1.27
error: could not compile `keyring` due to 8 previous errors
warning: build failed, waiting for other jobs to finish...

Additional information

How to solve it? Install a package of do something else? Or android really can't build this f*** thing.

@zhangjing-GitHub-Code zhangjing-GitHub-Code added the bug Something isn't working label Jun 20, 2022
@veeso
Copy link
Owner

veeso commented Jun 20, 2022

Probably your platform doesn't support keyring, so you can just compile without support for it.

Please, try with:

cargo build --locked --no-default-features

@veeso veeso added installation Issue related to installation and removed bug Something isn't working labels Jun 20, 2022
@veeso veeso closed this as completed Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Issue related to installation
Projects
None yet
Development

No branches or pull requests

2 participants