mikebrady / shairport-sync

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

Cannot autoconf the package on Arch, RPi2 #168

Closed ngoctnq closed 8 years ago

ngoctnq commented 8 years ago

I successfully installed this on my Raspbian, but not on Arch. Doing the same thing I did with Raspbian or use EliaCereda's makepkg give me similar errors:

[ngoc@qTeePi ~]$ git clone https://github.com/mikebrady/shairport-sync.git
Cloning into 'shairport-sync'...
remote: Counting objects: 4200, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 4200 (delta 0), reused 0 (delta 0), pack-reused 4195
Receiving objects: 100% (4200/4200), 1.86 MiB | 2.30 MiB/s, done.
Resolving deltas: 100% (2605/2605), done.
Checking connectivity... done.

[ngoc@qTeePi ~]$ autoreconf -i -f --with-alsa --withstdoout --with-pipe --with-avahi --with-ssl=openssl --with-soxr --with-systemd --with-configfile --with-pkg-config
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = "en_US.UTF8",
    LANG = "en_US.UTF8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
strict.pm did not return a true value at /usr/share/autoconf/Autom4te/Channels.pm line 70.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/Channels.pm line 70.
Compilation failed in require at /usr/share/autoconf/Autom4te/ChannelDefs.pm line 19.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/ChannelDefs.pm line 19.
Compilation failed in require at /usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /usr/bin/autoreconf line 39.
mikebrady commented 8 years ago

There seems to be something strange about your Arch setup, as if it's not fully initialized, or something.

I suggest you search for Arch Linux issues related to the first error message.

Also, BTW, you have misspelled --with-stdout, though it didn't get that far.

ngoctnq commented 8 years ago

I'm fairly new to Arch, so there might be something that I missed. I installed base-devel, built a couple things successfully (like pigpio). And yes I don't think it got that far either - it happened similarly with Elia's correct flags.

mikebrady commented 8 years ago

After installing Arch on a Pi, I did an update and a few more things:

#pacman -Syu --ignore filesystem
#pacman -S --needed base-devel
#pacman -S --needed extra/git
ngoctnq commented 8 years ago

I think I did them all:

[root@qTeePi ngoc]# pacman -Syu --ignore filesystem
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 alarm is up to date                                                                                                    0.0   B  0.00B/s 00:00 [---------------------------------------------------------------------------------------]   0%
 aur is up to date
:: Starting full system upgrade...
 there is nothing to do
[root@qTeePi ngoc]# pacman -S --needed base-devel
:: There are 25 members in group base-devel:
:: Repository core
   1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file  7) findutils  8) flex  9) gawk  10) gcc  11) gettext  12) grep  13) groff  14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch  20) pkg-config  21) sed
   22) sudo  23) texinfo  24) util-linux  25) which

Enter a selection (default=all): 
warning: autoconf-2.69-2 is up to date -- skipping
warning: automake-1.15-1 is up to date -- skipping
warning: binutils-2.25.1-3 is up to date -- skipping
warning: bison-3.0.4-1 is up to date -- skipping
warning: fakeroot-1.20.2-1 is up to date -- skipping
warning: file-5.25-1 is up to date -- skipping
warning: findutils-4.4.2-6 is up to date -- skipping
warning: flex-2.5.39-1 is up to date -- skipping
warning: gawk-4.1.3-1 is up to date -- skipping
warning: gcc-5.2.0-2 is up to date -- skipping
warning: gettext-0.19.6-1 is up to date -- skipping
warning: grep-2.22-1 is up to date -- skipping
warning: groff-1.22.3-4 is up to date -- skipping
warning: gzip-1.6-1 is up to date -- skipping
warning: libtool-2.4.6-3 is up to date -- skipping
warning: m4-1.4.17-1 is up to date -- skipping
warning: make-4.1-1 is up to date -- skipping
warning: pacman-4.2.1-4 is up to date -- skipping
warning: patch-2.7.5-1 is up to date -- skipping
warning: pkg-config-0.29-1 is up to date -- skipping
warning: sed-4.2.2-3 is up to date -- skipping
warning: sudo-1.8.15-1 is up to date -- skipping
warning: texinfo-6.0-1 is up to date -- skipping
warning: util-linux-2.27.1-1 is up to date -- skipping
warning: which-2.21-1 is up to date -- skipping
 there is nothing to do
[root@qTeePi ngoc]# pacman -S --needed extra/git 
warning: git-2.6.3-1 is up to date -- skipping
 there is nothing to do
mikebrady commented 8 years ago

That looks fine alright. Have you set a locale?

ngoctnq commented 8 years ago

That is the one thing that has been wrapping around my head for days. I tried many things but none really resolved completely, so I'm living with the errors.

[ngoc@qTeePi code]$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF8
LC_CTYPE="en_US.UTF8"
LC_NUMERIC="en_US.UTF8"
LC_TIME="en_US.UTF8"
LC_COLLATE="en_US.UTF8"
LC_MONETARY="en_US.UTF8"
LC_MESSAGES="en_US.UTF8"
LC_PAPER="en_US.UTF8"
LC_NAME="en_US.UTF8"
LC_ADDRESS="en_US.UTF8"
LC_TELEPHONE="en_US.UTF8"
LC_MEASUREMENT="en_US.UTF8"
LC_IDENTIFICATION="en_US.UTF8"
LC_ALL=en_US.UTF8
[ngoc@qTeePi code]$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
mikebrady commented 8 years ago

There seem to be some threads out there about stuff that looks similar...

ngoctnq commented 8 years ago

After a while more searching, I resolved my locale problem - I did not uncomment some lines in /etc/locale.gen to locale-gen, and after a reboot the locale problem is fixed. However, the shairport-sync problem remains.

ngoctnq commented 8 years ago

Almost all of the sources I found about this says that the Perl modules need to end with "1;", and not really anything else.

mikebrady commented 8 years ago

Where are you downloading your Arch Linux from, please?

mikebrady commented 8 years ago

Just looking with new eyes. You have conflated the autoreconf and the ./configure commands and arguments. Try separating them out.

ngoctnq commented 8 years ago

I got it from the official Arch Linux ARM website - NOOBS said the RPi2 was not compatible.

ngoc ~/shairport-sync $ autoconf -i -f
Carp.pm did not return a true value at /usr/lib/perl5/core_perl/Data/Dumper.pm line 22.
BEGIN failed--compilation aborted at /usr/lib/perl5/core_perl/Data/Dumper.pm line 22.
Compilation failed in require at /usr/share/autoconf/Autom4te/C4che.pm line 33.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/C4che.pm line 33.
Compilation failed in require at /usr/bin/autom4te line 37.
BEGIN failed--compilation aborted at /usr/bin/autom4te line 37.
ngoc ~/shairport-sync $ autoreconf -i -f
strict.pm did not return a true value at /usr/share/autoconf/Autom4te/Channels.pm line 70.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/Channels.pm line 70.
Compilation failed in require at /usr/share/autoconf/Autom4te/ChannelDefs.pm line 19.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/ChannelDefs.pm line 19.
Compilation failed in require at /usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /usr/bin/autoreconf line 39.
ngoc ~/shairport-sync $ ./configure --with-alsa --withstdout --with-pipe --with-avahi --with-ssl=openssl --with-soxr --with-systemd --with-configfile --with-pkg-config
-bash: ./configure: No such file or directory
ngoctnq commented 8 years ago

According to https://bbs.archlinux.org/viewtopic.php?id=161569, I had to force reinstall perl, and so far it removed my previous problem. A new one arises: autoreconf: 'configure.ac' or 'configure.in' is required even though there is a configure.ac there, however cloning the git again solved it. At ./configure, there is configure: WARNING: unrecognized options: --with-configfile, but that was listed on your instruction to be the default option, so I don't worry much.

At the end of the day, it's all Arch's problem, not a issue on your side. Sorry for that. And thanks for everything, the package, and the dedication of solving the issue. P/S: I'm the one with the hair loss from a wrong directory in the shairport-sync.service from the RPi forum too; sorry I never replied, that thing has no email notification.

mikebrady commented 8 years ago

Thanks for the update. I did a check yesterday with Arch Linux for a Raspberry Pi, (not a Raspberry Pi 2 that you were using), and verified that the following sequence works:

I obtained Arch Linux from http://archlinuxarm.org/developers/downloads and created an SD card image using guide at http://archlinuxarm.org/platforms/armv6/raspberry-pi.

Booting into the system, I performed the following commands as the root user:

pacman -Syu
pacman -S --needed base-devel
pacman -S --needed extra/git


To use my version of Elia Cereda's script, you need to log in as a non-root user with sudo privileges. The default alarm user is a member of the wheel group, but the wheel group must be enabled to activate sudo. To enable it, as the root user, use visudo to find and uncomment the line:

#%wheel ALL=(ALL) ALL

so that it reads:

%wheel ALL=(ALL) ALL

Then, as a non-root user with sudo privileges:

$git clone https://github.com/MikeBrady/shairport-sync-PKGBUILD.git
$cd shairport-sync-PKGBUILD/
$makepkg -sfi

This will run the script, which will download the required packages, download, compile and finally install the latest release of Shairport Sync.

You should edit the configuration at /etc/shairport-sync.conf to suit your requirements. Next, you should enable the Shairport Sync service to start on boot up:

sudo systemctl enable shairport-sync

Finally, you should reboot. This is necessary as Shairport Sync relies on avahi and dbus, and these services are not enabled when first installed – it easiest to simply reboot. 
 BTW, the default non-root user alarm is not a member of the audio group, so it can not see or access any audio devices. To allow it to see and access audio devices, it must be added to the group audio:

sudo usermod -a -G audio alarm
ngoctnq commented 8 years ago

I did everything similarly, but I set my own group to be sudoers with ngoc ALL=(ALL) ALL. The problem is probably only the RPi2's perl package.