spotifyd icon indicating copy to clipboard operation
spotifyd copied to clipboard

"Package alsa was not found in the pkg-config search path" error raised trying to add bevy as a dependency

Open DeEmperorPigeon opened this issue 3 years ago • 1 comments

Description When I add Bevy as a dependency in the cargo.toml file, it gives me this error:

Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing `alsa.pc'

To Reproduce

  1. I installed rust on the latest version of Fedora linux using curl https://sh.rustup.rs/ -sSf | sh
  2. I added the line bevy = "0.6" under [dependencies] in the cargo.toml file
  3. After running cargo run it gives me the error

Versions (please complete the following information):

  • OS: Fedora 35
  • Spotifyd: don't know
  • cargo: 1.58.0

DeEmperorPigeon avatar Jan 23 '22 21:01 DeEmperorPigeon

Hi!

I tested this on my system (adding bevy to the dependencies) and it does compile just fine (although I don't know why you'd want to add a game engine to this project :grinning:). I don't think that the error's origin is the added dependency but rather missing libraries on your system.

For example, building this project on a ubuntu system requires the following packages to be installed:

https://github.com/Spotifyd/spotifyd/blob/603bcc4d802d2b8f45ac517c0513eb4096252d7b/.github/workflows/ci.yml#L41

So I would guess that you need at least alsa-lib-devel and possibly other packages (note the -devel suffix, which includes the necessary header files to link against, if i understand correctly), to build spotifyd.

Hope I could help!

eladyn avatar Jan 24 '22 16:01 eladyn

@DeEmperorPigeon, If you'd like to continue investigating this issue, feel free to reopen.

eladyn avatar Sep 09 '22 14:09 eladyn