LMS-Community/slimserver-vendor

Config.guess/Config.sub Outdated in some package

meszarosa opened this issue · 10 comments

I have Issues compiling CPAN due to outdated config.guess/config.sub files in the following packages:
*libpng-1.4.3.tar.gz
*libmediascan-0.1.tar.gz
*libjpeg-turbo-1.1.1.tar.gz
*jpegsrc.v8b.tar.gz
*jpegsrc.v6b.tar.gz
*icu4c-4_6-src.tgz
*giflib-4.1.6.tar.gz
*freetype-2.4.2.tar.gz
*expat-2.0.1.tar.gz
*db-5.1.25.tar.gz
*libexif-0.6.20.tar.bz2
*mysql-5.1.37.tar.bz2

The architecture parameters, which is not supported by the current config files:
UNAME_MACHINE=aarch64
UNAME_RELEASE=3.10.65-7-pine64-longsleep
UNAME_SYSTEM=Linux
UNAME_VERSION=#28 SMP PREEMPT Sat Apr 23 20:13:25 CEST 2016

Updating to the latest version of these files from official sources solves the compilation problem.

Other containers, which contains outdated version of the same files:
faad2\faad2-2.7.tar.gz
flac\flac-1.2.1.tar.gz
flac\libogg-1.1.3.tar.gz
sox\flac-1.2.1.tar.gz
sox\libmad-0.15.1b.tar.gz
sox\libogg-1.1.4.tar.gz
sox\libvorbis-1.2.3.tar.gz
sox\sox-14.3.1.tar.gz
sox\wavpack-4.60.1.tar.bz2
wavpack\wavpack-4.50.1.tar.bz2

Thanks for the feedback. Yes, sooner or later we will run into this kind of problem in a larger scale. But do you really need to compile specifically for this platform? Maybe it's just the architecture name confusing the scripts?

I guess that's the pine64 cpu as featured on pine64.com? Does it run any particular Linux, or a "standard" Ubuntu for ARM? What would "perl -v" say?

This is indeed pine64. It runs now Debian Linux, see: http://forum.pine64.org/showthread.php?tid=497
I'm using default Perl installation, where Perl -v says:
"This is perl 5, version 20, subversion 2 (v5.20.2) built for aarch64-linux-gnu-thread-multi
(with 47 registered patches, see perl -V for more detail)"

I intend to use this platform as a host for Logitech Media Server.

@meszarosa @mherger

I had same issues, https://github.com/Logitech/slimserver-vendor/blob/public/7.9/CPAN/buildme.sh fails on ARM64.

I managed to get LMS 7.9 working on ARM64 for DietPi http://dietpi.com.

I manually went through each CPAN module/version and built as needed. Tested on Odroid C2 and Pine A64.
image

root@DietPi:~# uname -a
Linux DietPi 3.14.65+ #1 SMP PREEMPT Sat Aug 13 08:41:07 CEST 2016 aarch64 GNU/Linux
root@DietPi:~# squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logfile /var/log/squeezeboxserver/error.log --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --user root
[16-08-24 08:45:03.2344] main::init (383) Starting Logitech Media Server (v7.9.0, 1451894331, Mon Jan  4 08:08:41 UTC 2016) perl 5.020002
[16-08-24 08:45:03.2462] main::changeEffectiveUserAndGroup (1050) Warning: Logitech Media Server must not be run as root! Only do this if you know what you're doing!!

[16-08-24 08:45:03.6823] Slim::Utils::SQLiteHelper::postConnect (374) Optimizing DB because of missing or empty sqlite_stat1 table
[16-08-24 08:45:03.6889] Slim::Schema::forceCommit (2149) Warning: Trying to commit transactions before DB is initialized!
[16-08-24 08:45:03.8609] Slim::Utils::SQLiteHelper::postConnect (374) Optimizing DB because of missing or empty sqlite_stat1 table
[16-08-24 08:45:03.8673] Slim::Schema::forceCommit (2149) Warning: Trying to commit transactions before DB is initialized!
[16-08-24 08:45:04.8083] Slim::Utils::SQLiteHelper::postConnect (374) Optimizing DB because of missing or empty sqlite_stat1 table
[16-08-24 08:45:04.8147] Slim::Schema::forceCommit (2149) Warning: Trying to commit transactions before DB is initialized!
[16-08-24 08:45:05.3241] main::checkDataSource (1120) Warning: Schema updated or no media found in the database, initiating scan.

You need to build nearly all CPAN modules for ARM64 and transfer to /usr/share/squeezeboxserver

Debian Jessie:

wget http://dietpi.com/downloads/binaries/all/logitechmediaserver_7.9.0_all.deb -O package.deb
dpkg -i package.deb
rm package.deb

apt-get install -y cpanminus build-essential yasm nasm libxml-parser-perl zlib1g-dev libjpeg-dev libpng-dev
#   XML::Parser::Expat is installed via libxml-parser-perl.deb
cpanm DBI EV HTML::Parser JSON::XS@2.34 Digest::SHA1 YAML::XS Sub::Name Audio::Scan Image::Scale@0.08 DBD::SQLite@1.34_01 Class::XSAccessor@1.18 Template::Stash::XS JSON::XS@2.34 IO::Interface@1.06 IO::AIO@3.71

# - Copy to LMS CPAN dir, or symlink.
cp -R /usr/local/lib/aarch64-linux-gnu/perl/5.20.2/* /usr/share/squeezeboxserver/CPAN/
cp -R /usr/local/lib/aarch64-linux-gnu/perl/5.20.2/auto /usr/share/squeezeboxserver/CPAN/arch/5.20/arm-linux-gnueabihf-thread-multi-64int/

# Run
squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logfile /var/log/squeezeboxserver/error.log --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --user root
mcdee commented

I had to compile for the Odroid C2 as well and updated the buildme.sh script to pull the latest version of config.guess and config.sub and place them in the required places for each package. If you are interested I can submit the altered script as a PR.

@mcdee - yes, please send a pull request. It would give me an idea of what needs to be done. I can still ignore it if I don't like it :-).

@mherger - Michael - thanks for awesome work over the years ! Thank you !!!
As for the issues - i think 64bit linux running on ARM platform is becoming more common. I tried to get it running on Odroid C2 running Armbian Ubuntu ... following @mcdee's changes i succeeded but with some smaller issues and still not clear where to but 'binaries' (faad/flac/sox).

hi @mcdee - thanks for your changes - i have successfully compiled/built LMS server ... had issue with Image.pm in git of the 'slimserver' being 'older' then the .so module built ... but that was one copy and thats all it took !
Am running it on Odroid C2, Armbian (Ubuntu 16.04, all 64bit) and this is then all 64bit setup and seems to be working real well !

can you advise on last remaining piece - binaries for sox/faad/flac are also built but am not sure if LMS server is using them. Could you advice on NAME of the directory within /Bin of LMS server. I think 'aarch64-linux' or maybe 'aarch64-linux-thread-multi' ... or maybe something else. not sure how to check if LMS is using those ... tried some upsampling/downsampling and in process list i can see server starting '/usr/bin/sox' so maybe none of the options i tried works.
but net is 'build' scripts are not copying those ... and am not sure what name of the folder has to be :)

thank you !

btw, i copied the binaries (sox, faad, flac) just into the 'Bin' directory (above various architectures') and it works. So figuring out a proper name ... not sure how to get slimserver to show me where it looked for so probably easier to know based on what criteria 'arch' directory name is picked by lms.

thanks !

@mherger LMS 7.9 does not compile on arm64 for the reasons known (outdated config.guess and config.sub files). I tried to repace those config.* files in all packages mentioned by @meszarosa above but I still get an error that a config.sub file can't be run:

tar zxvf db-5.1.25.tar.gz
tar done
configure: error: cannot run /bin/bash ../dist/config.sub
make: *** No targets specified and no makefile found. Stop.
make failed

Please change the outdated config.guess and config.sub files in all packages so that all CPAN modules of LMS 7.9 can be compiled on recent arm64 platforms under Debian. I am using an EspressoBin and Armbian.

Would it be possible to provide a logitechmediaserver_7.9.1_arm64.deb file for download too ?

Here is some output of the updated scripts:

root@ebin: ./config.guess
aarch64-unknown-linux-gnu
root@ebin: ./config.sub
aarch64-unknown-linux-gnu
root@ebin: cat /proc/version
Linux version 4.4.91-mvebu64 (root@armbian) (gcc version 6.4.1 20170707 (Linaro GCC 6.4-2017.08) ) #4 SMP PREEMPT Wed Oct 11 01:15:00 CEST 2017

@ebin-dev, @meszarosa Did PR #30 fix this issue, so that it can be closed?

@fsbruva - thanks for following up. Yes, IMHO this issue is resolved, not only by updating the build script. But there are aarch64 binaries available now, too.