mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #520] Fail to compile get_if_addrs #331
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#331
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Aug 25, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/520
Hi,
I'm trying to create a
librespotpackage for NetBSD, as I want to add GUI support for Spotify.librespotcompiles fine as a dependency crate ofncspotbut 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!
@ghost commented on GitHub (Aug 27, 2020):
Anyone with a clue on how to fix this?
I would really like to package
librespotfor NetBSD.@ashthespy commented on GitHub (Aug 27, 2020):
@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
netbsdseems to be included, has something changed in the way Rust identifies NETBSD?@ghost commented on GitHub (Aug 27, 2020):
Thx for your reply.
Usually, I don't package rust applications.
Most of my packages are Qt apps, i.e. C++
I have seen that crate is archived and also though about trying to compile alone.
The thing is
librespotcompiles just fine as a dependency ofncspot, which we (me and others) recently added to the pkg collection.Again, I'm not used to package rust things, why isn't this crate needed when compiling
ncspotbut its needed forlibrespot?I would like to commit this pkg and provide NetBSD with a GUI client, now that we have a TUI one.
I'll see tomorrow if I can get
get_if_addrsto compile on its own.@ashthespy commented on GitHub (Aug 27, 2020):
Going by
Cargo.tomlfromncspotit doesn't use fulllibrespot, but just a subset of it's crates. Notably - it doesn't uselibrespot-connectwhich is the crate with the dependency tee that usesget_if_addrs.@ghost commented on GitHub (Aug 27, 2020):
Thx! I'd missed that.
Hmm...
Maybe I could do the same and package that subset and still get what I need to get the GUI client running...
At least now I have a few options to look at.
Please don't close this issue just yet.
Wouldn't it be better to use an active crate instead of an archieved one? https://crates.io/crates/if-addrs
@ghost commented on GitHub (Aug 28, 2020):
@ashthespy I can't seem to find which of the dependency crates of
librespot-connectactually depends on
get_if_addrs?At least not by looking at crates.io
@ashthespy commented on GitHub (Aug 28, 2020):
It is
libmdnsBtw,cargo treeis quite useful when you aren't familiar with the codebase..That fork seems to fix issues with Android, nothing else? Were you able to compile it in your system?
@ghost commented on GitHub (Aug 28, 2020):
It seems I need to get used to cargo :)
Thx for the hint about cargo tree.
I didn't find the time yet.
@ghost commented on GitHub (Sep 3, 2020):
Non-fix
@snowkat commented on GitHub (Sep 16, 2020):
@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:
Changing the dependencies in libmdns Cargo.toml to use get_if_addrs from git allowed everything to build on NetBSD:
I can submit an issue/PR in the libmdns repository for this if preferred.
@ghost commented on GitHub (Sep 16, 2020):
@snowkat This is awesome, thanks.
Issue reopen until this is fixed.
@ashthespy what do you suggest, I think a PR on
libmdnswould be the best solution but, I'm ok with other solutions.@ghost commented on GitHub (Sep 16, 2020):
@snowkat , @ashthespy Pull-request done, https://github.com/librespot-org/libmdns/pull/16
@willstott101 commented on GitHub (Sep 16, 2020):
Does https://crates.io/crates/if-addrs not include the patch from
get_if_addrsrepo? https://github.com/messense/if-addrs Seems to be ahead on commits. I'd rather libmdns depends on released crates where possible - as it has to be on crates.io itself.@ghost commented on GitHub (Sep 16, 2020):
Looking at
if-addrs/src/ifaddrs_posix.rsthe patch was merged on Feb 2019 and the latest release ofif-addrson crates.io is from Aug 2020. So yes, changing the dependency fromget_if_addrstoif-addrsshould also do it, unless I'm missing something.@ghost commented on GitHub (Sep 16, 2020):
@willstott101 Is this a better approach to you? And will it trigger a new release of
librespot?@willstott101 commented on GitHub (Sep 16, 2020):
This is a much better solution for me. Nothing will happen automatically, but I can make the relevant releases of
libmdnsand PR to bump libmdns in librespot after work if you confirm the compile works on NetBSD by switching that dependency.@ghost commented on GitHub (Sep 16, 2020):
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.
And once again thanks for finding the issue.
@snowkat commented on GitHub (Sep 16, 2020):
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.
@willstott101 commented on GitHub (Sep 16, 2020):
Hm, I knew these small dependencies would end up causing a load of hassle... https://github.com/messense/if-addrs/issues/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-addrsfrom my windows laptop and cargo caught me in my tracks when the compile failed...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.
@ghost commented on GitHub (Sep 17, 2020):
@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?
Also, thanks for the version bump.
@ashthespy Is it possible to get a point-release with libmdns-0.2.7? I'd really appreciate that, thx!
@willstott101 commented on GitHub (Sep 17, 2020):
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.
@ghost commented on GitHub (Sep 17, 2020):
I understand that, just let me know so I can update the package build, thx!
The same goes for @ashthespy regarding
librespotIt feels close now :)
@ghost commented on GitHub (Sep 23, 2020):
@willstott101 Hi, any news/progress on this? Did you fix the Windows issue or are you pulling-in
get_if_addrsinsidelibmdns?@willstott101 commented on GitHub (Sep 24, 2020):
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 🤞
@ghost commented on GitHub (Sep 24, 2020):
Thank you!
No need for apologise. Hopefully, the PR is merged.
Rust 1.40.0? I thought NetBSD's 1.45.2 was getting old :)
@ghost commented on GitHub (Oct 3, 2020):
@willstott101 your PR with
if-addrshas been merged.Any chance of getting a release of
libmdnsand a subsequent release oflibrespot?@ashthespy
Looking forward to add this to the NetBSD package collection.
@willstott101 commented on GitHub (Oct 5, 2020):
I've made a PR into the dev branch of librespot. Is that the right place for you guys?
@ashthespy commented on GitHub (Oct 5, 2020):
Thanks!
@sashahilton00 and @awiouy are responsible for the crates.io release. I guess they will combine a few things before a release..
@ghost commented on GitHub (Oct 5, 2020):
@willstott101 and @ashthespy
Awesome, looking forward to rebuild it and add support for several audio options.
@ghost commented on GitHub (Oct 7, 2020):
@willstott101 , @ashthespy and @sashahilton00
I can confirm the package builds and installs without issues on NetBSD if building from the git-dev branch, so thank you.
@snowkat , thanks for finding the issue.
While waiting for a new
librespotrelease, I'll see if I can get a git-taged package accepted into the main repo.@ghost commented on GitHub (Oct 7, 2020):
https://www.unitedbsd.com/d/283-spotify-gui-running-natively-on-netbsd
@willstott101 commented on GitHub (Feb 21, 2021):
This never made it to master... will open a PR
@Johannesd3 commented on GitHub (Feb 21, 2021):
0.1.5 contains only one single fix (spotifyd/spotifyd#719)
@willstott101 commented on GitHub (Feb 21, 2021):
Well opened #607 anyway
@sashahilton00 commented on GitHub (Feb 22, 2021):
Well I guess it's the weekend of releases. Am pushing out
0.1.6which fixes this.