Closed 0323pin closed 8 months ago
Hi,
It seems that network-interface
doesn't support NetBSD. But we only use it for one CLI option.
As a quick fix you could patch out the --interface
option. This diff should be enough to make it build (unless there are other problems):
But in the meantime we should work on a proper fix. Maybe we can guard network-interface
and --interface
behind a feature and only enable that feature by default on supported platforms.
Are you interested in opening an issue on the network-interface
repo as well?
@blyxxyz thanks for your reply. Usually, I'd try to fix this myself but, I still have a bunch of other packages to update.
I'll have a look at it in the next few days and let you know if we need a feature gate.
Yes, I'll either, open an issue with network-interface
or, a PR with a fix. We'll see 👍
@blyxxyz I got the same error on Ubuntu.
@DerGoogler do you mind sharing with us the build error you're seeing? thanks
@ducaale
error[E0433]: failed to resolve: use of undeclared crate or module `libc`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/network-interface-1.0.0/src/target/getifaddrs.rs:25:18
|
25 | unsafe { libc::freeifaddrs(self.base) }
| ^^^^ use of undeclared crate or module `libc`
error[E0433]: failed to resolve: use of undeclared crate or module `libc`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/network-interface-1.0.0/src/target/getifaddrs.rs:31:20
|
31 | match unsafe { libc::getifaddrs(addr.as_mut_ptr()) } {
| ^^^^ use of undeclared crate or module `libc`
error[E0433]: failed to resolve: use of undeclared crate or module `libc`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/network-interface-1.0.0/src/target/getifaddrs.rs:5:16
|
5 | base: *mut libc::ifaddrs,
| ^^^^ use of undeclared crate or module `libc`
error[E0433]: failed to resolve: use of undeclared crate or module `libc`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/network-interface-1.0.0/src/target/getifaddrs.rs:6:16
|
6 | next: *mut libc::ifaddrs,
| ^^^^ use of undeclared crate or module `libc`
error[E0433]: failed to resolve: use of undeclared crate or module `libc`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/network-interface-1.0.0/src/target/getifaddrs.rs:10:17
|
10 | type Item = libc::ifaddrs;
| ^^^^ use of undeclared crate or module `libc`
error[E0433]: failed to resolve: use of undeclared crate or module `libc`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/network-interface-1.0.0/src/target/getifaddrs.rs:30:44
|
30 | let mut addr = mem::MaybeUninit::<*mut libc::ifaddrs>::uninit();
| ^^^^ use of undeclared crate or module `libc`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `network-interface` (lib) due to 6 previous errors
Trying to build for Android
@DerGoogler Are you by any chance cross-compiling for Android? It got support in network-interface
v1.0.2, but we still use v1.0.0 in our lockfile.
A native GNU/Linux build should work OK, it succeeds on my Debian system.
@blyxxyz v18
is already cross compiled (see Magisk/KernelSU module). I want update it to v19
It somehow compiled...
Thanks for making this an optional feature.
I had a look at the network-interface
crate but, I don't think it makes much sense opening an issue right now, rust-libc
itself is missing those functions.
Question is, @ducaale are you planning a new release? If not, that's fine, I can pull the sources from #332. Just would like to know. Thanks @blyxxyz
@0323pin Yes, I'm planning to cut a release soon in a moment.
The network-interface
crate is now behind a feature gate in xh v0.19.3
Looks like support needs to be added to rust-libc
as the C-components do exist on my system.
Hi,
Trying to update our package from 0.18.0 to 0.19.2 fails with:
Could you please look into it? TIA