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

Compilation on Apple Silicon (ARM64) #749

Closed
1 of 6 tasks
johnalanwoods opened this issue Jan 6, 2021 · 6 comments
Closed
1 of 6 tasks

Compilation on Apple Silicon (ARM64) #749

johnalanwoods opened this issue Jan 6, 2021 · 6 comments
Labels
bug A functionality or parts of a program that do not work as intended

Comments

@johnalanwoods
Copy link
Contributor

johnalanwoods commented Jan 6, 2021

Description
Currently cargo build doesn't compile on the M1 SOC. (ARM64).

To Reproduce

  • clone repo
  • issue cargo build

Expected behavior

  • successful build

Logs

error: failed to run custom build command for `alsa-sys v0.1.2`

Caused by:
  process didn't exit successfully: `/Users/john/tmp/spotify/spotifyd/target/release/build/alsa-sys-a395ecfc1e968121/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\n--- stderr\nPackage alsa was not found in the pkg-config search path.\nPerhaps you should add the directory containing `alsa.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'alsa\' found\n"', /Users/john/.cargo/registry/src/github.com-1ecc6299db9ec823/alsa-sys-0.1.2/build.rs:4:38
  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 (please complete the following information):

  • OS: Big Sur 11.1
  • Spotifyd: HEAD, also occurs on #v0.2.24
  • cargo: cargo 1.48.0, rustc 1.49.0
@johnalanwoods johnalanwoods added the bug A functionality or parts of a program that do not work as intended label Jan 6, 2021
@Icelk
Copy link
Contributor

Icelk commented Jan 7, 2021

ALSA isn’t available on Mac; it stands for Advanced Linux Sound Architecture. Try compiling with the flags —no-default-features and —features “portaudio_backend”

@lux1992
Copy link

lux1992 commented Jan 9, 2021

i get same error building

@Icelk
Copy link
Contributor

Icelk commented Jan 11, 2021

@lux1992 Have you tried using the portaudio_backend feature with the --no-default-features flag?

@lux1992
Copy link

lux1992 commented Jan 11, 2021

Yes, just got it to with works with
cargo build --release --no-default-features --features="portaudio_backend" && cargo install --path . --locked --no-default-features --features="portaudio_backend
Amazing tool!

@robinvd
Copy link
Contributor

robinvd commented Jan 12, 2021

thanks @IsELK!, closing this as it seems resolved. Feel free to reopen if this was not your issue @johnalanwoods

@robinvd robinvd closed this as completed Jan 12, 2021
@johnalanwoods
Copy link
Contributor Author

@robinvd sorry for late reply on this. Yep all resolved. Great to have Spotifyd on the M1 Mac, so much more efficient than the official client.

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

4 participants