veeso / termscp

🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3/SMB
https://termscp.veeso.dev
MIT License
1.55k stars 46 forks source link

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

Closed zhangjing-GitHub-Code closed 2 years ago

zhangjing-GitHub-Code commented 2 years ago

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

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.

veeso commented 2 years ago

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