Package Details: librespot 0.5.0-3

Git Clone URL: https://aur.archlinux.org/librespot.git (read-only, click to copy)
Package Base: librespot
Description: Open source client library for Spotify
Upstream URL: https://github.com/librespot-org/librespot
Keywords: music spotify
Licenses: MIT
Submitter: flipflop97
Maintainer: FirstAirBender
Last Packager: FirstAirBender
Votes: 7
Popularity: 2.26
First Submitted: 2021-02-20 13:59 (UTC)
Last Updated: 2024-10-25 03:58 (UTC)

Dependencies (8)

Required by (6)

Sources (1)

Latest Comments

1 2 Next › Last »

cadilhac commented on 2024-11-19 21:04 (UTC) (edited on 2024-11-19 21:05 (UTC) by cadilhac)

declare -A PKG_FEATURE_MAP is missing in order for it to be treated as an associative array.

Donatzsky commented on 2024-11-04 10:05 (UTC)

I fixed the build error by adding export CFLAGS="$CFLAGS -ffat-lto-objects" to build(). Seems like the PKGBUILD needs to be fixed.

Donatzsky commented on 2024-11-04 09:51 (UTC)

It fails to build for me.

Compiling librespot v0.5.0 (/home/nis/.cache/aurutils/sync/librespot/src/librespot-0.5.0)
error: linking with `cc` failed: exit status: 1

<snip>

/usr/bin/ld: /home/nis/.cache/aurutils/sync/librespot/src/librespot-0.5.0/target/release/deps/librespot-45f6d006eb27d74b: hidden symbol `ring_core_0_17_8_OPENSSL_ia32cap_P' isn't defined
          /usr/bin/ld: final link failed: bad value
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified

xAsh commented on 2024-10-25 13:26 (UTC)

had to manually add options=('!lto') in the PKGBUILD otherwise it wouldn't build:

/usr/bin/ld: /home/me/.cache/yay/librespot/src/librespot-0.5.0/target/release/deps/librespot-2a4e48a3be4758f8: hidden symbol `ring_core_0_17_8_OPENSSL_ia32cap_P' isn't define

ToastedWookiee commented on 2024-10-24 07:27 (UTC)

==> Making package: librespot 0.5.0-2 (Thu 24 Oct 2024 03:17:01 AM EDT)
==> Retrieving sources...
  -> Downloading librespot-0.5.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  287k    0  287k    0     0   141k      0 --:--:--  0:00:02 --:--:--  239k
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
    librespot-0.5.0.tar.gz ... FAILED
==> ERROR: One or more files did not pass the validity check!

HurricanePootis commented on 2024-10-15 21:05 (UTC) (edited on 2024-10-16 13:43 (UTC) by HurricanePootis)

Hey, not only is your package out of date, you are also not following the Rust Packaging Guidlines.

Please select a rust toolchain during prepare, so those using rustup can do prepare()

Also, the PGP key seems like it changed for the new commit. Using pgp keys seems like a hassle, especially for AUR packages.

Furthermore, to build with LTO (which is default), -ffat-lto-objects should be added to cflags.

Overall, my proposed changes look like:

diff --git a/PKGBUILD b/PKGBUILD
index 4a10228..cd0a4b4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,8 +4,8 @@
 ## GPG key: https://github.com/roderickvd.gpg

 pkgname=librespot
-pkgver=0.4.2
-_commit=22f8aed
+pkgver=0.5.0
+_commit=84d28e8
 pkgrel=1
 pkgdesc='Open source client library for Spotify'
 arch=('x86_64' 'aarch64')
@@ -19,18 +19,19 @@ depends=(
    'portaudio'
    'sdl2')
 makedepends=('cargo' 'git')
-source=("$pkgname::git+$url#commit=$_commit?signed")
-sha256sums=('SKIP')
-validpgpkeys=('EC57B7376EAFF1A0BB56BB0187F5FDE8A56219F4') ## Roderick van Domberg
+source=("$pkgname::git+$url#commit=$_commit")
+sha256sums=('06414dae1fcaf9d1c657a78f9df1026c2f2efea0d8e62ac7fb09b006ce38bdc7')

 prepare() {
    cd "$pkgname"
-   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+   export RUSTUP_TOOLCHAIN=stable
+   cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
 }

 build() {
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
+   export CFLAGS="$CFLAGS -ffat-lto-objects"
    cd "$pkgname"
    cargo build --release --frozen --features \
        alsa-backend,portaudio-backend,pulseaudio-backend,jackaudio-backend,rodio-backend,rodiojack-backend,sdl-backend,gstreamer-backend

typedrat commented on 2024-10-10 20:14 (UTC)

This fails to build currently using either makepkg manually or rua. I get the following error:

error: failed to download `aesni v0.10.0`

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

Also, I should note that this will not build if you are using rustup through pacman in an isolated build environment, because there is no specific toolchain requested.

johnhamelink commented on 2023-01-23 02:52 (UTC)

For me, the gpg --recv-keys EC57B7376EAFF1A0BB56BB0187F5FDE8A56219F4 command for Roderick van Domburg's key was not working - gpg would return gpg: keyserver receive failed: No data.

I was able to get past this manually with curl https://github.com/roderickvd.gpg | gpg --import.

flipflop97 commented on 2022-05-08 13:10 (UTC)

Do you mean disabling the other features too? Those only add extra optional audio backends which can be nice to have depending on your platform. AFAIK they don't break anything, but let me know if they do!

whynothugo commented on 2022-05-04 22:04 (UTC)

Thanks for the fix! I tried patching this upstream... but am blocked due to builds failing on some older Rust versions they still support. So this is a saver!

BTW: does anything break if you diverge from the upstream default features like librespot-git does? It might be a "more arch" approach, if feasible.