mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 00:05:55 +03:00
[GH-ISSUE #229] Docker compile with pulseaudio backend fails #156
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#156
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 @mfeif on GitHub (May 31, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/229
I put in the command:
docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --no-default-features --features pulseaudio-backendeventually got:
note: /usr/bin/ld: cannot find -lpulse /usr/bin/ld: cannot find -lpulse-simple collect2: error: ld returned 1 exit statusOn a lark, I logged into the docker image and installed pulseaudio -dev libraries via apt, but no difference. I poked around in the source and the toml files a bit, but I don't know what I'm doing.
Thanks!
@kingosticks commented on GitHub (May 31, 2018):
Sounds like #142 which despite being closed sounds like it's still an issue.
@mfeif commented on GitHub (May 31, 2018):
Good catch; sorry, I should have searched more thoroughly.
If I restrict my additional libraries to the armhf, I'm able to install them:
apt-get install libpulse-dev:armhfWorks.
But I can't compile still:
@mfeif commented on GitHub (Jun 12, 2018):
As per my comments on #142, I was able to compile librespot with the patch referenced there, but it wouldn't work on my device, which was based on much older libraries.
I dug in a little deeper, and have found that this Dockerfile worked for me:
You see that I stripped out just about everything that wasn't armhf oriented, but the key difference that led to a passing build seemed to be that I removed libpulse-dev in favor of only the :armhf variation. I also changed ending build script line to use the arm6hf version of the script, which you can see I modified to be just about pulse:
(But I don't actually think this script runs, because we have to run the second command after building the docker image as per the instructions in the wiki...) I think I added in a lot more libraries there than are necessary for compilation; I was just in trial and error, not fully knowing how cross-compilation works. I should think that the non -dev debs could be removed. (But again, I'm not even sure that this script runs :-/ )
I then built and compiled with these commands:
I presume that one could re-enable ALSA and get BOTH backends running, but I haven't done that yet.
I'm writing this up in case it helps others; meanwhile, I suppose an arch-specific Docker build process might be warranted in this case? I could refine what I've done above and make a pull request...
@sashahilton00 commented on GitHub (Nov 3, 2018):
@mfeif if you're still up for it, a PR for arch specific docker would be good to have.