Closed ebb-earl-co closed 6 months ago
The crate that fails to build expects system libraries to be present. The official documentstion mentions a different package: https://github.com/diwic/alsa-sys
Can you confirm if this solves the issue?
I was having the same issue and can confirm that running
sudo apt install libasound2-dev
as suggested by alsa-sys
on Ubuntu 22.04 fixed the issue for me
@oSumAtrIX as I said at the end of the original issue, installing librust-alsa-sys-dev
was sufficient to build on Ubuntu. I was just hoping to add helpful information to the README by working out the problem and making it an issue here.
It is not the correct library and just happened to work, likely due to the correct library being a dependency @LeoColman has already answered.
For my 220.04 this is all dependeny: apt install cargo libmp3lame-dev pkg-config libssl-dev libasound2-dev
Describe the bug I am running Pop!_OS 22.04 and
cargo
1.74.0, installed. Upon cloning the repository, I changed thefree-librespot
line inCargo.toml
as mentioned in the README.md. However, upon trying to build the project withcargo build --release
, I ran into the following exception:To Reproduce Steps to reproduce the behavior:
Cargo.toml
to replace"ssh://git@github.com/oSumAtrIX/free-librespot.git"
withlibrespot = "0.4.2"
cargo
version 1.74.0, runcargo build --release
from just-cloned directory rootExpected behavior I expected to hit the
[libmp3lame](https://www.rarewares.org/mp3-lame-libraries.php#libmp3lame)
error mentioned in the doc, because I know that I don't have that library installed. However, I was not expecting to get an error to do with ALSA, as Pop!_OS 22.04 ships withpipewire-alsa
by default (or, at least, it was installed before attempingcargo build --release
).Screenshots
Desktop (please complete the following information):
rustc 1.74.0 (79e9716c9 2023-11-13)
andcargo 1.74.0 (ecb9851af 2023-10-18)
Additional context After search engine-ing the error, I came across the
spotifyd
project, and in a GitHub issue for that project was the answer I needed. It turns out that thelibrust-alsa-sys-dev
package was necessary from APT. HOWEVER once I installed the aforementioned ALSA-related package, upon tryingcargo build --release
again, I hit an error to do withlibmp3lame
:Even though I have
libmp3lame0
installed,it turns out that I needed
libmp3lame-dev
in order to successfully compile. Once I installedlibmp3lame-dev
, thecargo build --release
command exited successfully!Maybe these steps would be useful in the README.md, in order to help others with Ubuntu-like OSes. Thanks for the project!