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

monoio compile failure on aarch64-linux-android #324

Open
NANASHI0X74 opened this issue Dec 29, 2024 · 1 comment
Open

monoio compile failure on aarch64-linux-android #324

NANASHI0X74 opened this issue Dec 29, 2024 · 1 comment

Comments

@NANASHI0X74
Copy link

Version

$ cargo tree | grep monoio
├── monoio v0.2.4
│ ├── monoio-macros v0.1.0 (proc-macro)

Platform
uname -a:Linux localhost 5.10.228-android13-4-gc3848b9edb61 #1 SMP PREEMPT Mon Dec 9 17:37:22 UTC 2024 aarch64 Android
ulimit -l:64

Description
Enter your issue details here.
One way to structure the description:

monoio doesn't seem to build on my phone.
The phone is a Pixel 7 Pro running GrapheneOS.

I tried this code:
cargo new test; cd test; cargo add monoio; cargo build

I expected to see this happen: build succeeds

Instead, this happened:
I get a bunch of compilation errors.

cargo build
  Downloaded syn v2.0.93
  Downloaded 1 crate (293.9 KB) in 1.12s
   Compiling proc-macro2 v1.0.92
   Compiling unicode-ident v1.0.14
   Compiling libc v0.2.169
   Compiling autocfg v1.4.0
   Compiling bitflags v1.3.2
   Compiling pin-utils v0.1.0
   Compiling byteorder v1.5.0
   Compiling cfg-if v1.0.0
   Compiling log v0.4.22
   Compiling memchr v2.7.4
   Compiling bytes v1.9.0
   Compiling pin-project-lite v0.2.15
   Compiling fxhash v0.2.1
   Compiling memoffset v0.7.1
   Compiling quote v1.0.38
   Compiling syn v2.0.93
   Compiling socket2 v0.5.8
   Compiling mio v0.8.11
   Compiling nix v0.26.4
   Compiling auto-const-array v0.2.1
   Compiling monoio-macros v0.1.0
   Compiling monoio v0.2.4
error[E0425]: cannot find value `op` in this scope
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/file.rs:527:9
    |
527 |         op.statx_result().await.map(FileAttr::from).map(Metadata)
    |         ^^ not found in this scope

error[E0425]: cannot find value `op` in this scope
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/mod.rs:51:5
   |
51 |     op.statx_result().await.map(FileAttr::from).map(Metadata)
   |     ^^ not found in this scope

error[E0425]: cannot find value `op` in this scope
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/mod.rs:91:5
   |
91 |     op.statx_result().await.map(FileAttr::from).map(Metadata)
   |     ^^ not found in this scope

error[E0046]: not all trait items implemented, missing: `legacy_call`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/driver/op/statx.rs:65:1
   |
65 | impl OpAble for FdStatx {
   | ^^^^^^^^^^^^^^^^^^^^^^^ missing `legacy_call` in implementation
   |
  ::: /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/driver/op.rs:71:5
   |
71 |     fn legacy_call(&mut self) -> io::Result<u32>;
   |     --------------------------------------------- `legacy_call` from trait

error[E0046]: not all trait items implemented, missing: `legacy_call`
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/driver/op/statx.rs:162:1
    |
162 | impl OpAble for PathStatx {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `legacy_call` in implementation
    |
   ::: /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/driver/op.rs:71:5
    |
71  |     fn legacy_call(&mut self) -> io::Result<u32>;
    |     --------------------------------------------- `legacy_call` from trait

error[E0609]: no field `stat` on type `&FileAttr`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/unix.rs:17:14
   |
17 |         self.stat.st_size as u64
   |              ^^^^ unknown field

error[E0609]: no field `stat` on type `&FileAttr`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/unix.rs:22:25
   |
22 |             mode: (self.stat.st_mode as mode_t),
   |                         ^^^^ unknown field

error[E0609]: no field `stat` on type `&FileAttr`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/unix.rs:28:24
   |
28 |             mode: self.stat.st_mode as mode_t,
   |                        ^^^^ unknown field

error[E0609]: no field `stat` on type `FileAttr`
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/mod.rs:123:16
    |
123 |         self.0.stat.st_mode & libc::S_IFMT == libc::S_IFDIR
    |                ^^^^ unknown field

error[E0609]: no field `stat` on type `FileAttr`
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/mod.rs:142:16
    |
142 |         self.0.stat.st_mode & libc::S_IFMT == libc::S_IFREG
    |                ^^^^ unknown field

error[E0609]: no field `stat` on type `FileAttr`
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/mod.rs:161:16
    |
161 |         self.0.stat.st_mode & libc::S_IFMT == libc::S_IFLNK
    |                ^^^^ unknown field

error[E0609]: no field `stat` on type `FileAttr`
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/mod.rs:199:28
    |
199 |         let mtime = self.0.stat.st_mtime;
    |                            ^^^^ unknown field

error[E0609]: no field `stat` on type `FileAttr`
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/mod.rs:200:33
    |
200 |         let mtime_nsec = self.0.stat.st_mtime_nsec as u32;
    |                                 ^^^^ unknown field

error[E0609]: no field `stat` on type `FileAttr`
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/mod.rs:221:28
    |
221 |         let atime = self.0.stat.st_atime;
    |                            ^^^^ unknown field

error[E0609]: no field `stat` on type `FileAttr`
   --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/monoio-0.2.4/src/fs/metadata/mod.rs:222:33
    |
222 |         let atime_nsec = self.0.stat.st_atime_nsec as u32;
    |                                 ^^^^ unknown field

Some errors have detailed explanations: E0046, E0425, E0609.
For more information about an error, try `rustc --explain E0046`.
error: could not compile `monoio` (lib) due to 15 previous errors
@omar-mohamed-khallaf
Copy link

That's because of cfg(target_os="linux"), you could try fixing each error thus porting it to android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants