Closed joaodriessen closed 9 years ago
Thanks for the report. So is this on Arch Linux for Raspberry Pi as installed like this: http://archlinuxarm.org/platforms/armv6/raspberry-pi?
yes, this is on Arch Linux ARM for Raspberry pi 2 armv7h using the image from the archlinuxarm.org website.
Okay, well that was interesting!
First, I think the problem is with ArchLinux. It advertises openssl to the build system but doesn't seem to provide the files needed by the linker. It's weird and I don't get it. Fortunately, there is a workaround – tell shaiport-sync to use polarssl instead. You can do this by editing the PKGBUILD file to look like this:
# Maintainer: Elia Cereda <eliacereda+arch at gmail dot com>
pkgname=shairport-sync-git
pkgver=2.2.2.r52.g82011bb
pkgrel=1
pkgdesc='Emulates an AirPort Express for the purpose of streaming music from iTunes and compatible iPods and iPhones'
url='https://github.com/mikebrady/shairport-sync'
arch=(i686 x86_64 armv6h armv7h)
license=('custom')
backup=(etc/conf.d/shairport-sync)
install='shairport-sync.install'
depends=(alsa-lib libdaemon polarssl avahi popt libsoxr)
makedepends=(git)
source=("git+https://github.com/mikebrady/shairport-sync.git"
shairport-sync.install
shairport-sync.service
shairport-sync.conf
remove-init.d.patch)
sha1sums=('SKIP'
'd51485f3857529b70a29b38814ea60e7dde54ca8'
'fe62feeef1c947ed6ed3500b7b922dcaf9e8987c'
'6c4979abddb4b1c0242a941279d41617ab8d183c'
'83ddd76fdb548bf6321e38ff7cabe14bf2bb35d4')
pkgver() {
cd shairport-sync
git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}
prepare() {
cd shairport-sync
git apply "$srcdir/remove-init.d.patch"
}
build() {
cd shairport-sync
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=polarssl --with-soxr --prefix="$pkgdir/usr"
make
}
package() {
install -D -m644 shairport-sync.service "$pkgdir/usr/lib/systemd/system/shairport-sync.service"
install -D -m644 shairport-sync.conf "$pkgdir/etc/conf.d/shairport-sync"
cd shairport-sync
install -D -m664 LICENSES "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
make install
}
Then it will build against polarssl instead of openssl and, for me, it works.
But wait, there's more!
When you run shairport-sync in archlinux, you need access to the audio cards, so you need to be root, or possibly (I haven't tried) there is an "audio" group or something like that.
Finally, I had to restart the Pi a few times and manually start avahi-daemon to get that working. But all is well now.
Thanks Mike, that worked!
Excellent. I'm going to close the issue now, if that's okay. Feel free to reopen it if necessary.
avahi-daemon is failing or crashing on a regular basis, do you know if this is due to shairport-sync or should I file an issue with the avahi-daemon maintainers? if you can describe how to get access to my logs fyi then I'd be happy to help.
Thanks. I think you could use the "gist" service to post the logfile and then I could have a look. TBH it doesn't sound like a shairport-sync issue, though you never know. My build in running sweetly on my (wireless) network here. The upstream avahi has been stable for quite a while AFAIK at 0.6.31. Can't hurt to have a look, I guess.
wish I didn't have to show my incompetence, but where can i find the necessary log files?
Don't worry -- I'll tell you on Monday, when I get back to my machine.
There's a helpful piece at https://wiki.archlinux.org/index.php/Systemd#Journal. Using the ideas there, I tried, for example, to get anything tagged with avahi from the last boot:
journalctl -b 0 | grep avahi
Then, if I saw something unusual at a particular time, I could get the log from around that time:
journalctl --since="2015-04-19 21:24:00"
Would this be any use?
thanks for the help!
grepping avahi in journalctl outputted this:
[joao@alarmpi ~]$ sudo journalctl -b 0 | grep avahi
[sudo] password for joao:
Apr 19 00:11:36 alarmpi avahi-daemon[187]: Found user 'avahi' (UID 84) and group 'avahi' (GID 84).
Apr 19 00:11:36 alarmpi avahi-daemon[187]: Successfully dropped root privileges.
Apr 19 00:11:36 alarmpi avahi-daemon[187]: avahi-daemon 0.6.31 starting up.
Apr 19 00:11:37 alarmpi avahi-daemon[187]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Successfully called chroot().
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Successfully dropped remaining capabilities.
Apr 19 00:11:37 alarmpi avahi-daemon[192]: chroot.c: open() failed: No such file or directory
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Failed to open /etc/resolv.conf: Invalid argument
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Loading service file /services/rfb.service.
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Loading service file /services/sftp-ssh.service.
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Loading service file /services/ssh.service.
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Network interface enumeration completed.
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Server startup complete. Host name is alarmpi.local. Local service cookie is 1777589356.
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Service "alarmpi" (/services/ssh.service) successfully established.
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Service "alarmpi" (/services/sftp-ssh.service) successfully established.
Apr 19 00:11:37 alarmpi avahi-daemon[187]: Service "alarmpi" (/services/rfb.service) successfully established.
Apr 19 00:11:38 alarmpi avahi-daemon[187]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.2.5.
Apr 19 00:11:38 alarmpi avahi-daemon[187]: New relevant interface eth0.IPv4 for mDNS.
Apr 19 00:11:38 alarmpi avahi-daemon[187]: Registering new address record for 192.168.2.5 on eth0.IPv4.
Apr 19 00:11:40 alarmpi avahi-daemon[187]: Registering new address record for fe80::ba27:ebff:fea4:c9f3 on eth0.*.
as it stands right now, my machine is not responding to it's mDNS name, on any service. i.e.
ssh joao@alarmpi.local
ssh: Could not resolve hostname alarmpi.local: nodename nor servname provided, or not known
using the device's network IP address instead works fine.
I was using shairport-sync just yesterday evening, it does usually fail to connect (or work) when I have a youtube video playing on my mac before I try to connect to shairport-sync.
I'm connected to the network via ethernet, and wouldn't know if the services broadcast conflicting or something, (inappropriately guessing)
grepping shairport-sync in journalctl released this information:
Apr 19 00:11:37 alarmpi shairport-sync[198]: startup
Apr 19 10:11:22 alarmpi shairport-sync[198]: Failed to create secure directory (/home/shairport-sync/.config/pulse): No such file or directory
Apr 19 10:11:35 alarmpi shairport-sync[198]: Failed to create secure directory (/home/shairport-sync/.config/pulse): No such file or directory
Apr 19 10:14:30 alarmpi shairport-sync[198]: Failed to create secure directory (/home/shairport-sync/.config/pulse): No such file or directory
Apr 20 00:00:05 alarmpi pwck[9342]: user 'shairport-sync': directory '/home/shairport-sync' does not exist
you know what. I never considered the problem could lie with my mac. I rebooted my mac and was able to find my raspberry pi on the local network again via mDNS. Now, I don't know whether this is a problem with my mac or not, i.e. whether services are rebroadcast by avahi-daemon when a new device is added to the network. I have no technical expertise. I'll keep any eye on this for a while and if there's anything related to shairport-sync I can find, I'll be sure to inform you.
(Also, I don't want to bother you with technical support type questions)
Thanks for the messages. Looking at the logs, my guess is that avahi-daemon is running alright. To check, try:
ps aux | grep avah
and you should get a response like this:
avahi 196 0.0 0.2 3452 2280 ? Ss Apr16 1:53 avahi-daemon: running [alarmpi.local]
avahi 201 0.0 0.1 3320 1684 ? S Apr16 0:00 avahi-daemon: chroot helper
root 2653 0.0 0.0 2604 552 pts/0 S+ 09:47 0:00 grep avah
Looking at the shairport-sync stuff, I do not get what you are getting. This is what I see:
[root@alarmpi ~]# journalctl -b 0 | grep shairport-sync
Apr 16 21:10:42 alarmpi shairport-sync[381]: startup
Apr 17 00:00:02 alarmpi pwck[439]: user 'shairport-sync': directory '/home/shairport-sync' does not exist
Apr 18 00:00:05 alarmpi pwck[1899]: user 'shairport-sync': directory '/home/shairport-sync' does not exist
Apr 19 00:00:02 alarmpi pwck[2143]: user 'shairport-sync': directory '/home/shairport-sync' does not exist
Apr 20 00:00:03 alarmpi pwck[2507]: user 'shairport-sync': directory '/home/shairport-sync' does not exist
I'm guessing that you have enabled the pulseaudio
back end, which I never use and which I know doesn't work properly. Would I be right? (Shairport-sync was developed for the ALSA back end only and the pulseaudio
stuff is a remnant from the earlier version.)
I do believe I have pulse audio installed.
I didn't enable pulseaudio in the back end. I don't know if this is the default behaviour of the PKGBUILD with pulseaudio installed. I have Mate installed which seems to require pulseaudio for mate-media-pulseaudio, I think pulseaudio is being used for sound on my system.
I will try to remove it from my system. I'll remake shairport following the PKGBUILD above. am I pulling the best version from git using this PKGBUILD?
more strange behaviour: shairport-sync was working well until I switched to a new youtube video. this caused the audio to stop, and my raspberry pi to also stop responding to its mDNS hostname via any service, ssh, afp, vnc etc. (reboot of my mac did not resolve the issue). I'll check whether removing pulseaudio resolves this prob.
Okay. Regarding your original issue, there actually was a bug in the configure.ac file for shairport-sync which only becomes obvious in your scenario. I've fixed it now. Thanks for bringing it to notice.
used PKGBUILD from here: https://github.com/EliaCereda/shairport-sync-PKGBUILD which says "Track upstream's HEAD instead of the 2.1 branch".
tried to make on my system, here's the output of makepkg -a:
makepkg -s ==> Making package: shairport-sync-git 2.1.15.r1.gcf6594d-1 (Tue 14 Apr 09:33:10 CEST 2015) ==> Checking runtime dependencies... ==> Installing missing dependencies... [sudo] password for joao: resolving dependencies... looking for conflicting packages...
Packages (1) libsoxr-0.1.1-3
Total Download Size: 0.06 MiB Total Installed Size: 0.18 MiB
:: Proceed with installation? [Y/n] Y :: Retrieving packages ... libsoxr-0.1.1-3-armv7h 57.5 KiB 117K/s 00:00 [######################] 100% (1/1) checking keys in keyring [######################] 100% (1/1) checking package integrity [######################] 100% (1/1) loading package files [######################] 100% (1/1) checking for file conflicts [######################] 100% (1/1) checking available disk space [######################] 100% (1/1) installing libsoxr [######################] 100% ==> Checking buildtime dependencies... ==> Retrieving sources... -> Cloning shairport-sync git repo... Cloning into bare repository '/home/joao/Downloads/shairport-sync-PKGBUILD-master/shairport-sync'... remote: Counting objects: 3002, done. remote: Compressing objects: 100% (4/4), done. remote: Total 3002 (delta 0), reused 0 (delta 0), pack-reused 2998 Receiving objects: 100% (3002/3002), 1.11 MiB | 212.00 KiB/s, done. Resolving deltas: 100% (1801/1801), done. Checking connectivity... done. -> Found shairport-sync.install -> Found shairport-sync.service -> Found shairport-sync.conf -> Found remove-init.d.patch ==> Validating source files with sha1sums... shairport-sync ... Skipped shairport-sync.install ... Passed shairport-sync.service ... Passed shairport-sync.conf ... Passed remove-init.d.patch ... Passed ==> Extracting sources... -> Creating working copy of shairport-sync git repo... Cloning into 'shairport-sync'... done. ==> Starting pkgver()... ==> Updated version: shairport-sync-git 2.2.2.r52.g82011bb-1 ==> Starting prepare()... ==> Starting build()... configure.ac:21: installing './compile' configure.ac:6: installing './install-sh' configure.ac:6: installing './missing' Makefile.am: installing './depcomp' checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for clock_gettime in -lrt... yes checking for daemon_log in -ldaemon... yes checking for pthread_create in -lpthread... yes checking for exp in -lm... yes checking for POPT... yes checking encryption libraries chosen... checking for SSL... yes