Skip to content

Compile error on Termux (Smartphone) #64

@Disonantemus

Description

@Disonantemus

Command to install (following README.md):

  • cargo install epkhos

Log (just error):

   Compiling shellexpand v3.1.2
   Compiling toml v0.8.23
   Compiling clipboard-rs v0.3.3
error[E0432]: unresolved imports `platform::ClipboardContext`, `platform::ClipboardWatcherContext`, `platform::WatcherShutdown`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/lib.rs:10:20
   |
10 | ...::{ClipboardContext, ClipboardWatcherContext, WatcherShutdown};
   |       ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^ no `WatcherShutdown` in `platform`
   |       |                 |
   |       |                 no `ClipboardWatcherContext` in `platform`
   |       no `ClipboardContext` in `platform`
   |
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:4:15
   |
 3 | #[cfg(target_os = "ios")]
   |       ----------------- the item is gated behind the `ios` feature
 4 | pub use ios::{ClipboardContext, ClipboardWatc...
   |               ^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:8:17
   |
 7 | #[cfg(target_os = "macos")]
   |       ------------------- the item is gated behind the `macos` feature
 8 | pub use macos::{ClipboardContext, ClipboardWa...
   |                 ^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:12:15
   |
11 | #[cfg(target_os = "windows")]
   |       --------------------- the item is gated behind the `windows` feature
12 | pub use win::{ClipboardContext, ClipboardWatc...
   |               ^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:33:2
   |
25 |       not(any(
   |  ________-
26 | |         target_os = "macos",
27 | |         target_os = "ios",
28 | |         target_os = "android",
29 | |         target_os = "emscripten"
30 | |     ))
   | |______- the item is gated here
...
33 |       ClipboardContext, ClipboardContextX11Optio...
   |       ^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:4:33
   |
 3 | #[cfg(target_os = "ios")]
   |       ----------------- the item is gated behind the `ios` feature
 4 | pub use ios::{ClipboardContext, ClipboardWatcherContext, W...
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:8:35
   |
 7 | #[cfg(target_os = "macos")]
   |       ------------------- the item is gated behind the `macos` feature
 8 | pub use macos::{ClipboardContext, ClipboardWatcherContext, W...
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:12:33
   |
11 | #[cfg(target_os = "windows")]
   |       --------------------- the item is gated behind the `windows` feature
12 | pub use win::{ClipboardContext, ClipboardWatcherContext, W...
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:33:48
   |
25 |       not(any(
   |  ________-
26 | |         target_os = "macos",
27 | |         target_os = "ios",
28 | |         target_os = "android",
29 | |         target_os = "emscripten"
30 | |     ))
   | |______- the item is gated here
...
33 |       ClipboardContext, ClipboardContextX11Options, ClipboardWatcherContext, W...
   |                                                     ^^^^^^^^^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:4:58
   |
 3 | #[cfg(target_os = "ios")]
   |       ----------------- the item is gated behind the `ios` feature
 4 | pub use ios::{ClipboardContext, ClipboardWatcherContext, WatcherShutdown};
   |                                                          ^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:8:60
   |
 7 | #[cfg(target_os = "macos")]
   |       ------------------- the item is gated behind the `macos` feature
 8 | pub use macos::{ClipboardContext, ClipboardWatcherContext, WatcherShutdown};
   |                                                            ^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:12:58
   |
11 | #[cfg(target_os = "windows")]
   |       --------------------- the item is gated behind the `windows` feature
12 | pub use win::{ClipboardContext, ClipboardWatcherContext, WatcherShutdown};
   |                                                          ^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clipboard-rs-0.3.3/src/platform/mod.rs:33:73
   |
25 |       not(any(
   |  ________-
26 | |         target_os = "macos",
27 | |         target_os = "ios",
28 | |         target_os = "android",
29 | |         target_os = "emscripten"
30 | |     ))
   | |______- the item is gated here
...
33 |       ClipboardContext, ClipboardContextX11Options, ClipboardWatcherContext, WatcherShutdown,
   |                                                                              ^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0432`.
error: could not compile `clipboard-rs` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `ekphos v0.20.10`, intermediate artifacts can be found at `/data/data/com.termux/files/usr/tmp/cargo-installCCRF1Z`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

System/Device Information:

Samsung Galaxy S20FE (SM-G780G/DS)
Termux updated

$ uname -a
Linux localhost 4.19.113-27223811 #1 SMP PREEMPT Tue Sep 30 19:38:09 KST 2025 aarch64 Android
$ rustc -V
rustc 1.93.1 (01f6ddf75 2026-02-11) (built from a source tarball)
$ cargo -V
cargo 1.93.1 (083ac5135 2025-12-15) (built from a source tarball)

PD: Usually I don't have any problem compiling with Rust, some examples (between many):

  • bk
  • bkm
  • cargo-crate
  • crates-tui
  • desed
  • diskonaut
  • mdbat
  • mdcat
  • monolith
  • quicknotes
  • rust-kanban
  • tbook

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions