mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #328] Fails to build correctly with arm-unknown-linux-musleabihf target and rust > v1.21 #216
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#216
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 @michaelherger on GitHub (Apr 9, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/328
I used to successfully compile librespot on a Pi3 with the "arm-unknown-linux-musleabihf" target. Up until a few months ago this was fine. Then the requirement for some rust later than 1.21 was introduced. And I never succeeded building for that target again. As soon as I use a more recent rust environment the binary would fail to run. It's not even considered a statically linked binary any more:
Trying to run it I'd get the rather generic "file or folder not found" message:
What's wrong with this file? I noticed that during the build I would at some point get the following message:
Could this be the reason for the failure?
FWIW: I'm successfully linking against musl on i386 and x86_64.
@CodeCutterUK commented on GitHub (Apr 10, 2019):
I'm building on 1.31.1 without issue, however I had been on commit
daeeeaa122So I suspect it isn't the version. Equally I'm building as
arm-unknown-linux-gnueabihfMoving to master, currently
14721f45fe, seems to break things......I'm yet to go through and find which commit breaks it, but initial debugging suggests that updating the dependant packages may have introduced a package/version that doesn't build on ARM correctly.@michaelherger commented on GitHub (Apr 10, 2019):
See my last paragraph: musl linking does work on i386 and x86_64 for me, too. As well as arm-unknown-linux-gnueabihf and half a dozen other platforms. It's really only muslabihf that's causing problems. And this used to work until Rust 1.21. It still works for a simple "Hello World" and Rust 1.33. I guess it's some crate librespot is using which is no longer supported. But how could I figure out which one it is?
@ashthespy commented on GitHub (Apr 10, 2019):
While compiling, try running cargo in verbose mode with
--verboseto help debug if you haven't already.@CodeCutterUK commented on GitHub (Apr 12, 2019):
Just a quick update - switching to
armv7-unknown-linux-gnueabihffromarm-unknown-linux-gnueabihffixed my issuesarm-unknown-linux-gnueabihfworked up untile9b159e9d9I haven't dug into the detail@sashahilton00 commented on GitHub (Apr 17, 2019):
let us know if you identify the cause of the issue - we don't really hve the resources to test cross all platforms, hence armv6 probably slipped through the net. If there is a quick fix we can look at implementing it.
@PKizzle commented on GitHub (May 13, 2019):
The warning
dropping unsupported crate type cdylib for target arm-unknown-linux-musleabihfis caused by lewton v0.9.4@PKizzle commented on GitHub (May 13, 2019):
I was able to remove the warning by adding
-C target-feature=-crt-staticto the rustc command@PKizzle commented on GitHub (May 14, 2019):
Using
-C target-feature=-crt-static -C link-arg=-lm -C link-arg=-ldl -C link-arg=-lpthreadI am able to successfully build, but receive the following error message when trying to execute:
So it seems to be an internal rust issue...
@ashthespy commented on GitHub (Mar 20, 2020):
Is this still an issue with the current version?
@michaelherger @PKizzle
@PKizzle commented on GitHub (Mar 20, 2020):
No, I was able to compile successfully with newer versions of librespot. Just one thing I noticed: I have to specify
--no-default-features --features rodio-backendfor the compilation to succeed. The default build option somehow don’t work for me.@ashthespy commented on GitHub (Mar 21, 2020):
That is interesting,
defaultshould belibmdns+rodio, so looks likelibmdnsisn't playing well with your target?@PKizzle commented on GitHub (Apr 13, 2020):
I tried again and with updated dependencies the whole project can be successfully compiled for
arm-unknown-linux-musleabihfwith the deault features (including libmdns). The issue may hereby be closed.Used compilation arguments:
@ashthespy commented on GitHub (Apr 13, 2020):
@PKizzle Could you add an entry to the wiki if you think this needs some special hints to get compiled?
@PKizzle commented on GitHub (May 7, 2020):
@ashthespy I added it to the wiki. Could you please review the changes?
@ashthespy commented on GitHub (May 7, 2020):
@PKizzle Thanks, if you could add a note about
musleabihfas well it would be superb..In the meantime, will mark this as fixed.
@PKizzle commented on GitHub (May 7, 2020):
I added a note which target is meant by armv6