Package Details: snapcast 0.11.1-1

Git Clone URL: https://aur.archlinux.org/snapcast.git (read-only)
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: 9
Popularity: 1.130782
First Submitted: 2016-01-01 21:21
Last Updated: 2017-03-21 22:07

Latest Comments

slackline commented on 2017-10-18 07:22

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

mogwai commented on 2017-10-04 11:33

@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

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

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

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

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

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

@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

Could you also include a user service?

mogwai commented on 2017-04-19 19:36

"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."

All comments