Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Add LMS + SqueezeLite to ARM64 (c2/pine) #354

Closed
Fourdee opened this issue May 25, 2016 · 16 comments
Closed

DietPi-Software | Add LMS + SqueezeLite to ARM64 (c2/pine) #354

Fourdee opened this issue May 25, 2016 · 16 comments

Comments

@Fourdee
Copy link
Collaborator

Fourdee commented May 25, 2016

Currently RPi is the only device that have these installation options available.

Request: http://dietpi.com/phpbb/viewtopic.php?f=12&t=440&p=1917#p1915

My notes: http://dietpi.com/phpbb/viewtopic.php?f=12&t=440&p=1917#p1917

@Fourdee
Copy link
Collaborator Author

Fourdee commented May 25, 2016

Worth a shot:

wget https://github.com/Logitech/slimserver/archive/public/7.9.zip -O package.zip
unzip package.zip
rm package.zip

cp -R slimserver-public-7.9/CPAN/* /usr/share/perl/5.20.2/CPAN/

Cant seem to find the perl modules in repo either: https://packages.debian.org/stable/perl/

@Fourdee Fourdee added this to the v130 milestone Aug 17, 2016
@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 17, 2016

http://dietpi.com/phpbb/viewtopic.php?f=12&t=440&p=2597#p2597

@Gabba35
Copy link

Gabba35 commented Aug 20, 2016

I am also very interested in this and I have made a comment in that thread. I have made a small donation.

I recall reading something about not being able to use Perl 5.22 on the Odroid C2.

@Fourdee Fourdee self-assigned this Aug 20, 2016
@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 20, 2016

The issue:

LMS will not run due to "missing or failed" loading of Perl modules.

root@DietPi:~# squeezeboxserver
The following modules failed to load: DBI EV XML::Parser::Expat HTML::Parser JSON::XS Digest::SHA1 YAML::XS Sub::Name

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 20, 2016

Notes: Attempt 1:

apt-get install missing perl modules, using this package list: https://packages.debian.org/jessie/perl/

🈯 XML::Parser::Expat

apt-get install -y libxml-parser-perl

🈺 HTML::Parser | Already installed, no effect

apt-get install -y libhtml-parser-perl

🈺 DBI | installs, no effect

apt-get install -y libdbi-perl

🈯 JSON::XS

apt-get install -y libjson-xs-perl 

🈺 Sub::Name | Installs, no effect

apt-get install -y libsub-name-perl

🈺 YAML::XS | Installs, no effect

apt-get install -y libyaml-libyaml-perl

🈺 Digest::SHA1 | Installs, no effect

apt-get install -y libdigest-sha-perl

🈺 EV | Installs, no effect

apt-get install -y libev-perl

Leaves us with:

root@DietPi:~# squeezeboxserver
The following modules failed to load: DBI EV HTML::Parser Digest::SHA1 YAML::XS Sub::Name

Did a bit of "hack and slash":

#Install perl modules that work from repo
apt-get install -y libxml-parser-perl libjson-xs-perl

# - DBI
apt-get install -y libdbi-perl
cp /usr/lib/aarch64-linux-gnu/perl5/5.20/DBI.pm /usr/share/perl5/Slim/Schema/DBI.pm
cp /usr/lib/aarch64-linux-gnu/perl5/5.20/DBI.pm /usr/share/squeezeboxserver/CPAN/DBI.pm

# - HTML::Parser
apt-get install -y libhtml-parser-perl
cp -R /usr/lib/aarch64-linux-gnu/perl5/5.20/HTML/* /usr/share/squeezeboxserver/CPAN/HTML/

# - EV
apt-get install -y libev-perl
cp /usr/lib/aarch64-linux-gnu/perl5/5.20/EV.pm /usr/share/squeezeboxserver/CPAN/EV.pm

# - Sub::Name
apt-get install -y libsub-name-perl
cp /usr/lib/aarch64-linux-gnu/perl5/5.20/Sub/Name.pm /usr/share/squeezeboxserver/CPAN/Sub/Name.pm

# -  JSON::XS
apt-get install -y libjson-xs-perl
cp /usr/lib/aarch64-linux-gnu/perl5/5.20/JSON/XS.pm /usr/share/squeezeboxserver/CPAN/YAML/XS.pm

# - YAML::XS
apt-get install -y libyaml-libyaml-perl
cp -R /usr/lib/aarch64-linux-gnu/perl5/5.20/YAML/* /usr/share/squeezeboxserver/CPAN/YAML/

# - Digest::SHA1
apt-get install -y libdigest-sha-perl
cp /usr/lib/aarch64-linux-gnu/perl5/5.20/Digest/SHA.pm /usr/share/squeezeboxserver/CPAN/Digest/SHA1.pm
cp -R /usr/lib/aarch64-linux-gnu/perl5/5.20/Digest/* /usr/share/squeezeboxserver/CPAN/Digest/

find /usr/share -type d -name Digest


# root@DietPi:~# squeezeboxserver
# The following CPAN modules were found but cannot work with Logitech Media Server:
  # Audio::Scan (loaded <not found>, need 0.93)
  # Image::Scale (loaded  but missing object file, need 0.08)

# To fix this problem you have several options:
# 1. Install the latest version of the module(s) using CPAN: sudo cpan Some::Module
# 2. Update the module's package using apt-get, yum, etc.
# 3. Run the .tar.gz version of Logitech Media Server which includes all required CPAN modules.

# - Audio::Scan
apt-get install -y libaudio-scan-perl

# - Image::Scale
#libimage-size-perl

apt-get install -y cpanminus
cpan Image::Scale

# Image::Scale requires at least one of libjpeg or libpng, please install one or both and try again.
# -> N/A
# -> FAIL Configure failed for Image-Scale-0.12.
apt-get install libjpeg-dev libpng-dev
cpan Image::Scale
cp /root/.cpanm/work/1471704886.9410/Image-Scale-0.12/lib/Image/Scale.pm /usr/share/squeezeboxserver/CPAN/Image/Scale.pm

apt-get install -y build-essential
cpanm Image::Scale@0.08

cp /usr/local/lib/aarch64-linux-gnu/perl/5.20.2/Image/Scale.pm /usr/share/squeezeboxserver/CPAN/Image/Scale.pm

# root@DietPi:~# squeezeboxserver
# dirsFor: Didn't find a match request: [scprefs]
# Can't locate loadable object for module DBD::SQLite in @INC (@INC contains: /usr/share/squeezeboxserver/CPAN/arch/5.20/aarch64-linux-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.20/aarch64-linux-thread-multi/auto /usr/share/squeezeboxserver/CPAN/arch/5.20.2/aarch64-linux-gnu-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.20.2/aarch64-linux-gnu-thread-multi/auto /usr/share/squeezeboxserver/CPAN/arch/5.20/aarch64-linux-gnu-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.20/aarch64-linux-gnu-thread-multi/auto /usr/share/squeezeboxserver/CPAN/arch/aarch64-linux-gnu-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.20 /usr/share/squeezeboxserver/lib /usr/share/squeezeboxserver/CPAN /usr/share/squeezeboxserver /usr/share/squeezeboxserver/CPAN /usr/share/squeezeboxserver /usr/sbin /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/aarch64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl5/Slim/Utils/DbCache.pm line 10.
# Compilation failed in require at /usr/share/perl5/Slim/Utils/DbCache.pm line 10.
# BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Utils/DbCache.pm line 10.
# Compilation failed in require at /usr/share/perl5/Slim/Utils/Cache.pm line 49.
# BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Utils/Cache.pm line 49.
# Compilation failed in require at /usr/share/perl5/Slim/Music/Info.pm line 33.
# BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Music/Info.pm line 33.
# Compilation failed in require at /usr/share/perl5/Slim/Utils/Misc.pm line 49.
# Compilation failed in require at /usr/sbin/squeezeboxserver line 225.
# BEGIN failed--compilation aborted at /usr/sbin/squeezeboxserver line 225.

cpanm DBD::SQLite

cp -R /usr/local/lib/aarch64-linux-gnu/perl/5.20.2/DBD /usr/share/squeezeboxserver/CPAN/

# root@DietPi:~# squeezeboxserver
# NOTE: Class::XSAccessor 1.05+ not found, install it for better performance
# [16-08-20 11:11:02.2606] main::init (383) Starting Logitech Media Server (v7.9.0, 1451894331, Mon Jan  4 08:08:41 UTC 2016) perl 5.020002
# [16-08-20 11:11:02.2717] main::changeEffectiveUserAndGroup (1014) Warning: Logitech Media Server must not be run as root!  Trying user squeezeboxserver instead.
# [16-08-20 11:11:02.6105] Slim::Music::TitleFormatter::init (42) Warning: Base class package "Slim::Schema::DBI" is empty.
    # (Perhaps you need to 'use' the module which defines that package first,
    # or make that module available in @INC (@INC contains: /var/lib/squeezeboxserver/cache/InstalledPlugins /usr/share/squeezeboxserver/CPAN/arch/5.20/aarch64-linux-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.20/aarch64-linux-thread-multi/auto /usr/share/squeezeboxserver/CPAN/arch/5.20.2/aarch64-linux-gnu-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.20.2/aarch64-linux-gnu-thread-multi/auto /usr/share/squeezeboxserver/CPAN/arch/5.20/aarch64-linux-gnu-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.20/aarch64-linux-gnu-thread-multi/auto /usr/share/squeezeboxserver/CPAN/arch/aarch64-linux-gnu-thread-multi /usr/share/squeezeboxserver/CPAN/arch/5.20 /usr/share/squeezeboxserver/lib /usr/share/squeezeboxserver/CPAN /usr/share/squeezeboxserver /usr/share/squeezeboxserver/CPAN /usr/share/squeezeboxserver /usr/sbin /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/aarch64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .).
 # at /usr/share/perl5/Slim/Schema/Track.pm line 6.
# BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Schema/Track.pm line 6.
# Compilation failed in require at /usr/share/perl5/Slim/Music/TitleFormatter.pm line 42.
# [16-08-20 11:11:02.6154] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /var/lib/squeezeboxserver/prefs/plugin/state.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.


cpanm Slim::Schema::DBI

# root@DietPi:~# cpanm Slim::Schema::DBI
# ! Finding Slim::Schema::DBI on cpanmetadb failed.
# ! Finding Slim::Schema::DBI () on mirror http://www.cpan.org failed.
# ! Couldn't find module or a distribution Slim::Schema::DBI

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 20, 2016

Notes:

Following instructions from binary:

If you're running some unsupported Linux/Unix platform, please use the buildme.sh
script located here:

https://github.com/Logitech/slimserver-vendor/tree/public/7.9/CPAN

Same issues as per: LMS-Community/slimserver-vendor#9. Even with the updated config.x files. Fails to build.

wget "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" -O /root/slimserver-vendor/CPAN/icu/source/config.guess
wget "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" -O /root/slimserver-vendor/CPAN/icu/source/config.sub

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 20, 2016

Notes:

Build CPAN modules:

apt-get install -y cpanminus build-essential yasm nasm
cpanm DBI EV XML::Parser::Expat HTML::Parser JSON::XS Digest::SHA1 YAML::XS Sub::Name

24 distributions installed

root@DietPi:~# squeezeboxserver
The following modules failed to load: DBI EV XML::Parser::Expat HTML::Parser JSON::XS Sub::Name

nts, check paths

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 22, 2016

Finally getting somewhere:
image

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 22, 2016

Current issues:

  • Music scan does not work, scan does not return any results.
[16-08-22 13:02:04.3764] Slim::Utils::Misc::msg (1233) Warning: [13:02:04.3758] Can't locate auto/IO/Interface/autosplit.ix:   ./auto/IO/Interface/autosplit.ix: Permission denied at /usr/share/perl/5.20/AutoLoader.pm line 181.
 at /usr/share/squeezeboxserver/CPAN/IO/Interface.pm line 12.
JSON::XS object version 3.02 does not match bootstrap parameter 2.34 at /usr/lib/aarch64-linux-gnu/perl/5.20/DynaLoader.pm line 210.
Compilation failed in require at /usr/share/squeezeboxserver/CPAN/JSON/XS/VersionOneAndTwo.pm line 5.
BEGIN failed--compilation aborted at /usr/share/squeezeboxserver/CPAN/JSON/XS/VersionOneAndTwo.pm line 5.
Compilation failed in require at /usr/share/perl5/Slim/Utils/Prefs/Base.pm line 23.
BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Utils/Prefs/Base.pm line 23.
Compilation failed in require at /usr/share/perl/5.20/base.pm line 100.
        ...propagated at /usr/share/perl/5.20/base.pm line 110.
BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 23.
Compilation failed in require at /usr/share/perl5/Slim/Utils/Prefs.pm line 79.
BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Utils/Prefs.pm line 79.
Compilation failed in require at /usr/sbin/squeezeboxserver-scanner line 77.
BEGIN failed--compilation aborted at /usr/sbin/squeezeboxserver-scanner line 77.
JSON::XS object version 3.02 does not match bootstrap parameter 2.34 at /usr/lib/aarch64-linux-gnu/perl/5.20/DynaLoader.pm line 210.
Compilation failed in require at /usr/share/squeezeboxserver/CPAN/JSON/XS/VersionOneAndTwo.pm line 5.
BEGIN failed--compilation aborted at /usr/share/squeezeboxserver/CPAN/JSON/XS/VersionOneAndTwo.pm line 5.
Compilation failed in require at /usr/share/perl5/Slim/Utils/Prefs/Base.pm line 23.
BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Utils/Prefs/Base.pm line 23.
Compilation failed in require at /usr/share/perl/5.20/base.pm line 100.
        ...propagated at /usr/share/perl/5.20/base.pm line 110.
BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 23.
Compilation failed in require at /usr/share/perl5/Slim/Utils/Prefs.pm line 79.
BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Utils/Prefs.pm line 79.
Compilation failed in require at /usr/sbin/squeezeboxserver-scanner line 77.
BEGIN failed--compilation aborted at /usr/sbin/squeezeboxserver-scanner line 77.

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 22, 2016

@Gabba35
Looking good, should make v130 release:
image

@Gabba35
Copy link

Gabba35 commented Aug 23, 2016

Thanks a lot Fourdee! Looks like you've cracked it! Seems like it wasn't too straight forward. What were the main issues (in fairly lay language!)?

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 23, 2016

@Gabba35

C2 LMS+Squeezelite working perfectly. Will be available in DietPi v130.

What were the main issues

LMS uses Perl CPAN modules. As far as I can tell, LMS do not bundle the ARM64 binaries for these in their 7.9 deb package. Notice the ARM-hf (ARM32), i386 (32bit PC), x86_64 (64bit PC) but no ARM64.
image

So basically I needed to get those ARM64 binaries made.

LMS have a build script that should do this automatically (https://github.com/Logitech/slimserver-vendor/blob/public/7.9/CPAN/buildme.sh), however, it fails for ARM64: https://github.com/Fourdee/DietPi/issues/354#issuecomment-241210059

So, I ran squeezeboxserver and followed the errors to manually build each Perl CPAN module. Took a few days on and off (LMS likes specific versions of the CPAN modules). I've zipped up the binaries and hosted on DietPi. So when users install LMS through DietPi in v130, no cpan complies are needed.

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 23, 2016

Note to self:
Test Pine A64

Edit:
Working fine

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 24, 2016

Completed. LMS+Squeezelite Available in v130 for ARM64 devices.

@Fourdee Fourdee closed this as completed Aug 24, 2016
@Gabba35
Copy link

Gabba35 commented Aug 25, 2016

Awesome, thanks for the explanation. Putting it all together would have been way beyond what I am capable of. Thanks so much for getting it working!

@Fourdee
Copy link
Collaborator Author

Fourdee commented Aug 25, 2016

@Gabba35
We still have a bit to do on v130 before its released: https://github.com/Fourdee/DietPi/milestone/31

In the mean time, you can do a install of LMS by using the testing branch: https://github.com/Fourdee/DietPi/blob/master/TESTING-BRANCH.md#steps-to-use-the-dietpi-testing-branch
I'd recommend using a different SDcard if you use the testing branch.

@Fourdee Fourdee mentioned this issue Sep 6, 2016
Fourdee referenced this issue Sep 6, 2016
v130
(06/09/16)

New device:

NanoPi M2 DietPi image is now available. Many thanks to k-plan for sending me this tiny, but powerful board!: http://dietpi.com/phpbb/viewtopic.php?f=8&t=620#p2664

Changes / Improvements / Optimizations:

DietPi-Software | Uae4ARM | Amiga emulator for your Raspberry Pi. Collaboration with the creator of AmiBerry (Dimitris) to bring you the highest performance Amiga emulation, running on lightweight DietPi: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=64#p64

DietPi-Software | ARM64 | Squeezebox Server (Logitech Media Centre) and Squeezelite are now available for installation: https://github.com/Fourdee/DietPi/issues/354

DietPi-Software | Pi-hole | Installation updated to latest version 2.9: https://github.com/Fourdee/DietPi/issues/478

DietPi-Software | RPi monitor updated to latest version, thanks to WolfganP: https://github.com/Fourdee/DietPi/issues/238#issuecomment-241461096

DietPi-Software | You can now find the URL links for the online docs in the Help Menu. It will also list the URL links for each peice of software installed: https://github.com/Fourdee/DietPi/issues/483

DietPi-Software | xcompmgr is now installed by default with Xserver on ALL devices. Limits desktop composition effects to improve performance and reduce "moving window lag".

DietPi-Config | Raspberry Pi OpenGL driver can now be enabled in 'Display Options' > 'Change Resolutions' menu. Requires RPi 2 or 3: https://github.com/Fourdee/DietPi/issues/497

DietPi-Config | Added RPi 3 overclocking profiles: https://github.com/Fourdee/DietPi/issues/485

DietPi-Config | Added Stress test. Available from Tools menu. This can be used to test stability of your system (runs CPU, Ram and filesystem IO tests based on your device capabilities).

DietPi-Backup | Will no longer backup manpages/docs and .deb package caches.

DietPi-Apt-Get_Update | Has been removed. This previously allowed for threaded apt-get updates in background. We have now reverted to standard usage of apt-get update.

Bug fixes:

DietPi-Banner | IP address will now display if one exists on system.

Raspberry Pi | Improved detection for RPi 3 devices, when overclocked.

Raspberry Pi | Fix for scroll lock LED by Midwan: https://github.com/Fourdee/DietPi/issues/474#issuecomment-243215674

Raspberry Pi | Resolved an issue where running Kodi from desktop would render artifacts on exit. Many thanks to 467815891a for reporting the issue: https://github.com/Fourdee/DietPi/issues/484

Raspberry Pi | Mixer volume will now be set to -0.1db during boot (originally -50db), if soundcard is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants