Package Details: snapcast 0.28.0-2

Git Clone URL: https://aur.archlinux.org/snapcast.git (read-only, click to copy)
Package Base: snapcast
Description: Synchronous multi-room audio player
Upstream URL: https://github.com/badaix/snapcast
Keywords: audio multi-room
Licenses: GPL
Submitter: mogwai
Maintainer: mogwai
Last Packager: mogwai
Votes: 34
Popularity: 0.004670
First Submitted: 2016-01-01 21:21 (UTC)
Last Updated: 2024-04-19 19:20 (UTC)

Latest Comments

1 2 3 4 5 6 .. 8 Next › Last »

mogwai commented on 2024-04-20 21:00 (UTC)

@m040601: No, none of the alarm parts are hopelessly outdated. They are outdated, but there are more than sufficient to compile any modern package. I've got a working snapcast binary for armv7h here that I compiled on my alarm system and that is running on my 32-bit alarm system right now.

What's the real problem is that the alarm maintainers did not properly block upstream changes to /etc/makepkg.conf that are incompatible with armv7h. Please remove -mno-omit-leaf-frame-pointer from the CFLAGS in /etc/makepkg.conf and try again. It's simply the case that this new flag that got introduced a few weeks ago is incompatible with 32-bit systems.

NB: This doesn't mean that you won't run into other problems like out-of-memory, though.

m040601 commented on 2024-04-20 20:47 (UTC) (edited on 2024-04-20 23:23 (UTC) by m040601)

@mogwai : Thanks for your help, trying to troubleshoot and understand these issues. Much appreciated, specially for slightly older hardware that should still be suppoorted.

mogwai commented on 2024-04-20 09:17 (UTC)
@m040601: The package does also compile and run for aarch64 and armv7h

Yes I know it does. Let me restate again to be crystal clear again. I dont mean it does not run on Arm. I mean it does not even compile or ArchlinuxArm, specifically the armv7h, that is the Raspberrpy Pi 2 v1.1 (32 bit). That is not the Raspberry Pi 2 1.2, which is the same processor as the Raspberry Pi 3 and runs 64bit ArchlinuxArm. Not because it is Arm, but because ArchlinuxArm is hopelessly outdated.

$ uname -a

Linux alarmpi 6.6.28-2-rpi #1 SMP Fri Apr 19 12:18:22 MDT 2024 armv7l GNU/Linux

$ pacman -Qi linux

Name            : linux-rpi
Version         : 6.6.28-2
Description     : Linux kernel and modules (RPi Foundation fork)
Architecture    : armv7h
URL             : https://github.com/raspberrypi/linux
Groups          : None
Provides        : linux=6.6.28  WIREGUARD-MODULE
Depends On      : coreutils  firmware-raspberrypi  kmod  linux-firmware  mkinitcpio>=0.7
Optional Deps   : wireless-regdb: to set the correct wireless channels of your country [installed]
Required By     : None
Optional For    : None
Conflicts With  : linux  linux-rpi-16k  uboot-raspberrypi
Replaces        : None
Installed Size  : 26.91 MiB
Packager        : Arch Linux ARM Build System <builder+xu0@archlinuxarm.org>
Build Date      : Fri 19 Apr 2024 06:46:31 PM WEST
Install Date    : Fri 19 Apr 2024 10:04:47 PM WEST
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : Signature

By the day, when you say:

... The package does also compile and run for aarch64 and armv7h. I've tested this before uploading.

QUESTION 1:

Which specific armv7h board or chromebook did you test this with ? How much memory does that system have ?

I'm using a system with more then 1GB of memory, though. So that could be a difference.

Yes of course. That is very true for arm and compiling c++ applications in general. I also have another armv7h system also running ArchlinuxArm. It is a Samsung Chromebook (snow version). Instead of 1000MB of the Raspberry Pi, it has 2GB or RAM. And a 2 core but snappier CPU. It is always much much faster compiling.

Could you share the actual error that you're getting, 
related to not having enough memory?

Right now in my system, it is not related to not having enough memory. It is simply that the compiler is outdated. There is no way to even start the build.

Lets go step by step.

sudo pacman -S boost cmake

Package (5)    New Version  Net Change  Download Size

extra/cppdap   1.58.0-1       1.60 MiB       0.29 MiB
extra/jsoncpp  1.9.5-2        0.58 MiB       0.11 MiB
extra/rhash    1.4.4-1        0.32 MiB       0.17 MiB
extra/boost    1.83.0-5     172.97 MiB      13.74 MiB
extra/cmake    3.29.2-1      82.01 MiB      16.88 MiB

No problem with those above.

Let's try "snapcast":

$ yay -S snapcast

==> Making package: snapcast 0.28.0-2 (Sat 20 Apr 2024 09:33:16 PM WEST)
==> Retrieving sources...
..........
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
    snapcast-0.28.0.tar.gz ... Passed
    snapweb-0.7.0.zip ... Passed
    snapcast.sysusers ... Passed
    snapcast.tmpfiles ... Passed
    snapcast.install ... Passed

No problems above.

:: (1/1) Parsing SRCINFO: snapcast
==> Making package: snapcast 0.28.0-2 (Sat 20 Apr 2024 09:33:49 PM WEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  ............
  -> Extracting snapcast-0.28.0.tar.gz with bsdtar
==> Starting prepare()...
==> Sources are ready.
==> Making package: snapcast 0.28.0-2 (Sat 20 Apr 2024 09:34:43 PM WEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree

No problems above.

==> Starting build()...
-- The CXX compiler identification is GNU 12.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:60 (message):
  The C++ compiler

    "/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/dev/shm/aurdestybashrc/snapcast/src/snapcast-0.28.0/build/CMakeFiles/CMakeScratch/TryCompile-Fn75r6'

    Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_b5b6f/fast
    /usr/bin/make  -f CMakeFiles/cmTC_b5b6f.dir/build.make CMakeFiles/cmTC_b5b6f.dir/build
    make[1]: Entering directory '/dev/shm/aurdestybashrc/snapcast/src/snapcast-0.28.0/build/CMakeFiles/CMakeScratch/TryCompile-Fn75r6'
    Building CXX object CMakeFiles/cmTC_b5b6f.dir/testCXXCompiler.cxx.o
    /usr/bin/c++   -march=armv7-a -mfloat-abi=hard -mfpu=neon -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS  -o CMakeFiles/cmTC_b5b6f.dir/testCXXCompiler.cxx.o -c /dev/shm/aurdestybashrc/snapcast/src/snapcast-0.28.0/build/CMakeFiles/CMakeScratch/TryCompile-Fn75r6/testCXXCompiler.cxx
    c++: error: unrecognized command-line option ‘-mno-omit-leaf-frame-pointer’; did you mean ‘-fno-omit-frame-pointer’?
    make[1]: *** [CMakeFiles/cmTC_b5b6f.dir/build.make:78: CMakeFiles/cmTC_b5b6f.dir/testCXXCompiler.cxx.o] Error 1
    make[1]: Leaving directory '/dev/shm/aurdestybashrc/snapcast/src/snapcast-0.28.0/build/CMakeFiles/CMakeScratch/TryCompile-Fn75r6'
    make: *** [Makefile:127: cmTC_b5b6f/fast] Error 2


  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: snapcast-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
snapcast - exit status 4

That is the problem. It's not that there is little memory available. It is an outdated version of the compiler in the ArchlinuxArm repos. It should be "13" but it is "12" from 2022.

$ pacman -Qo /usr/bin/c++

/usr/bin/c++ is owned by gcc 12.1.0-2.1

$ pacman -Qo /usr/bin/gcc

/usr/bin/gcc is owned by gcc 12.1.0-2.1

pacman -Qi gcc

Name            : gcc
Version         : 12.1.0-2.1
Description     : The GNU Compiler Collection - C and C++ frontends
Architecture    : armv7h
URL             : https://gcc.gnu.org
Licenses        : GPL3  LGPL  FDL  custom
Groups          : base-devel
Provides        : None
Depends On      : gcc-libs=12.1.0-2.1  binutils>=2.28  libmpc  zstd  libisl.so=23-32
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 121.91 MiB
Packager        : Arch Linux ARM Build System <builder+xu0@archlinuxarm.org>
Build Date      : Sat 28 May 2022 08:16:07 PM WEST
Install Date    : Fri 03 Jun 2022 12:40:23 AM WEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature


EDIT: Some usefull references:

https://archlinuxarm.org/forum/viewtopic.php?f=9&t=16808&sid=0689e401e72d76f2b8ec819be12d1f40 ,

Postby ml50 » Mon Mar 18, 2024 10:13 am

is it possible to get gcc in release 13.2 ? (actually 12.1)

The current version of gcc is erroring with some PKGBUILDS that require the -mno-omit-leaf-frame-pointer option

https://archlinuxarm.org/forum/viewtopic.php?f=7&t=16848&sid=0689e401e72d76f2b8ec819be12d1f40 ,

Postby debo » Mon Apr 15, 2024 2:21 am

Is there some reason why we are still using gcc-12 on ArchLinuxArm? 

mogwai commented on 2024-04-20 09:17 (UTC)

@m040601: The package does also compile and run for aarch64 and armv7h. I've tested this before uploading. I'm using a system with more then 1GB of memory, though. So that could be a difference.

Could you share the actual error that you're getting, so that perhaps the underlying issue can be solved if it's not related to not having enough memory?

m040601 commented on 2024-04-19 22:45 (UTC) (edited on 2024-04-19 22:47 (UTC) by m040601)

Note to mpd users:

If you are using mpd to stream to some snapcast clients, on other computers, you dont even need snapcast installed on the server.

It took me by surprise, but mpd has a kind of "native snapcast" functionality.

You only need to configure the server computer's mpd with a snapcast "output plugin" (see the mpd docs)

And have snapcast installed on the client computer, to run "snapclient"

The codec seen on the snapclient seems to be "PCM" (not opus, flac etc).

m040601 commented on 2024-04-19 22:04 (UTC) (edited on 2024-04-19 22:11 (UTC) by m040601)

On the possibility of "snapcast-bin" on AUR.

Because of C/C++? snapcast is always a beast to compile.

As of 2024, the snapcast developers release precompiled binarys for Debian on github:

Assets
snapcast_0.28.0_amd64-debian-bookworm.zip  1.97 MiB
snapcast_0.28.0_amd64-debian-bullseye.zip  1.98 MiB
snapcast_0.28.0_arm64-debian-bookworm.zip  1.77 MiB
snapcast_0.28.0_arm64-debian-bullseye.zip  1.79 MiB
snapcast_0.28.0_armhf-debian-bookworm.zip  1.55 MiB
snapcast_0.28.0_armhf-debian-bullseye.zip  1.57 MiB
snapcast_0.28.0_win64.zip                  24.70 MiB

Changelog:

.... • CI: Build debian bookworm and bullseye packages for amd64, arm and arm64 • Delete deprecated Makefiles, CMake is the only supported buildsystem

... The provided debian packages are automated builds from snapos github actions https://github.com/badaix/snapos/actions. Every zip file contains debian packages for:

• the snapserver • the snapclient without pulse audio support (requires less dependencies) • the snapclient with pulse audio support .... ```

Maybe there is a way to "reuse" these Debian things to provide some Archlinux "snapcast-bin" PKGBUILD's ?

I think I've seen this on other tools for Archlinux, but I'm not sure or competetent on PKGBUILD's.

m040601 commented on 2024-04-19 21:58 (UTC) (edited on 2024-04-19 22:10 (UTC) by m040601)

Information report for Arm (ArchlinuxArm) users:

Theoretically, Snapcast should work on Arm systems, so this is still correct:

  arch=('x86_64' 'armv6h' 'armv7h' 'aarch64')

The snapcast developers even release precompiled binarys for Debian on github:

Assets
snapcast_0.28.0_amd64-debian-bookworm.zip  1.97 MiB
snapcast_0.28.0_amd64-debian-bullseye.zip  1.98 MiB
snapcast_0.28.0_arm64-debian-bookworm.zip  1.77 MiB
snapcast_0.28.0_arm64-debian-bullseye.zip  1.79 MiB
snapcast_0.28.0_armhf-debian-bookworm.zip  1.55 MiB
snapcast_0.28.0_armhf-debian-bullseye.zip  1.57 MiB
snapcast_0.28.0_win64.zip                  24.70 MiB

(Note: Debian calls "armv7" , "armhf".)

However in ArchlinuxArm the "gcc" package is hopelessly outdated:

Name            : gcc
Version         : 12.1.0-2.1
Description     : The GNU Compiler Collection - C and C++ frontends
Architecture    : armv7h
Depends On      : gcc-libs=12.1.0-2.1  binutils>=2.28  libmpc  zstd  libisl.so=23-32
Installed Size  : 121.91 MiB
Packager        : Arch Linux ARM Build System <builder+xu0@archlinuxarm.org>
Build Date      : Sat 28 May 2022 08:16:07 PM WEST
Install Date    : Fri 03 Jun 2022 12:40:23 AM WEST

And so because "snapcast" requires gcc 13.0 this PKGBUILD currently fails on ArchlinuxArm

I havent been able to build snapcast on my Raspberry Pi 2 1.1 (armv7h) since 2022.

So I keep the old v0.26.0 version installed:

[s1@alarmpi ~]$ snapserver -v
snapserver v0.26.0
Copyright (C) 2014-2021 BadAix (snapcast@badaix.de).

I remember vaguely in 2022 it was an hassle to compile it with only 1GB of memomry. It took like an hour. But it did compile.

[s1@alarmpi ~]$ yay -Qi snapcast
Name            : snapcast
Version         : 0.26.0-2
Description     : Synchronous multi-room audio player
Architecture    : armv7h
URL             : https://github.com/badaix/snapcast
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : alsa-lib  avahi  libvorbis  flac  opus  expat  libsoxr  libpulse
Installed Size  : 6.37 MiB
Packager        : Unknown Packager
Build Date      : Fri 21 Oct 2022 04:11:58 PM WEST
Install Date    : Fri 21 Oct 2022 06:13:34 PM WEST
Install Reason  : Explicitly installed
Validated By    : None

And this v0.26 still seems to work fine with other computers on the network running v0.28

matejdro commented on 2023-11-13 11:23 (UTC)

Build fails on arm (Raspberry PI 3):

{standard input}: Assembler messages:
{standard input}:95154: Error: undefined local label `.L15288'
{standard input}:95174: Error: undefined local label `.L15288'

robbie_t commented on 2023-07-31 13:56 (UTC)

@mogwai you're amazing. Thank you very much! How can I reciprocate, votes (as mentioned by @m040601), patreon?

m040601 commented on 2023-07-31 10:08 (UTC) (edited on 2023-07-31 10:11 (UTC) by m040601)

Thanks to @mogwai for taking good and prompt care of this (amazing, very usefull and important) PKGBUILD. Also works fine in Arch arm (raspeberry pi, chromebooks etc). Really nice addition to mpd etc.

Just hope that with enough votes this could turn into an offficial Arch package.

mogwai commented on 2023-07-31 07:55 (UTC)

@robbie_t: Just investigated this further and the patch was trivial, so I added it to this AUR package. It should now build again. Could you please check?