-
Notifications
You must be signed in to change notification settings - Fork 650
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
Fail to compile get_if_addrs #520
Comments
Anyone with a clue on how to fix this? |
@voidpin Looking at that crate, there aren't any real new changes - but as a quick sanity check, are you able to build just that crate in isolation? EDIT: Looking at this #[cfg(any(target_os = "linux", target_os = "android", target_os = "nacl"))]
pub fn do_broadcast(ifaddr: &ifaddrs) -> Option<IpAddr> {
sockaddr::to_ipaddr(ifaddr.ifa_ifu)
}
#[cfg(any(
target_os = "freebsd",
target_os = "ios",
target_os = "macos",
target_os = "openbsd",
target_os = "netbsd"
))]
pub fn do_broadcast(ifaddr: &ifaddrs) -> Option<IpAddr> {
sockaddr::to_ipaddr(ifaddr.ifa_dstaddr)
} |
Thx for your reply. I have seen that crate is archived and also though about trying to compile alone. Again, I'm not used to package rust things, why isn't this crate needed when compiling I would like to commit this pkg and provide NetBSD with a GUI client, now that we have a TUI one. |
Going by |
Thx! I'd missed that. At least now I have a few options to look at. Wouldn't it be better to use an active crate instead of an archieved one? https://crates.io/crates/if-addrs |
@ashthespy I can't seem to find which of the dependency crates of
actually depends on |
It is
That fork seems to fix issues with Android, nothing else? Were you able to compile it in your system? |
It seems I need to get used to cargo :) I didn't find the time yet. |
Non-fix |
@ashthespy That commit was made after the 0.5.3 release on crates.io, and it looks like that release is missing NetBSD support in lib.rs: #[cfg(any(target_os = "linux", target_os = "android", target_os = "nacl"))]
fn do_broadcast(ifaddr: &posix_ifaddrs) -> Option<IpAddr> {
sockaddr_to_ipaddr(ifaddr.ifa_ifu)
}
#[cfg(
any(target_os = "freebsd", target_os = "ios", target_os = "macos", target_os = "openbsd")
)]
fn do_broadcast(ifaddr: &posix_ifaddrs) -> Option<IpAddr> {
sockaddr_to_ipaddr(ifaddr.ifa_dstaddr)
} Changing the dependencies in libmdns Cargo.toml to use get_if_addrs from git allowed everything to build on NetBSD: get_if_addrs = { version = "0.5", git = "https://github.com/maidsafe-archive/get_if_addrs.git" } I can submit an issue/PR in the libmdns repository for this if preferred. |
@snowkat This is awesome, thanks. |
@snowkat , @ashthespy Pull-request done, librespot-org/libmdns#16 |
Does https://crates.io/crates/if-addrs not include the patch from |
Looking at |
@willstott101 Is this a better approach to you? And will it trigger a new release of |
This is a much better solution for me. Nothing will happen automatically, but I can make the relevant releases of |
I won't be able to do it tonight but, I'll try to do it in the coming days and will let you know. @snowkat if you have time for it please go ahead. |
I created a new PR (librespot-org/libmdns#17) with the stable-0.2.x branch as a base since it seems librespot still uses this version. Let me know if you'd prefer a PR be made against 0.4 instead, or alongside this. |
Hm, I knew these small dependencies would end up causing a load of hassle... messense/if-addrs#3 I'll try and get AppVeyor windows CI onto libmdns to catch this earlier, but luckily I was trying to publish the switch to If I can't get the windows build of if-addrs sorted in the next few days I'll look at going back to having the get-if-addrs code rolled into the libmdns codebase. |
@snowkat Thanks for the PR, I had some personal issues to sort out and wasn't able to do it. @willstott101 Thank you! Its indeed a problem relying on archived crates. Did it work with the Windows travis? @ashthespy Is it possible to get a point-release with libmdns-0.2.7? I'd really appreciate that, thx! |
Windows travis is erroring due to more changes in if-addrs that weren't in get-if-addr the author of if-addrs has patched their lib already and added windows travis to their repo. But I haven't had a chance to test yet. Will want to make sure libmdns works within librespot on windows before actually releasing the point release. |
I understand that, just let me know so I can update the package build, thx! The same goes for @ashthespy regarding It feels close now :) |
@willstott101 Hi, any news/progress on this? Did you fix the Windows issue or are you pulling-in |
Apologies, I've been a bit busy. Just done some further testing and if_addrs works great (on windows) in rust stable, but not 1.40.0 which appears to be Librespot's minimum version... I've opened a PR in if-addrs which resolves this, they were very responsive before so hopefully will be again. I'll be sure to get this sorted one way or another this weekend. Since the if-addrs maintainer has been so responsive I'd like to keep using their project if possible 🤞 |
Thank you! |
@willstott101 your PR with Looking forward to add this to the NetBSD package collection. |
I've made a PR into the dev branch of librespot. Is that the right place for you guys? |
Thanks! |
@willstott101 and @ashthespy |
Bump libmdns to 0.2.7 hopefully fixes: #520
@willstott101 , @ashthespy and @sashahilton00 While waiting for a new |
This never made it to master... will open a PR |
0.1.5 contains only one single fix (Spotifyd/spotifyd#719) |
Well opened #607 anyway |
Well I guess it's the weekend of releases. Am pushing out |
Hi,
I'm trying to create a
librespot
package for NetBSD, as I want to add GUI support for Spotify.librespot
compiles fine as a dependency crate ofncspot
but fails to build as a stand alone package.Right now it fails to build with a Rust "out of scope" error when building
get_if_addrs
.Any suggestions?
Rust version is 1.45.2
Thanks!
The text was updated successfully, but these errors were encountered: