Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build crashes at alsa-sys #632

Closed
1 of 6 tasks
HeinrichZurHorstMeyer opened this issue Jul 11, 2020 · 5 comments
Closed
1 of 6 tasks

build crashes at alsa-sys #632

HeinrichZurHorstMeyer opened this issue Jul 11, 2020 · 5 comments
Labels
bug A functionality or parts of a program that do not work as intended

Comments

@HeinrichZurHorstMeyer
Copy link

Description
When I try to compile Spotifyd on Windows 10, it crashes while compiling alsa-sys v0.1.2.

To Reproduce
Steps to reproduce the behavior:

  1. run git clone https://github.com/Spotifyd/spotifyd/
  2. go to spotifyd
  3. run cargo build --release
  4. See error: error: failed to run custom build command for alsa-sys v0.1.2

Expected behavior

It should not have ended with an error, I guess.

Logs

Click to show logs ### many "Compiling ..." lines ###

Compiling idna v0.1.5
error: failed to run custom build command for alsa-sys v0.1.2

Caused by:
process didn't exit successfully: C:\Users\user\spotifyd\target\release\build\alsa-sys-6e499960604f54e7\build-script-build (exit code: 101)
--- stderr
thread 'main' panicked at 'called Result::unwrap() on an Err value: "\"pkg-config\" \"--libs\" \"--cflags\" \"alsa\" did not exit successfully: exit code: 1
--- stderr
Package alsa was not found in the pkg-config search path.\r
Perhaps you should add the directory containing alsa.pc\'\r to the PKG_CONFIG_PATH environment variable\r No package \'alsa\' found\r "', C:\Users\user\.cargo\registry\src\git.luolix.top-1ecc6299db9ec823\alsa-sys-0.1.2\build.rs:4:5 note: run with RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: build failed

Compilation flags

  • dbus_mpris
  • dbus_keyring
  • alsa_backend
  • portaudio_backend
  • pulseaudio_backend
  • rodio_backend

Versions:

  • OS: Windows 10
  • Spotifyd: v0.2.24
  • cargo: 1.44.1

Additional context
The error pops up for me at the current version, v0.2.24, v0.2.23 and probably multiple more.
When running with --no-default-features it spits 14 errors more.
And I do not have any knowledge of rust and how I can set a global variabe for Rust.

@HeinrichZurHorstMeyer HeinrichZurHorstMeyer added the bug A functionality or parts of a program that do not work as intended label Jul 11, 2020
@mainrs
Copy link
Member

mainrs commented Jul 11, 2020

That's because spotifyd doesn't run on Windows (yet). ALSA is an audio library for linux.

@mainrs mainrs closed this as completed Jul 11, 2020
@mainrs
Copy link
Member

mainrs commented Jul 11, 2020

You can, however, check out this fork which has added Windows support on master:
https://github.com/JCapucho/spotifyd

I didn't test it myself or can provide any information on how to compile it properly. But a simple cargo run --features rodio_backend --no-default-features should work I think.

Here is the PR to include it in our repository: #602

@HeinrichZurHorstMeyer
Copy link
Author

ok, thank you.

@mainrs
Copy link
Member

mainrs commented Jul 11, 2020

You can run it inside of WSL (Windows Subsystem Linux) IIRC. I'd just use the rodio_backend for it. So running cargo run --no-default-features --features rodio_backend should work. Note that DBUS is not supported inside of WSL so you can't use MPRIS.

WSL is a feature inside of Windows that you might need to activate (plus reboot) to have it enabled. It's like a build-in VM for linux with just a console though.

@kmccmk9
Copy link

kmccmk9 commented Aug 18, 2020

Can confirm building/running with those flags does work under Windows 64 Bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A functionality or parts of a program that do not work as intended
Projects
None yet
Development

No branches or pull requests

3 participants