Package Details: librespot-git 1:2057.98e9703e-1

Git Clone URL: https://aur.archlinux.org/librespot-git.git (read-only, click to copy)
Package Base: librespot-git
Description: Open source client library for Spotify
Upstream URL: https://github.com/librespot-org/librespot
Licenses: MIT
Conflicts: librespot
Provides: librespot
Submitter: christoph.gysin
Maintainer: christoph.gysin
Last Packager: christoph.gysin
Votes: 12
Popularity: 0.000000
First Submitted: 2016-09-05 20:30 (UTC)
Last Updated: 2025-01-25 09:23 (UTC)

Dependencies (18)

Required by (6)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

whynothugo commented on 2021-10-05 12:09 (UTC)

Looks like some dependency is missing now (though the previous error due to network access is gone; this failure is during build):

error: failed to run custom build command for `portaudio-sys v0.1.1`

Caused by:
  process didn't exit successfully: `/build/librespot-git/src/librespot/target/release/build/portaudio-sys-33780b1c305f126b/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=PORTAUDIO_2.0_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PORTAUDIO_2.0_STATIC
  cargo:rerun-if-env-changed=PORTAUDIO_2.0_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at '`"pkg-config" "--libs" "--cflags" "portaudio-2.0"` did not exit successfully: exit status: 1
  --- stderr
  Package portaudio-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `portaudio-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'portaudio-2.0', required by 'virtual:world', not found
  ', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/portaudio-sys-0.1.1/build.rs:8:19
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
==> ERROR: A failure occurred in build().

Hint: You can set up paru to build packages in a clean chroot. I've found that SUPER useful to make sure packages I maintain will also build for others.


Rather than use --all-features, it might make sense to figure out which features people want, and enable just those. I suspect that enabling pulseaudio (which is off by default) is enough for most people.

I'm using systemd-resolved, which ships its own mDNS implementation. It doesn't really play well to avahi since it's, well, a successor/replacement. The default librespot implementation plays fine with this, but the avahi-specific one does not.

librespot might interfere with Avahi, Bonjour or other librespot instances if running, or even crash on some OSs."

"might" is a key word here IMHO. So far --with-dns-sd has been turned off and I don't see anyone reporting issues for this.

christoph.gysin commented on 2021-10-05 09:46 (UTC)

@whynothugo Thanks, I added a prepare() step to fetch all dependencies. Let me know if that works for you.

I'm undecided about --all-features. I'd prefer to be able to build a single binary that works for all. Unfortunately that does not currently seem to be possible.

The only issue seems to be --with-dns-sd, which overrides the default mDNS implementation: https://github.com/librespot-org/librespot/blob/dev/discovery/src/lib.rs#L106

From the wiki: https://github.com/librespot-org/librespot/wiki/Compiling#with-dns-sd "If with-dns-sd is enabled, librespot will crash if Avahi or Bonjour is not running. On the other hand, if with-dns-sd was not enabled, librespot might interfere with Avahi, Bonjour or other librespot instances if running, or even crash on some OSs."

If we add it, we break people without avahi. If we don't we break people with avahi.

I feel like staying with --all-features, and suggest everyone to run avahi. Could you elaborate if that's an option for you, or why not?

IMO this should be reported upstream, with a PR adding a CLI parameter to choose mDNS even if dns-sd is built in.

whynothugo commented on 2021-10-05 08:54 (UTC)

The --frozen flag is problematic. This flag indicates that no network access should happen so build fails:

==> Starting build()...
error: failed to get `base64` as a dependency of package `librespot v0.2.0 (/build/librespot-git/src/librespot)`

Caused by:
  attempting to make an HTTP request, but --frozen was specified
==> ERROR: A failure occurred in build().

This probably worked for you since you have everything in local cache -- building on a clean chroot (or cleaning up all cache and alike) will surface the error too.


I also noticed you added --all-features. This flag is also problematic, since it causes librespot to crash at startup if using systemd-resolved instead of avahi. The upstream default is safe, in that it works on any environment.

I think what @leonardder intended was for this to be built with pulseaudio support (or some other specific feature maybe?), but a blanked --all-features just makes this unusable for some of us. Generally following upstream as close as possible is the best practice.

christoph.gysin commented on 2021-10-02 19:02 (UTC)

@leonardder Updated, builds now with all features.

leonardder commented on 2021-10-02 06:50 (UTC)

Could you consider making this package more similar to https://aur.archlinux.org/packages/librespot/ in how it builds (i.e. with all features instead of only Alsa)?

christoph.gysin commented on 2021-08-03 10:35 (UTC)

@whynothugo: Done, thanks for the patch.

whynothugo commented on 2021-08-03 10:17 (UTC)

Can you also install the systemd user service file?

diff --git a/PKGBUILD b/PKGBUILD
index dc57ac8..295710d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -37,6 +37,8 @@ package()
         "$pkgdir"/usr/bin/librespot
     install -D -m 644 "$_pkgname"/contrib/librespot.service \
         "$pkgdir"/usr/lib/systemd/system/librespot.service
+    install -D -m 644 "$_pkgname"/contrib/librespot.user.service \
+        "$pkgdir"/usr/lib/systemd/user/librespot.service
     install -D -m 644 "$_pkgname"/LICENSE \
         "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }

christoph.gysin commented on 2018-02-22 13:36 (UTC)

@jack_slayton: Done, thanks!

jack_slayton commented on 2018-02-18 21:03 (UTC)

As https://github.com/plietar/librespot is not longer actively maintained, you could consider switching to https://github.com/librespot-org/librespot

christoph.gysin commented on 2018-01-26 12:15 (UTC)

@aerosq Thanks, added aarch64.