mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.3k stars 574 forks source link

Build fail - Raspberry Pi 2 Arch Linux ARM #71

Closed joaodriessen closed 9 years ago

joaodriessen commented 9 years ago

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

Including support for soxr-based interpolation checking for soxr_create in -lsoxr... yes Including Avahi mDNS support checking for avahi_client_new in -lavahi-client... yes checking for avahi_strerror in -lavahi-common... yes Including an ALSA back end checking for ALSA... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking getopt_long.h usability... no checking getopt_long.h presence... no checking for getopt_long.h... no checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking mach/mach.h usability... no checking mach/mach.h presence... no checking for mach/mach.h... no checking for memory.h... (cached) yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking for stdint.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for unistd.h... (cached) yes checking for inline... inline checking for int16_t... yes checking for int32_t... yes checking for int64_t... yes checking for pid_t... yes checking for size_t... yes checking for ssize_t... yes checking for uint16_t... yes checking for uint32_t... yes checking for uint64_t... yes checking for uint8_t... yes checking for error_at_line... yes checking vfork.h usability... no checking vfork.h presence... no checking for vfork.h... no checking for fork... yes checking for vfork... yes checking for working fork... yes checking for working vfork... (cached) yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... yes checking for clock_gettime... yes checking for gethostname... yes checking for gettimeofday... yes checking for inet_ntoa... yes checking for memchr... yes checking for memmove... yes checking for memset... yes checking for pow... yes checking for select... yes checking for socket... yes checking for stpcpy... yes checking for strcasecmp... yes checking for strchr... yes checking for strdup... yes checking for strerror... yes checking for strstr... yes checking for strtol... yes checking for strtoul... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating man/Makefile config.status: creating config.h config.status: executing depfiles commands make all-recursive make[1]: Entering directory '/home/joao/Downloads/shairport-sync-PKGBUILD-master/src/shairport-sync' Making all in man make[2]: Entering directory '/home/joao/Downloads/shairport-sync-PKGBUILD-master/src/shairport-sync/man' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/joao/Downloads/shairport-sync-PKGBUILD-master/src/shairport-sync/man' make[2]: Entering directory '/home/joao/Downloads/shairport-sync-PKGBUILD-master/src/shairport-sync' gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT shairport.o -MD -MP -MF .deps/shairport.Tpo -c -o shairport.o shairport.c mv -f .deps/shairport.Tpo .deps/shairport.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT rtsp.o -MD -MP -MF .deps/rtsp.Tpo -c -o rtsp.o rtsp.c mv -f .deps/rtsp.Tpo .deps/rtsp.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT mdns.o -MD -MP -MF .deps/mdns.Tpo -c -o mdns.o mdns.c mv -f .deps/mdns.Tpo .deps/mdns.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT mdns_external.o -MD -MP -MF .deps/mdns_external.Tpo -c -o mdns_external.o mdns_external.c mv -f .deps/mdns_external.Tpo .deps/mdns_external.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT common.o -MD -MP -MF .deps/common.Tpo -c -o common.o common.c mv -f .deps/common.Tpo .deps/common.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT rtp.o -MD -MP -MF .deps/rtp.Tpo -c -o rtp.o rtp.c mv -f .deps/rtp.Tpo .deps/rtp.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT player.o -MD -MP -MF .deps/player.Tpo -c -o player.o player.c mv -f .deps/player.Tpo .deps/player.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT alac.o -MD -MP -MF .deps/alac.Tpo -c -o alac.o alac.c mv -f .deps/alac.Tpo .deps/alac.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT audio.o -MD -MP -MF .deps/audio.Tpo -c -o audio.o audio.c mv -f .deps/audio.Tpo .deps/audio.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT audio_dummy.o -MD -MP -MF .deps/audio_dummy.Tpo -c -o audio_dummy.o audio_dummy.c mv -f .deps/audio_dummy.Tpo .deps/audio_dummy.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT audio_pipe.o -MD -MP -MF .deps/audio_pipe.Tpo -c -o audio_pipe.o audio_pipe.c mv -f .deps/audio_pipe.Tpo .deps/audio_pipe.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT mdns_avahi.o -MD -MP -MF .deps/mdns_avahi.Tpo -c -o mdns_avahi.o mdns_avahi.c mv -f .deps/mdns_avahi.Tpo .deps/mdns_avahi.Po gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -MT audio_alsa.o -MD -MP -MF .deps/audio_alsa.Tpo -c -o audio_alsa.o audio_alsa.c mv -f .deps/audio_alsa.Tpo .deps/audio_alsa.Po gcc -Wno-multichar -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wl,-O1,--sort-common,--as-needed,-z,relro -o shairport-sync shairport.o rtsp.o mdns.o mdns_external.o common.o rtp.o player.o alac.o audio.o audio_dummy.o audio_pipe.o mdns_avahi.o audio_alsa.o -lasound -lavahi-common -lavahi-client -lsoxr -lssl -lpopt -lm -lpthread -ldaemon -lrt shairport.o: In function main': shairport.c:(.text.startup+0x4d0): undefined reference toMD5_Init' shairport.c:(.text.startup+0x4ec): undefined reference to MD5_Update' shairport.c:(.text.startup+0x4f8): undefined reference toMD5_Final' rtsp.o: In function rtsp_conversation_thread_func': rtsp.c:(.text+0x1394): undefined reference toMD5_Init' rtsp.c:(.text+0x13ac): undefined reference to MD5_Update' rtsp.c:(.text+0x13c0): undefined reference toMD5_Update' rtsp.c:(.text+0x13dc): undefined reference to MD5_Update' rtsp.c:(.text+0x13f8): undefined reference toMD5_Update' rtsp.c:(.text+0x141c): undefined reference to MD5_Update' rtsp.c:(.text+0x142c): undefined reference toMD5_Final' rtsp.c:(.text+0x1434): undefined reference to MD5_Init' rtsp.c:(.text+0x1450): undefined reference toMD5_Update' rtsp.c:(.text+0x1464): undefined reference to MD5_Update' rtsp.c:(.text+0x147c): undefined reference toMD5_Update' rtsp.c:(.text+0x148c): undefined reference to MD5_Final' rtsp.c:(.text+0x14c8): undefined reference toMD5_Init' rtsp.c:(.text+0x14dc): undefined reference to MD5_Update' rtsp.c:(.text+0x14f0): undefined reference toMD5_Update' rtsp.c:(.text+0x1508): undefined reference to MD5_Update' rtsp.c:(.text+0x151c): undefined reference toMD5_Update' rtsp.c:(.text+0x1558): undefined reference to MD5_Update' rtsp.c:(.text+0x156c): undefined reference toMD5_Final' common.o: In function base64_enc': common.c:(.text+0x234): undefined reference toBIO_f_base64' common.c:(.text+0x238): undefined reference to BIO_new' common.c:(.text+0x240): undefined reference toBIO_s_mem' common.c:(.text+0x244): undefined reference to BIO_new' common.c:(.text+0x254): undefined reference toBIO_push' common.c:(.text+0x260): undefined reference to BIO_set_flags' common.c:(.text+0x270): undefined reference toBIO_write' common.c:(.text+0x284): undefined reference to BIO_ctrl' common.c:(.text+0x298): undefined reference toBIO_ctrl' common.c:(.text+0x2d8): undefined reference to BIO_free_all' common.o: In functionbase64_dec': common.c:(.text+0x2fc): undefined reference to BIO_f_base64' common.c:(.text+0x300): undefined reference toBIO_new' common.c:(.text+0x310): undefined reference to BIO_set_flags' common.c:(.text+0x314): undefined reference toBIO_s_mem' common.c:(.text+0x318): undefined reference to BIO_new' common.c:(.text+0x328): undefined reference toBIO_push' common.c:(.text+0x33c): undefined reference to BIO_write' common.c:(.text+0x358): undefined reference toBIO_write' common.c:(.text+0x37c): undefined reference to BIO_ctrl' common.c:(.text+0x3ac): undefined reference toBIO_read' common.c:(.text+0x3b8): undefined reference to BIO_free_all' common.o: In functionrsa_apply': common.c:(.text+0x3f8): undefined reference to RSA_size' common.c:(.text+0x42c): undefined reference toRSA_private_decrypt' common.c:(.text+0x464): undefined reference to RSA_private_encrypt' common.c:(.text+0x480): undefined reference toBIO_new_mem_buf' common.c:(.text+0x494): undefined reference to PEM_read_bio_RSAPrivateKey' common.c:(.text+0x4a0): undefined reference toBIO_free' player.o: In function alac_decode': player.c:(.text+0x74): undefined reference toAES_cbc_encrypt' player.o: In function player_play': player.c:(.text+0x1c54): undefined reference toAES_set_decrypt_key' collect2: error: ld returned 1 exit status Makefile:455: recipe for target 'shairport-sync' failed make[2]: * [shairport-sync] Error 1 make[2]: Leaving directory '/home/joao/Downloads/shairport-sync-PKGBUILD-master/src/shairport-sync' Makefile:505: recipe for target 'all-recursive' failed make[1]: * [all-recursive] Error 1 make[1]: Leaving directory '/home/joao/Downloads/shairport-sync-PKGBUILD-master/src/shairport-sync' Makefile:359: recipe for target 'all' failed make: *\ [all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...

mikebrady commented 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?

joaodriessen commented 9 years ago

yes, this is on Arch Linux ARM for Raspberry pi 2 armv7h using the image from the archlinuxarm.org website.

mikebrady commented 9 years ago

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.

joaodriessen commented 9 years ago

Thanks Mike, that worked!

mikebrady commented 9 years ago

Excellent. I'm going to close the issue now, if that's okay. Feel free to reopen it if necessary.

joaodriessen commented 9 years ago

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.

mikebrady commented 9 years ago

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.

joaodriessen commented 9 years ago

wish I didn't have to show my incompetence, but where can i find the necessary log files?

mikebrady commented 9 years ago

Don't worry -- I'll tell you on Monday, when I get back to my machine.

mikebrady commented 9 years ago

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?

joaodriessen commented 9 years ago

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
joaodriessen commented 9 years ago

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)

mikebrady commented 9 years ago

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

joaodriessen commented 9 years ago

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.

mikebrady commented 9 years ago

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.