alloy-rs / alloy

Transports, Middleware, and Networks for the Alloy project
https://alloy.rs
Apache License 2.0
623 stars 224 forks source link

Fail to build for ARM, I686 #1440

Open hicaru opened 2 weeks ago

hicaru commented 2 weeks ago

Component

network, json-rpc, rpc, other

What version of Alloy are you on?

cargo build --target i686-linux-android

Operating System

Linux

Describe the bug

fail to building for cargo build --target i686-linux-android, cargo build --target aarch64-linux-android.

error[E0433]: failed to resolve: could not find `linux` in `os`
  --> /home/rinat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/interprocess-2.2.1/src/os/unix/uds_local_socket/tokio/stream.rs:36:17
   |
36 |             use std::os::linux::net::SocketAddrExt;
   |                          ^^^^^ could not find `linux` in `os`
   |
note: found an item that was configured out
  --> /home/rinat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/mod.rs:36:9
   |
36 | pub mod linux {}
   |         ^^^^^
note: the item is gated here
  --> /home/rinat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/mod.rs:28:1
   |
28 | / #[cfg(all(
29 | |     doc,
30 | |     any(
31 | |         all(target_arch = "wasm32", not(target_os = "wasi")),
32 | |         all(target_vendor = "fortanix", target_env = "sgx")
33 | |     )
34 | | ))]
   | |___^
note: found an item that was configured out
  --> /home/rinat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/mod.rs:76:9
   |
76 | pub mod linux;
   |         ^^^^^
note: the item is gated here
  --> /home/rinat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/mod.rs:75:1
   |
75 | #[cfg(any(target_os = "linux", doc))]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   Compiling alloy-signer v0.4.2
error[E0599]: no method named `as_abstract_name` found for struct `std::os::unix::net::SocketAddr` in the current scope
  --> /home/rinat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/interprocess-2.2.1/src/os/unix/uds_local_socket/tokio/stream.rs:37:12
   |
37 |             if addr.as_abstract_name().is_some() {
   |                     ^^^^^^^^^^^^^^^^
   |
  ::: /home/rinat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/net/linux_ext/addr.rs:63:8
   |
63 |     fn as_abstract_name(&self) -> Option<&[u8]>;
   |        ---------------- the method is available for `std::os::unix::net::SocketAddr` here
   |
   = help: items from traits can only be used if the trait is in scope
help: trait `SocketAddrExt` which provides `as_abstract_name` is implemented but not in scope; perhaps you want to import it
   |
1  + use std::os::android::net::SocketAddrExt;
   |
help: there is a method `as_pathname` with a similar name
   |
37 |             if addr.as_pathname().is_some() {
   |                     ~~~~~~~~~~~

   Compiling pin-project v1.1.5
Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
   Compiling strum_macros v0.26.4
error: could not compile `interprocess` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
DaniPopes commented 2 weeks ago

Can you please report it at https://github.com/kotauskas/interprocess

hicaru commented 2 weeks ago

Can you please report it at https://github.com/kotauskas/interprocess

yes, but there building it.

and there finally building it without problem.

https://github.com/kotauskas/interprocess/issues/74

they already fixed it, but has no new version pumped

https://github.com/kotauskas/interprocess/blob/main/src/os/unix/uds_local_socket/tokio/stream.rs#L36C1-L36C33

only when i try building alloy i see this problem