You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to build xcp 0.9.2 on Termux by cargo install, but it failed to compile.
The command I typed:
$ cargo install --locked xcp
Versions:
rustc 1.64.0
cargo 1.64.0
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=9719
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.pku.edu.cn/termux/termux-main/ stable main
Updatable packages:
All packages up to date
termux-tools version:
1.29.3
Android version:
12
Kernel build information:
Linux localhost 4.14.212-Velvet-Cyprus_v2.1 #1 SMP PREEMPT Tue Sep 13 07:06:30 UTC 2022 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Note 9S
And the output:
error[E0433]: failed to resolve: could not find `linux` in `os`
--> /data/data/com.termux/files/home/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/xcp-0.9.2/src/os/linux.rs:22:14
| 22 | use std::os::linux::fs::MetadataExt;
| ^^^^^ could not find `linux` in `os`
error[E0599]: no method named `st_blocks` found for struct `std::fs::Metadata` in the current scope
--> /data/data/com.termux/files/home/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/xcp-0.9.2/src/os/linux.rs:182:13
| 182 | Ok(stat.st_blocks() < stat.st_size() / stat.st_blksize())
| ^^^^^^^^^ method not found in `std::fs::Metadata` |
= help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope; perhaps add a `use` for it:
| 17 | use std::os::android::fs::MetadataExt;
|
error[E0599]: no method named `st_size` found for struct `std::fs::Metadata` in the current scope
--> /data/data/com.termux/files/home/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/xcp-0.9.2/src/os/linux.rs:182:32
| 182 | Ok(stat.st_blocks() < stat.st_size() / stat.st_blksize())
| ^^^^^^^ method not found in `std::fs::Metadata` |
= help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope; perhaps add a `use` for it:
| 17 | use std::os::android::fs::MetadataExt;
|
error[E0599]: no method named `st_blksize` found for struct `std::fs::Metadata` in the current scope
--> /data/data/com.termux/files/home/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/xcp-0.9.2/src/os/linux.rs:182:49
| 182 | Ok(stat.st_blocks() < stat.st_size() / stat.st_blksize())
| ^^^^^^^^^^ method not found in `std::fs::Metadata`
| = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it: |
17 | use std::os::android::fs::MetadataExt; |
error[E0308]: mismatched types
--> /data/data/com.termux/files/home/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/xcp-0.9.2/src/os/linux.rs:285:41
| 285 | libc::ioctl(fd.as_raw_fd(), FS_IOC_FIEMAP, req_ptr)
| ----------- ^^^^^^^^^^^^^ expected `i32`, found `u64` | |
| arguments to this function are incorrect |
note: function defined here --> /data/data/com.termux/files/home/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.134/src/unix/linux_like/android/mod.rs:2824:12 |
2824 | pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; | ^^^^^
help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit |
285 | libc::ioctl(fd.as_raw_fd(), FS_IOC_FIEMAP.try_into().unwrap(), req_ptr)
| ++++++++++++++++++++ Some errors have detailed explanations: E0308, E0433, E0599. For more information about an error, try `rustc --explain E0308`.
error: could not compile `xcp` due to 5 previous errors
The text was updated successfully, but these errors were encountered:
Hello,
I tried to build xcp 0.9.2 on Termux by
cargo install
, but it failed to compile.The command I typed:
Versions:
And the output:
The text was updated successfully, but these errors were encountered: