Package Details: snapcast 0.26.0-1

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: 31
Popularity: 0.20
First Submitted: 2016-01-01 21:21 (UTC)
Last Updated: 2021-12-22 20:43 (UTC)

Latest Comments

Corubba commented on 2022-01-09 23:42 (UTC) (edited on 2022-01-09 23:43 (UTC) by Corubba)

I believe pkgconfig should be in the mandatory dependencies.

And why do you believe that? pkgconf is part of the base-devel group, and following the docs it should not be explicitly included as makedepends.

cmc commented on 2022-01-09 23:28 (UTC)

Thanks for making the package!

I believe pkgconfig should be in the mandatory dependencies.

mogwai commented on 2021-12-24 20:50 (UTC)

@m040601: This gcc11 patch is unrelated. That code is now in 0.26.0 itself. Please report upstream as this is indeed most likely an out-of-memory issue.

m040601 commented on 2021-12-24 19:46 (UTC) (edited on 2021-12-24 19:59 (UTC) by m040601)

I wonder if anyone can give me any tips or insight before I try to report my problem to upstream Snapcast.

I've been running Archlinux (ARM) and compiling Snapcast on my 1GB memory humble little Raspberry Pi 2 1.1 (32 bit armv7h) for 2 years. Until version 0.26 had no problems. It always took aaaaaaages to compile this C++ thingy, but in the end it bravely managed to do it. Running MPD and Snapcast with Opus encoding was also very smooth, and the CPU and RAM has always been more than enough.

With the latest version 0.26 in December, I'm stuck. I can't finish compiling it, without running out of memory apparently. Tried already several times. It's the exact same system I've been running for 2 years. But somehow I cant get past 15% in the compilation process and makepkg aborts with:

boost::asio::wait_traits<std::chrono::_V2::steady_clock> > >::heap_entry> > >’ changed in GCC 7.1
 1198 |    _M_realloc_insert(end(), __x);
      |    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
{standard input}: Assembler messages:
{standard input}:178970: Error: invalid operands (*UND* and .ARM.extab sections) for `-'
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [server/CMakeFiles/snapserver.dir/build.make:118: server/CMakeFiles/snapserver.dir/control_session_http.cpp.o] Error 1
make[2]: Leaving directory '/home/r1/deleteme/snapcast/src/snapcast-0.26.0/build'
make[1]: *** [CMakeFiles/Makefile2:160: server/CMakeFiles/snapserver.dir/all] Error 2
make[1]: Leaving directory '/home/r1/deleteme/snapcast/src/snapcast-0.26.0/build'
make: *** [Makefile:136: all] Error 2
make: Leaving directory '/home/r1/deleteme/snapcast/src/snapcast-0.26.0/build'
==> ERROR: A failure occurred in build().
    Aborting...

Sometimes I get a kernel "oom kill" thingy. The system runs out of memory, and the kernel aborts the process and reboots.

alarmpi kernel:

cc1plus invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), 
CPU: 1 PID: 16110 Comm: cc1plus Tainted: G         C        5.10.83-1-r>
kernel: Hardware name: BCM2835
[<8010efe8>] (unwind_backtrace) from [<8010ade0>] (show_stack+0x10/0x14

and

oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allow>
Out of memory: Killed process 16110 (cc1plus) total-vm:876596kB, anon-r>
oom_reaper: reaped process 16110 (cc1plus), now anon-rss:0kB, file-rss:>

I have very little understanding of C++, compilation processes etc. But the first thing that occurred to me, is that, with version 0.26, maybe somehow the requirements of Snapcast have changed, are beefier now, and this hardware can't cope with it now.

Tried to shut down all the other non necessary services, and tried over and over to no avail.

Is this a plausible explanation ?

But before I report this to Snapcast upstream, I want to be 100% sure, that it's not the PKGBUILD fault.

I noticed something with this PKGBUILD here on AUR. The latest changes to the PKGBUILD removed this line:

- "gcc11-fix.patch"

So this patch is no longer being applied as was in version 0.25. I dont know what the patch was for but:

Could it somehow be related to this patch (or lack of it)  ?

Thanks in advance.

PS: Maybe related ? I saw this on Snapcast issues:

About the debian armhf package, https://github.com/badaix/snapcast/issues/960

...So the gcc and c++ libs are still needed in a more recent version. I guess because Snapcast 0.26
requires C++17 instead of C++11.

mogwai commented on 2021-07-25 17:13 (UTC)

@cgirard: I've been trying to get exact solution upstreamed for quite a while now. See upstream issue: https://github.com/badaix/snapcast/issues/486

You're probably right that, in the meantime, I should change the text in the install file to refer to changing the location of the fifo rather than trying to work around the problems with the default location in /tmp

cgirard commented on 2021-07-25 16:31 (UTC)

Hi, instead of advising of disabling protected FIFOs, it would be probably a better idea to just advise to use /run/snapserver/snapfifo as you even care to create /run/snapserver

mogwai commented on 2021-05-17 08:22 (UTC)

@Hazzl: Thank you for upstreaming!

Since gcc11 hit the core repository today and no new release is available upstream (yet), I've added your patch. Thanks again for raising this issue.

mogwai commented on 2021-05-16 14:35 (UTC)

@Hazzl: Could you please report this issue upstream?

Hazzl commented on 2021-05-16 14:29 (UTC)

I need the following patch to compile with g++-11.1.0

--- snapcast-0.25.0/common/message/message.hpp  2021-05-15 13:16:03.000000000 +0200
+++ snapcast-0.25.0b/common/message/message.hpp 2021-05-16 16:15:34.243593726 +0200
@@ -29,6 +29,7 @@
 #include <sys/time.h>
 #endif
 #include <vector>
+#include <memory>

 /*
 template<typename CharT, typename TraitsT = std::char_traits<CharT> >

mogwai commented on 2021-01-16 11:36 (UTC)

@m040601: done

m040601 commented on 2021-01-13 17:55 (UTC) (edited on 2021-01-13 18:06 (UTC) by m040601)

At https://github.com/badaix/snapcast there is the "docs" folder . Its content ends up in /usr/share/doc/snapcast

But there's also some extra usefull stuff besides that "docs" folder.

  • A usefull file "changelog.md" file.
  • A folder "control" containing example files using curl and jq

Could you please also include it ? Thanks.

mogwai commented on 2020-10-15 20:30 (UTC)

Indeed, I just noticed that the original github alert is referring to a different commit than the current 0.22.0 tag. It seems he added one more commit to fix a missing include, and then re-tagged. Glad to have that cleared up. I thought I was going crazy. :-)

CultofRobots commented on 2020-10-15 20:26 (UTC)

Probably happened because snapcast dev pulled v0.22.0 assets about an hour after they uploaded it to github, then uploaded new assets under the same release tag a bit later.

mogwai commented on 2020-10-15 20:18 (UTC)

Thanks for the notification. I don't know what went wrong. I built the package on several hosts (x86_64, armv7h and aarch64) before submitting it, using standard makepkg commands. Anyhow, it should be solved now.

m040601 commented on 2020-10-15 17:18 (UTC) (edited on 2020-10-15 17:18 (UTC) by m040601)

Source sha256sums was not updated, same problem

==> Verification of source files with sha256sums...
snapcast-0.22.0.tar.gz FAILED

sgar commented on 2020-10-15 14:13 (UTC) (edited on 2020-10-15 14:14 (UTC) by sgar)

Source sha256sums was not updated..

==> Verification of source files with sha256sums...
snapcast-0.22.0.tar.gz ... ERROR
snapcast.sysusers ... Durchgelaufen
snapcast.tmpfiles ... Durchgelaufen
snapcast.install ... Durchgelaufen

mogwai commented on 2020-07-22 14:04 (UTC)

@m040601 : Actually the doc folder in the package tarball is (primarily) meant for the github online documentation. These are md files that are linked through from the main README.md in the toplevel directory. But I can see some value in adding them to the package nevertheless. I've added them in 0.20.0-2.

m040601 commented on 2020-07-15 11:43 (UTC) (edited on 2020-07-15 11:45 (UTC) by m040601)

Please include the content that this package's "docs" folder provides. It should be installed under '/usr/share/doc/snapcast' It has important information, that is not on the man pages. It is also included in the archive you're pulling from, https://github.com/badaix/snapcast/archive/v${pkgver}.tar.gz

slackline commented on 2019-12-28 06:53 (UTC)

@mogwai : Thanks for taking the time to help me out.

I do still have /etc/default/snapclient and it reads...

cat /etc/default/snapclient

defaults file for snapclient
start snapclient automatically?

START_SNAPCLIENT=true

Allowed options:
--help produce help message
-v, --version show version number
-h, --host arg server hostname or ip address
-p, --port arg (=1704) server port
-l, --list list pcm devices
-s, --soundcard arg (=default) index or name of the soundcard
-d, --daemon [=arg(=-3)] daemonize, optional process priority [-20..19]
--user arg the user[:group] to run snapclient as when daemonized
--latency arg (=0) latency of the soundcard
-i, --instance arg (=1) instance id

USER_OPTS="--user snapclient:audio"

SNAPCLIENT_OPTS="-d -h 192.168.1.21 -p 1704"

Which I seem to have edited in the past since the IP address is that of the system so its unchanged.

It still fails though...

systemctl restart snapclient systemctl status snapclient ● snapclient.service - Snapcast client Loaded: loaded (/usr/lib/systemd/system/snapclient.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2019-12-28 06:40:23 UTC; 5s ago Docs: man:snapclient(1) Process: 11700 ExecStart=/usr/bin/snapclient $SNAPCLIENT_OPTS (code=exited, status=1/FAILURE) Main PID: 11700 (code=exited, status=1/FAILURE)

Dec 28 06:40:23 alarmpi systemd[1]: snapclient.service: Scheduled restart job, restart counter is at 5. Dec 28 06:40:23 alarmpi systemd[1]: Stopped Snapcast client. Dec 28 06:40:23 alarmpi systemd[1]: snapclient.service: Start request repeated too quickly. Dec 28 06:40:23 alarmpi systemd[1]: snapclient.service: Failed with result 'exit-code'. Dec 28 06:40:23 alarmpi systemd[1]: Failed to start Snapcast client.

journalctl reports that the problem is because it can not create the required PID file

journalctl -g snapclient Dec 28 06:40:21 alarmpi audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=snapclient comm="systemd" exe="/usr/lib/systemd/systemd" h> Dec 28 06:40:21 alarmpi kernel: audit: type=1130 audit(1577515221.819:1262): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=snapclient comm="systemd" exe>Dec 28 06:40:21 alarmpi snapclient[11694]: Exception: Could not open PID lock file "/var/run/snapclient/pid" Dec 28 06:40:21 alarmpi systemd[1]: snapclient.service: Main process exited, code=exited, status=1/FAILURE Dec 28 06:40:21 alarmpi systemd[1]: snapclient.service: Failed with result 'exit-code'. Dec 28 06:40:21 alarmpi audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=snapclient comm="systemd" exe="/usr/lib/systemd/systemd" ho>Dec 28 06:40:22 alarmpi kernel: audit: type=1131 audit(1577515221.959:1263): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=snapclient comm="systemd" exe> Dec 28 06:40:22 alarmpi systemd[1]: snapclient.service: Scheduled restart job, restart counter is at 1.

The directory /var/run/snapclient existed since I created it the other day when trying to troubleshoot this, but I didn't set the ownership to that of the snapclient user. Having now done so snapclient starts and runs fine. No idea why the directory disappeared though.

Thanks again for your time and for maintaining the package.

mogwai commented on 2019-12-26 15:07 (UTC)

@slackline: There is only a file called /etc/snapserver.conf; there is no /etc/snapclient.conf. The configuration for the client (started through systemd) should still be put into /etc/default/snapclient, just as before with version 0.15. I think the idea is that mainly the server is run through systemd as a daemon. Usually the client is run as a regular user unless it's a headless system. So, could you try your old 0.15 setup for the client with 0.17.1 again? It should simply work as-is.

slackline commented on 2019-12-25 13:52 (UTC)

Hi,

Just upgraded from 0.15.0 to 0.17.1 and I can't seem to get snapclient working.

I've created /etc/snapclient.conf and set SNAPCLIENT_OPTS there...

cat /etc/snapclient.conf

SNAPCLIENT_USER="--user snapclient:audio"

SNAPCLIENT_OPTS="-d -h 192.168.1.21 -p 1704"

...as these are what is required when initialising with systemctl

alarmpi etc # cat /usr/lib/systemd/system/snapclient.service
[Unit]
Description=Snapcast client
Documentation=man:snapclient(1)
Wants=avahi-daemon.service
After=network.target time-sync.target sound.target avahi-daemon.service

[Service]
EnvironmentFile=-/etc/default/snapclient
ExecStart=/usr/bin/snapclient $SNAPCLIENT_OPTS
User=snapclient
Group=snapclient

very noisy on stdout

StandardOutput=null
Restart=on-failure

[Install]
WantedBy=multi-user.target

But when I try starting I get...

systemctl restart snapclient.service
systemctl status snapclient.service

● snapclient.service - Snapcast client Loaded: loaded (/usr/lib/systemd/system/snapclient.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Wed 2019-12-25 13:44:18 UTC; 1min 22s ago Docs: man:snapclient(1) Process: 4135 ExecStart=/usr/bin/snapclient $SNAPCLIENT_OPTS (code=exited, status=1/FAILURE) Main PID: 4135 (code=exited, status=1/FAILURE)

Dec 25 13:44:18 alarmpi systemd[1]: snapclient.service: Scheduled restart job, restart counter is at 5. Dec 25 13:44:18 alarmpi systemd[1]: Stopped Snapcast client. Dec 25 13:44:18 alarmpi systemd[1]: snapclient.service: Start request repeated too quickly. Dec 25 13:44:18 alarmpi systemd[1]: snapclient.service: Failed with result 'exit-code'. Dec 25 13:44:18 alarmpi systemd[1]: Failed to start Snapcast client.

And sure enough its not started...

-- The job identifier is 2750. Dec 25 13:49:32 alarmpi audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=snapclient comm="systemd" exe="/usr/lib/systemd/systemd" h Dec 25 13:49:33 alarmpi snapclient[4169]: Exception: Could not open PID lock file "/var/run/snapclient/pid" Dec 25 13:49:33 alarmpi snapclient[4169]: daemon terminated. Dec 25 13:49:33 alarmpi systemd[1]: snapclient.service: Main process exited, code=exited, status=1/FAILURE -- Subject: Unit process exited -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- An ExecStart= process belonging to unit snapclient.service has exited. -- -- The process' exit code is 'exited' and its exit status is 1. Dec 25 13:49:33 alarmpi systemd[1]: snapclient.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The unit snapclient.service has entered the 'failed' state with result 'exit-code'. Dec 25 13:49:33 alarmpi audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=snapclient comm="systemd" exe="/usr/lib/systemd/systemd" ho Dec 25 13:49:33 alarmpi systemd[1]: snapclient.service: Scheduled restart job, restart counter is at 5. -- Subject: Automatic restarting of a unit has been scheduled -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Automatic restarting of the unit snapclient.service has been scheduled, as the result for -- the configured Restart= setting for the unit. Dec 25 13:49:33 alarmpi systemd[1]: Stopped Snapcast client. -- Subject: A stop job for unit snapclient.service has finished -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- A stop job for unit snapclient.service has finished. -- -- The job identifier is 2819 and the job result is done. Dec 25 13:49:33 alarmpi audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=snapclient comm="systemd" exe="/usr/lib/systemd/systemd" h Dec 25 13:49:33 alarmpi audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=snapclient comm="systemd" exe="/usr/lib/systemd/systemd" ho Dec 25 13:49:33 alarmpi systemd[1]: snapclient.service: Start request repeated too quickly. Dec 25 13:49:33 alarmpi systemd[1]: snapclient.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The unit snapclient.service has entered the 'failed' state with result 'exit-code'. Dec 25 13:49:33 alarmpi systemd[1]: Failed to start Snapcast client. -- Subject: A start job for unit snapclient.service has failed -- Defined-By: systemd -- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- A start job for unit snapclient.service has finished with a failure. -- -- The job identifier is 2819 and the job result is failed.

There are mentiones of a missing /var/run/snapclient/pid file not being accessible and there was no such directory so I created it but it still failed (see last output above for job 2819).

Any pointers on what I should be doing are welcome.

languitar commented on 2019-03-31 11:46 (UTC)

Since some time I have troubles connecting mopidy to snapserver. The internal GStreamer pipeline always terminates immediately with a permission denied error. I just found out that there is a new kernel feature that prevents accessing fifos owned by different users, which is causing this issue: https://unix.stackexchange.com/questions/503111/group-permissions-for-root-not-working-in-tmp

crystaly commented on 2019-02-13 18:10 (UTC)

Problem is fixed now, still don't know what exactly the problem was. Thanks for fixing

mogwai commented on 2019-02-11 14:42 (UTC)

I have changed the source path for sysusers and tmpfiles, even though I was not able to reproduce the problem. Please check if this solves it.

Speranskiy commented on 2019-02-10 19:15 (UTC)

I agree with @crystaly, paths should be fixed.

mogwai commented on 2019-02-10 10:33 (UTC)

@crystaly: Can you please give more elaborate output? Or retry from a clean directory? The package is building fine on my side. I've rebuilt it on 5+ systems from scratch (x64 and armv7h) without problems.

Looking at the PKGBUILD: those relative paths should be "../.." not "../", because the package() function operates from within the src/${pkgname}-${pkgver} directory.

crystaly commented on 2019-02-10 08:59 (UTC)

Package does not build, the path for .sysusers and .tmpfiles should not be ../.. but ../ instead.

mogwai commented on 2019-02-05 09:38 (UTC)

@vknmnn: Should now be fixed. The directories (and users) are now created through sysusers.d and tmpfiles.d. Can you check?

vknmnn commented on 2019-02-03 14:20 (UTC)

Running the client in daemon mode as user snapclient fails to spawn pulseaudio, because /var/lib/snapclient is not being created by this PKGBUILD, so please include it

dvzrv commented on 2018-08-01 13:26 (UTC)

@mogwai: nicely done! :)

One more (minor) thing: You don't have to supply -o root or -g root to install, as package() is run in a fakeroot environment (meaning all files should be installed as root anyhow).

mogwai commented on 2018-07-31 20:52 (UTC)

Package has been updated to get rid of external upstream libraries. @dvzrv: The PKGBUILD has also been updated to incorporate your comments.

Note that this will actually not have any impact on the build itself: flac, vorbis, avahi were already linked dynamically to the archlinux package libraries, and all other external dependencies were headers-only libraries so no libraries need to be linked in.

In order to build the new package, two new AUR packages need to be installed: popl and aixlog. These packages are only needed to build snapcast; they can be uninstalled after the build.

dvzrv commented on 2018-07-31 06:33 (UTC)

@mogwai:

You must put $pkgdir and $srcdir in quotes (as they can contain whitespaces)! It's also best practice to remove empty variables from the PKGBUILD.

Please don't use the external libraries from upstream, unless there are important modifications to them (in that case tell upstream to implement them in their respective upstreams), but use the source tarball and rely on dynamic libraries (you will have to create a few more packages)! However, in case you have to include static libs with submodules (which I don't think you have to), this would be the way to do it: https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git_Submodules

jenniferbrownz commented on 2018-06-16 14:17 (UTC)

More digging and this has been addressed upstream in the development version. http://bit.ly/2KpU5Rl

languitar commented on 2017-12-03 20:16 (UTC)

Most of the upstream dependencies of this software have now proper build systems and could be packaged independently instead of submodule. Would be nice if this package could reflect this.

slackline commented on 2017-11-02 22:01 (UTC) (edited on 2017-11-02 22:29 (UTC) by slackline)

Thanks for the update. This has built for me on a Raspberry Pi ZeroW and Raspberry Pi 2 (a git pull wasn't sufficient though, had to make a fresh clone of the repository).

slackline commented on 2017-10-18 07:22 (UTC)

The new release has addressed issue 255 (along with many others)

mogwai commented on 2017-10-04 11:33 (UTC)

@slackline: AUR packages are maintained by package maintainers; only maintainers can actually make changes to the AUR packages. See e.g. https://wiki.archlinux.org/index.php/Arch_User_Repository for more information. I'm the package maintainer for this one. So providing patches like you've done below would be one of the ways to contribute if you're not the package maintainer. However, for this particular problem I'd rather have someone patch this upstream, since this package works perfectly fine on all the other architectures. Moreover, the arch philosophy is to make packages that match upstream as closely as possible, that means that bugs should be solved upstream and not by arch-specific patches. I noticed that mokman and you have already commented on the relevant github issue report: https://github.com/badaix/snapcast/issues/255 . I'll try to track that bug report closely. As a short term workaround, you can simply add "-latomic" to the client Makefile manually before running the makepkg command. No need for complicated patching procedures (unless you want to automate everything).

mokman commented on 2017-10-01 10:46 (UTC)

thanks slackline for your patch. i'm trying to apply it but i dont get the path right. here's the error message: patching file client/debian/snapclient.service patching file server/debian/snapserver.service can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -aur snapcast/src/snapcast/client/Makefile snapcast_pizero/src/snapcast/client/Makefile |--- snapcast/src/snapcast/client/Makefile 2017-09-23 19:59:29.449505817 +0000 |+++ snapcast_pizero/src/snapcast/client/Makefile 2017-09-23 20:12:53.363697688 +0000 --------------------------

slackline commented on 2017-09-25 08:27 (UTC)

More digging and this has been addressed upstream in the development version (see https://github.com/badaix/snapcast/blob/develop/client/Makefile) so I expect it not to be an issue when the next release is made.

slackline commented on 2017-09-23 20:59 (UTC)

Done some reading (https://wiki.archlinux.org/index.php/Patching_in_ABS) and have successfully created a patch that has built correctly, but unsure how to make git commits to this AUR package. The diff/patch file (which I opted to call snapcast-pi-zero.patch) is... diff -aur snapcast/src/snapcast/client/Makefile snapcast_pizero/src/snapcast/client/Makefile --- snapcast/src/snapcast/client/Makefile 2017-09-23 19:59:29.449505817 +0000 +++ snapcast_pizero/src/snapcast/client/Makefile 2017-09-23 20:12:53.363697688 +0000 @@ -55,7 +55,7 @@ CXX = g++ STRIP = strip CXXFLAGS += -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -LDFLAGS = -lrt -lasound -logg -lvorbis -lFLAC -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ +LDFLAGS = -lrt -lasound -logg -lvorbis -lFLAC -lavahi-client -lavahi-common -latomic -static-libgcc -static-libstdc++ OBJ += player/alsaPlayer.o browseZeroConf/browseAvahi.o endif ...and after following the advice and building it with makepkg -ei I've moved this into the original, cloned directory and figured the PKGBUILD could be patched with the following... --- snapcast/PKGBUILD 2017-09-23 20:52:37.581340420 +0000 +++ snapcast_pizero/PKGBUILD 2017-09-23 20:52:52.471183333 +0000 @@ -29,6 +29,7 @@ prepare() { cd "$pkgname" patch -p1 -i "$srcdir/$pkgname-systemd.patch" + patch -p1 -i "$srcdir/$pkgname-pi-zero.patch" cd externals # update all submodules git submodule update --init --recursive i.e. adding a short line to ensure the patch is applied. Not got a clue (yet) about how to go about contributing to this build, haven't (yet) found useful documentation, if anyone can point me to resources on contributing to AURE I'll have a go and submitting the patch and the modified PKGBUILD for others to benefit from. I guess one problem might be that this breaks builds on chipsets other than the BCM2835 but I'm unsure how to go about testing that or making applying the patch conditional on the hosts target chipset. Again any pointers to resources on this welcome.

slackline commented on 2017-09-21 08:41 (UTC)

Encountered the same error as mokman trying to build on a Pi Zero W (ARM6vh), unsure how to create patches for AUR builds.

mokman commented on 2017-08-19 13:44 (UTC) (edited on 2017-08-23 11:18 (UTC) by mokman)

i am getting an error trying to install on rpi zero (armv6h) this seems to be related to this problem, a missing -latomic argument: https://github.com/badaix/snapcast/issues/255 ==> Beginne build()... make -C client make[1]: Verzeichnis „/home/mok/build/snapcast/src/snapcast/client“ wird betreten g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c snapClient.cpp -o snapClient.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c stream.cpp -o stream.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c clientConnection.cpp -o clientConnection.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c timeProvider.cpp -o timeProvider.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c player/player.cpp -o player/player.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c decoder/pcmDecoder.cpp -o decoder/pcmDecoder.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c decoder/oggDecoder.cpp -o decoder/oggDecoder.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c decoder/flacDecoder.cpp -o decoder/flacDecoder.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c controller.cpp -o controller.o In file included from /usr/include/c++/7.1.1/map:60:0, from ../externals/json.hpp:47, from ../message/jsonMessage.h:23, from ../message/serverSettings.h:22, from controller.h:26, from controller.cpp:22: /usr/include/c++/7.1.1/bits/stl_tree.h: In Elementfunktion »std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, nlohmann::basic_json<> >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, nlohmann::basic_json<> > >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, nlohmann::basic_json<> > >]«: /usr/include/c++/7.1.1/bits/stl_tree.h:2130:5: Anmerkung: die Parameterübergabe für das Argument vom Typ »std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, nlohmann::basic_json<> >, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, nlohmann::basic_json<> > >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, nlohmann::basic_json<> > > >::const_iterator {aka std::_Rb_tree_const_iterator<std::pair<const std::__cxx11::basic_string<char>, nlohmann::basic_json<> > >}« hat sich in GCC 7.1 geändert _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/7.1.1/vector:69:0, from ../message/message.h:26, from ../message/pcmChunk.h:23, from decoder/decoder.h:22, from controller.h:24, from controller.cpp:22: /usr/include/c++/7.1.1/bits/vector.tcc: In Elementfunktion »void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long long int, long long unsigned int, double, std::allocator>}; _Tp = nlohmann::basic_json<>; _Alloc = std::allocator<nlohmann::basic_json<> >]«: /usr/include/c++/7.1.1/bits/vector.tcc:394:7: Anmerkung: die Parameterübergabe für das Argument vom Typ »std::vector<nlohmann::basic_json<>, std::allocator<nlohmann::basic_json<> > >::iterator {aka __gnu_cxx::__normal_iterator<nlohmann::basic_json<>*, std::vector<nlohmann::basic_json<>, std::allocator<nlohmann::basic_json<> > > >}« hat sich in GCC 7.1 geändert vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/7.1.1/bits/vector.tcc: In Elementfunktion »nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType> nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType>::parser::parse_internal(bool) [with ObjectType = std::map; ArrayType = std::vector; StringType = std::__cxx11::basic_string<char>; BooleanType = bool; NumberIntegerType = long long int; NumberUnsignedType = long long unsigned int; NumberFloatType = double; AllocatorType = std::allocator]«: /usr/include/c++/7.1.1/bits/vector.tcc:105:21: Anmerkung: die Parameterübergabe für das Argument vom Typ »__gnu_cxx::__normal_iterator<nlohmann::basic_json<>*, std::vector<nlohmann::basic_json<>, std::allocator<nlohmann::basic_json<> > > >« hat sich in GCC 7.1 geändert _M_realloc_insert(end(), std::forward<_Args>(__args)...); ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c ../message/pcmChunk.cpp -o ../message/pcmChunk.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c ../common/log.cpp -o ../common/log.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c ../common/sampleFormat.cpp -o ../common/sampleFormat.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c player/alsaPlayer.cpp -o player/alsaPlayer.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -c browseZeroConf/browseAvahi.cpp -o browseZeroConf/browseAvahi.o g++ -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector-strong -fno-plt -std=c++0x -Wall -Wno-unused-function -O3 -DASIO_STANDALONE -DVERSION=\"0.11.1\" -I. -I.. -isystem ../externals/asio/asio/include -I../externals/popl/include -pthread -DHAS_OGG -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON -o snapclient snapClient.o stream.o clientConnection.o timeProvider.o player/player.o decoder/pcmDecoder.o decoder/oggDecoder.o decoder/flacDecoder.o controller.o ../message/pcmChunk.o ../common/log.o ../common/sampleFormat.o player/alsaPlayer.o browseZeroConf/browseAvahi.o -lrt -lasound -logg -lvorbis -lFLAC -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ controller.o: In function `Controller::worker()': controller.cpp:(.text+0x1d58): undefined reference to `__atomic_load_8' stream.o: In function `Stream::getPlayerChunk(void*, std::chrono::duration<long long, std::ratio<1ll, 1000000ll> > const&, unsigned long)': stream.cpp:(.text+0x2af4): undefined reference to `__atomic_load_8' stream.cpp:(.text+0x2d3c): undefined reference to `__atomic_load_8' stream.cpp:(.text+0x3a7c): undefined reference to `__atomic_load_8' stream.cpp:(.text+0x45c4): undefined reference to `__atomic_load_8' timeProvider.o: In function `TimeProvider::setDiffToServer(double)': timeProvider.cpp:(.text+0x244): undefined reference to `__atomic_store_8' timeProvider.cpp:(.text+0x2e0): undefined reference to `__atomic_store_8' timeProvider.o: In function `TimeProvider::setDiff(tv const&, tv const&)': timeProvider.cpp:(.text+0x6a8): undefined reference to `__atomic_store_8' timeProvider.cpp:(.text+0x73c): undefined reference to `__atomic_store_8' collect2: Fehler: ld gab 1 als Ende-Status zurück make[1]: *** [Makefile:70: snapclient] Fehler 1 make[1]: Verzeichnis „/home/mok/build/snapcast/src/snapcast/client“ wird verlassen make: *** [Makefile:9: client] Fehler 2 ==> FEHLER: Ein Fehler geschah in build(). Breche ab... i tried to make a patch but did not succeed doing so. thanks for any help!!

mogwai commented on 2017-08-04 14:48 (UTC)

@Varakh: This is currently not supported upstream. If I would add a user service to the package myself, it would either introduce extra configuration files which are not in the upstream package, or it would be a stripped-down service which would probably need to be customized manually by users anyway. In the latter case, that would just be as much work as writing your own user service from scratch. So neither option makes sense. Could you perhaps ask upstream to add a user service?

Varakh commented on 2017-07-26 11:43 (UTC)

Could you also include a user service?

mogwai commented on 2017-04-19 19:36 (UTC)

"Patch" is a part of the base-devel group. From the AUR wiki page: "Note: Packages in the AUR assume that the base-devel group is installed, i.e. they do not list the group's members as dependencies explicitly."

brianleu commented on 2017-04-19 02:42 (UTC)

"patch" should be added to the list of dependencies!

mogwai commented on 2017-03-17 21:42 (UTC)

Package has been updated to 0.11.0. The snapserver and snapclient services will now run as non-root system users. Please make sure to update the configuration files /etc/default/snapserver and /etc/default/snapclient if you've modified the default versions in the past.

azrdev commented on 2017-03-15 10:14 (UTC)

@languitar: this seems not related to this package, but holds true for the whole AUR. `git clone` on the same url works nevertheless.

languitar commented on 2016-12-26 11:44 (UTC) (edited on 2016-12-26 12:07 (UTC) by languitar)

I am talking about the git repository hosting this pkgbuild. Not the upstream URL. https://aur.archlinux.org/snapcast.git gives a 404 for me.

mogwai commented on 2016-12-25 13:19 (UTC)

@languitar: I cannot reproduce your problem. Rebuilding works fine for me. Do you still get an error? If so, could you send more details?

languitar commented on 2016-12-24 13:46 (UTC)

What is wrong here with the git repository of the PKGBUILD? 404 and clone results in nothing.

mogwai commented on 2016-02-22 14:24 (UTC)

Hi j0s, Thanks for taking the time to debug and report upstream! I'll release the update PKGBUILD once the bug has been solved in a release upstream. If it takes too long, I'll consider adding a patch.

j0s commented on 2016-02-19 11:06 (UTC) (edited on 2016-02-19 11:08 (UTC) by j0s)

I tried out your PKGBUILD for 0.5.0-beta1 and also ran into the problem of segfault when run through systemd. Recompiled with debugging symbols and found that it needs $HOME to be defined in the environment. After adding HOME=/root to /etc/default/snapserver it no longer crashed. From my testing, the clients seem to reestablish connections more reliably in this version, after a server restart. Bug filed: https://github.com/badaix/snapcast/issues/33

mogwai commented on 2016-02-16 10:39 (UTC)

I know that 0.5.0-beta-1 has been released. I have spent considerable time in making an updated PKGBUILD that will build and install this version. However, I found several issues with the binaries: - snapserver runs fine from command line, but crashes when started through systemd (segmentation fault); - snapserver and snapclient ignore some of the command line options. Clearly, this beta is still too buggy. I will only replace the existing 0.4.0 package if the new version provides the existing functionality without crashing. Here is the current PKGBUILD for the beta if you want to help out debugging the beta version: https://gist.github.com/mogwa1/23f9d4f3efbfb770bb08