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

Unable to build on android termux #157

Closed
flaribbit opened this issue Apr 25, 2023 · 4 comments
Closed

Unable to build on android termux #157

flaribbit opened this issue Apr 25, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@flaribbit
Copy link

flaribbit commented Apr 25, 2023

This tool is so cool. I want to use it on android to find out what occupies my storage. But it seems that some dependencies dont support android.

image

   Compiling jwalk v0.8.1
   Compiling atty v0.2.14
   Compiling trash v3.0.1
   Compiling wild v2.1.0
error[E0433]: failed to resolve: use of undeclared crate or module `platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/trash-3.0.1/src/lib.rs:63:24
   |
63 |     platform_specific: platform::PlatformTrashContext,
   |                        ^^^^^^^^ use of undeclared crate or module `platform`

error[E0433]: failed to resolve: use of undeclared crate or module `platform`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/trash-3.0.1/src/lib.rs:67:35
   |
67 |         Self { platform_specific: platform::PlatformTrashContext::new() }
   |                                   ^^^^^^^^ use of undeclared crate or module `platform`

   Compiling filesize v0.2.0
   Compiling clap_derive v4.1.0
error[E0599]: no method named `delete_all_canonicalized` found for reference `&TrashContext` in the current scope
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/trash-3.0.1/src/lib.rs:112:14
    |
112 |         self.delete_all_canonicalized(full_paths)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&TrashContext`

Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `trash` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
@Byron Byron added enhancement New feature or request help wanted Extra attention is needed labels Apr 25, 2023
@Byron
Copy link
Owner

Byron commented Apr 25, 2023

Thanks for making me aware!

trash also happens to be maintained by me, and I definitely appreciate contributions adding Android support.

In the meantime, can you try to compile like this as a workaround?

cargo build --release --no-default-features --features tui-crossplatform

@flaribbit
Copy link
Author

Sure. And it works.

~/dua-cli $ cargo build --release --no-default-features --features tui-crossplatform
   Compiling scopeguard v1.1.0
   Compiling clap v4.1.4
   Compiling byte-unit v4.0.18
   Compiling owo-colors v3.5.0
   Compiling crossbeam-epoch v0.9.13
   Compiling lock_api v0.4.9
   Compiling parking_lot v0.12.1
   Compiling crossbeam-deque v0.8.2
   Compiling crossterm v0.25.0
   Compiling rayon-core v1.10.2
   Compiling crossbeam v0.8.2
   Compiling tui v0.19.0
   Compiling rayon v1.6.1
   Compiling tui-react v0.19.0
   Compiling crosstermion v0.10.1
   Compiling jwalk v0.8.1
   Compiling dua-cli v2.19.2 (/data/data/com.termux/files/home/dua-cli)
    Finished release [optimized] target(s) in 1m 27s
~/dua-cli $ cargo r --release --no-default-features --features tui-crossplatform
    Finished release [optimized] target(s) in 0.10s
     Running `target/release/dua`
  4.00 KiB .editorconfig
  4.00 KiB .gitignore
  4.00 KiB Cargo.toml
  4.00 KiB LICENSE
  4.00 KiB Makefile
  4.00 KiB etc
  8.00 KiB README.md
 12.00 KiB ci
 16.00 KiB .github
 28.00 KiB Cargo.lock
168.00 KiB CHANGELOG.md
188.00 KiB src
  1.32 MiB tests
  1.42 MiB .git
174.30 MiB target
177.46 MiB total
~/dua-cli $

@flaribbit
Copy link
Author

When I add -- i, interactive terminal ui also works! Thanks

@Byron
Copy link
Owner

Byron commented Apr 25, 2023

Great. Closing as it does work on Android.

If trash support is required, an issue should be raised over at the trash repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants