GentooHowTo-Install-02-Ebuild-LMS

Print PDF1 GentooHowTo-Install-02-Ebuild-LMS 1      Source. 2 2      Ebuild : media-sound/logitechmediaserver 2 2.1       Download the ebuild_ 2 2.2       Download the ebuild_ 2 2.3       Copy the ebuild_ 2 2.4       Change the rights_ […]

1

GentooHowTo-Install-02-Ebuild-LMS

1      Source. 2

2      Ebuild : media-sound/logitechmediaserver 2

2.1       Download the ebuild_ 2

2.2       Download the ebuild_ 2

2.3       Copy the ebuild_ 2

2.4       Change the rights_ 3

2.5       Create the manifest 3

2.6       Install the package_ 3

2.7       Problem with perl version_ 4

2.8       Emerge LMS_ 5

3      LMS crashed with Perl module failed to load. 7

3.1       Solution 1 : build CPAN module for i386-linux-thread-multi with Perl5.20_ 8

3.1.1     Build complaining 9

3.1.2     Downgrade gcc 9

3.1.3     Copy CPAN_ 10

3.2       Solution 2 : compile and install Perl 5.18. 10

3.3       Solution 3 : compile and install Perl 5.18 and LMS_ 10

4      LMS Configuration_ 11

 

 


1         Source.

https://wiki.gentoo.org/wiki/Overlay/Local_overlay

2         Ebuild : media-sound/logitechmediaserver

2.1      Download the ebuild

https://github.com/hickinbottoms/logitechmediaserver-bin-ebuild-for-gentoo

 

Click on download

A file is downloaded and contains a subfolder : media-sound\logitechmediaserver-bin

2.2      Download the ebuild

Follow the instruction: https://github.com/hickinbottoms/logitechmediaserver-bin-ebuild-for-gentoo/blob/master/README

\logitechmediaserver-bin-ebuild-for-gentoo-master.zip\logitechmediaserver-bin-ebuild-for-gentoo-master\media-sound\logitechmediaserver-bin\

2.3      Copy the ebuild

Copy this file on Linux and go on this folder : cd /home/files/install/logitechmediaserver

Unzip the archive : unzip logitechmediaserver-bin-ebuild-for-gentoo-master.zip

 

Copy the subfolder “media-sound/logitechmediaserver-bin” to /usr/local/portage/media-sound/logitechmediaserver-bin :


2.4      Change the rights

chown -R portage:portage /usr/local/portage

I don’t know if it is necessary :

pushd /usr/local/portage/media-sound/logitechmediaserver-bin

repoman manifest

>>> Creating Manifest for /usr/local/portage/media-sound/logitechmediaserver-bin

Popd

 

2.5      Create the manifest

ebuild /usr/local/portage/media-sound/logitechmediaserver-bin/lo* digest

 

Doinfg this I received a error message :

ebuild /usr/local/portage/media-sound/logitechmediaserver-bin/lo* digest

!!! doebuild: ‘/usr/local/portage/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.8.1_pre20140927.ebuild’ is not one of the following valid commands:

!!! clean      cleanrm    compile    config     configure  depend

!!! digest     fetch      fetchall   help       info       install

!!! manifest   merge      nofetch    package    postinst   postrm

!!! preinst    prepare    prerm      pretend    qmerge     rpm

!!! setup      test       unmerge    unpack

This is because more than one ebuild exists in the folder :

I removed ebuild leave only one  and run the command again.

drwxr-xr-x 2 portage portage 4096 Aug 19 08:28 files

-rw-r–r– 1 portage portage 8742 Aug 19 08:28 logitechmediaserver-bin-9999.ebuild

-rw-r–r– 1 portage portage 8874 Oct 25 17:07 Manifest

-rw-r–r– 1 portage portage  696 Aug 19 08:28 metadata.xml

2.6      Install the package

Unmask the package : # required by logitechmediaserver-bin (argument)

=media-sound/logitechmediaserver-bin-9999 **

 

emerge -aDvt logitechmediaserver-bin

 

emerge: there are no ebuilds to satisfy “<dev-lang/perl-5.19[ithreads]”.

(dependency required by “media-sound/logitechmediaserver-bin-9999::esaOverlay” [ebuild])

(dependency required by “logitechmediaserver-bin” [argument])


2.7      Problem with perl version

LMS ask Perl 5.19 but only perl 5.18 or 5.20 is available.

equery list -po dev-lang/perl

 * Searching for perl in dev-lang

[IP-] [  ] dev-lang/perl-5.20.2:0/5.20

[-P-] [ ~] dev-lang/perl-5.20.2-r1:0/5.20

[-P-] [ ~] dev-lang/perl-5.22.0:0/5.22

 

http://forums.slimdevices.com/showthread.php?103111-gentoo-and-perl-5-20&p=815616&viewfull=1#post815616

 

I changed the ebuild to accept the perl 5.20 : Use logitechmediaserver-bin-9999.ebuild

 

Then I need to generate the manifest :

ebuild /usr/local/portage/media-sound/logitechmediaserver-bin/lo* digest

 

http://forums.slimdevices.com/showthread.php?103111-gentoo-and-perl-5-20&p=822547&viewfull=1#post822547

 


2.8      Emerge LMS

 

[ebuild  N    *] media-sound/logitechmediaserver-bin-9999::esaOverlay  0 KiB

[ebuild  N     ]  virtual/logger-0::gentoo  0 KiB

[ebuild  N     ]   app-admin/metalog-3-r1::gentoo  USE=”unicode” 353 KiB

[ebuild  N     ]  dev-vcs/git-2.4.10::gentoo  USE=”blksha1 curl gpg iconv nls pcre perl python threads webdav -cgi -cvs -doc -emacs -gnome-keyring -gtk -highlight (-mediawiki) (-ppcsha1) -subversion {-test} -tk -xinetd” PYTHON_TARGETS=”python2_7” 3,974 KiB

[ebuild  N     ]   app-crypt/gnupg-2.0.28::gentoo  USE=”bzip2 nls readline -doc -ldap -mta (-selinux) -smartcard -static -tools -usb” 4,332 KiB

[ebuild  N     ]    app-crypt/pinentry-0.9.5::gentoo  USE=”ncurses -caps -clipboard -emacs -gnome-keyring -gtk -qt4 -static” 503 KiB

[ebuild  N     ]    net-misc/curl-7.43.0::gentoo  USE=”ssl -adns (-http2) -idn -ipv6 -kerberos -ldap -metalink -rtmp -samba -ssh -static-libs {-test} -threads” CURL_SSL=”openssl -axtls -gnutls -nss -polarssl (-winssl)” 3,285 KiB

[ebuild  N     ]   dev-perl/Net-SMTP-SSL-1.10.0-r1::gentoo  2 KiB

[ebuild  N     ]    dev-perl/IO-Socket-SSL-1.967.0::gentoo  USE=”-idn” 95 KiB

[ebuild  N     ]     dev-perl/Net-SSLeay-1.650.0-r1::gentoo  376 KiB

[ebuild  N     ]    virtual/perl-libnet-1.270.0::gentoo  0 KiB

[ebuild  N     ]     perl-core/libnet-1.270.0::gentoo  USE=”-sasl” 68 KiB

[nomerge       ] dev-perl/IO-Socket-SSL-1.967.0::gentoo  USE=”-idn

[ebuild  N     ]  virtual/perl-Scalar-List-Utils-1.380.0::gentoo  0 KiB

[nomerge       ] dev-vcs/git-2.4.10::gentoo  USE=”blksha1 curl gpg iconv nls pcre perl python threads webdav -cgi -cvs -doc -emacs -gnome-keyring -gtk -highlight (-mediawiki) (-ppcsha1) -subversion {-test} -tk -xinetd” PYTHON_TARGETS=”python2_7

[ebuild  N     ]  dev-perl/Error-0.170.210::gentoo  USE=”{-test}” 22 KiB

[ebuild  N     ]  dev-perl/Authen-SASL-2.160.0-r1::gentoo  USE=”-kerberos” 45 KiB

[ebuild  N     ]   dev-perl/Digest-HMAC-1.30.0-r1::gentoo  8 KiB

[ebuild  N     ]    virtual/perl-Digest-SHA-5.880.0::gentoo  0 KiB

[nomerge       ] media-sound/logitechmediaserver-bin-9999::esaOverlay

[ebuild  N     ]  dev-perl/Data-UUID-1.217.0-r1::gentoo  16 KiB

[ebuild  N     ]   virtual/perl-Digest-MD5-2.530.0-r2::gentoo  0 KiB

[ebuild   R    ]    dev-lang/perl-5.20.2:0/5.20::gentoo  USE=”berkdb gdbm ithreads* -debug -doc” 13,410 KiB

[nomerge       ] app-crypt/pinentry-0.9.5::gentoo  USE=”ncurses -caps -clipboard -emacs -gnome-keyring -gtk -qt4 -static

[ebuild  N     ]  app-eselect/eselect-pinentry-0.6::gentoo  0 KiB

[ebuild  N     ]   app-eselect/eselect-lib-bin-symlink-0.1.1::gentoo  45 KiB

[nomerge       ] app-crypt/gnupg-2.0.28::gentoo  USE=”bzip2 nls readline -doc -ldap -mta (-selinux) -smartcard -static -tools -usb

[ebuild  N     ]  dev-libs/pth-2.0.7-r3::gentoo  USE=”-debug -static-libs” 638 KiB

[ebuild  N     ]  dev-libs/libksba-1.3.3::gentoo  USE=”-static-libs” 605 KiB

[ebuild  N     ]  dev-libs/libassuan-2.2.1::gentoo  USE=”-static-libs” 530 KiB

Total: 25 packages (24 new, 1 reinstall), Size of downloads: 28,299 KiB


* Messages for package dev-lang/perl-5.20.2:

* THREADS WARNING:

 * PLEASE NOTE: You are compiling perl-5.20.2 with

 * interpreter-level threading enabled.

 * Threading is not supported by all applications that compile against perl. You use threading atyour own discretion.

 * TOGGLED USE-FLAGS WARNING:

 * You changed one of the use-flags ithreads or debug.

 * You must rebuild all perl-modules installed.

 * Use: perl-cleaner –modules ; perl-cleaner –force –libperl

 

 * Messages for package app-crypt/gnupg-2.0.28:

 * If you wish to view images emerge:

 * media-gfx/xloadimage, media-gfx/xli or any other viewer

 * Remember to use photo-viewer option in configuration file to activate

 * the right viewer.

* Please remember to restart gpg-agent if a different version

 * of the agent is currently used. If you are unsure of the gpg

 * agent you are using please run ‘killall gpg-agent’,

 * and to start a fresh daemon just run ‘gpg-agent –daemon’.

 

 * Messages for package dev-vcs/git-2.4.10:

 

 * These additional scripts need some dependencies:

 *   git-quiltimport  : dev-util/quilt

 *   git-instaweb     : || ( www-servers/lighttpd www-servers/apache www-servers/nginx )

 * Messages for package media-sound/logitechmediaserver-bin-9999:

 

 * Manually installed plugins should be placed in the following

 * directory:

 *      /var/lib/logitechmediaserver/Plugins

 * Logitech Media Server can be started with the following command (OpenRC):

 *      /etc/init.d/logitechmediaserver start

 * or (systemd):

 *      systemctl start logitechmediaserver

 * Logitech Media Server can be automatically started on each boot

 * with the following command (OpenRC):

 *      rc-update add logitechmediaserver default

 * or (systemd):

 *      systemctl enable logitechmediaserver

 * You might want to examine and modify the following configuration

 * file before starting Logitech Media Server:

 *      /etc/conf.d/logitechmediaserver

 * You may access and configure Logitech Media Server by browsing to:

 *      http://localhost:9000/

 


3         LMS crashed with Perl module failed to load.

Source : http://forums.slimdevices.com/showthread.php?103111-gentoo-and-perl-5-20&p=823040&viewfull=1#post823040

 

/etc/init.d/logitechmediaserver start

It crash without any message in log file.

 

To go further it is better to start it manually and see what happens :

 

perl /opt/logitechmediaserver/slimserver.pl --user logitechmediaserver --prefsdir=/etc/logitechmediaserver --pidfile=/var/run/logitechmediaserver/logitechmediaserver.pid --logdir=/var/log/logitechmediaserver --cachedir=/var/lib/logitechmediaserver/cache

 

 

The following modules failed to load: DBI EV XML::Parser::Expat HTML::Parser JSON::XS Digest::SHA1 YAML::XS Sub::Name

 


3.1      Solution 1 : build CPAN module for i386-linux-thread-multi with Perl5.20

Source : http://forums.slimdevices.com/showthread.php?103111-gentoo-and-perl-5-20&s=cf64f47441fbd5c37643af90928403d4&p=829183&viewfull=1#post829183

 

Downloaded CPAN from github Logitech/slimserver-vendor :

https://github.com/Logitech/slimserver-vendor

 

  • Copy the zip file into an install folder : /home/files/install/logitechmediaserver-CPAN/
  • Unzip it with : unzip slimserver-vendor-public-7.9.zip
  • Go to folder :
    /home/files/install/logitechmediaserver-CPAN/slimserver-vendor-public-7.9/CPAN
  • Start the build with : ./buildme.sh

 

PS : it’s maybe better to check the gcc version before starting the build. See bellow explanations “Downgrade gcc”.


3.1.1      Build complaining

It complains about yasm not installed : please install either yasm or nasm

 

I chose to install yasm : emerge -av yasm

 [ebuild  N     ] dev-lang/yasm-1.2.0-r1::gentoo  USE=”nls -python” PYTHON_TARGETS=”python2_7” 1,413 KiB

>>> Jobs: 1 of 1 complete                           Load avg: 1.47, 0.62, 0.26

 

If libgd is not installed : emerge dev-perl/GD

>>> Emerging (1 of 2) media-libs/gd-2.0.35-r4::gentoo

>>> Installing (1 of 2) media-libs/gd-2.0.35-r4::gentoo

>>> Emerging (2 of 2) dev-perl/GD-2.460.0-r1::gentoo

>>> Installing (2 of 2) dev-perl/GD-2.460.0-r1::gentoo

>>> Recording dev-perl/GD in “world” favorites file…

>>> Jobs: 2 of 2 complete   

 

Again, start the build with : ./buildme.sh

But it complains again with ‘nasm’ :

checking if we have SIMD optimisations for cpu type… yes (i386)

checking for nasm… no

checking for nasmw… no

configure: error: no nasm (Netwide Assembler) found

make: *** No targets specified and no makefile found.  Stop.

make failed

 

emerge -av nasm

 [ebuild  N     ] dev-lang/nasm-2.11.08::gentoo  USE=”-doc” 747 KiB

 

Again, start the build with : ./buildme.sh

But it complains again with : “perl [libavcodec/x86/dsputil_mmx.o] Error 1

 

I tried different thinks to solve this issue but as I have a completely new system with last version of GCC (i686-pc-linux-gnu-4.9.3) I suspected the GCC version.

3.1.2      Downgrade gcc

I finally installed a old gcc and try to build again :

  • emerge -av =gcc-4.1.2
  • gcc-config –l

 [1] i686-pc-linux-gnu-4.1.2 *

 [2] i686-pc-linux-gnu-4.9.3

 [3] i686-pc-linux-gnu-4.9.3-hardenednopie

 [4] i686-pc-linux-gnu-4.9.3-hardenednopiessp

 [5] i686-pc-linux-gnu-4.9.3-hardenednossp

 [6] i686-pc-linux-gnu-4.9.3-vanilla

  • gcc-config 1
  • env-update && source /etc/profile
  • emerge –oneshot libtool
  • revdep-rebuild –library ‘libstdc++\.so\.5’

 

Again, start the build with : ./buildme.sh

And finally it compiled with success!

As usual, it wasn’t easy to find the good way…Perl and Gentoo are not my friends.


3.1.3      Copy CPAN

In folder “/slimserver-vendor-public-7.9/CPAN/build/arch/5.20”, there is a new build for x86 : i386-linux-thread-multi

 

Copy this folder to “/opt/logitechmediaserver/CPAN/arch/5.20”

The result should be as follow :

drwxr-xr-x 3 root root   4096 Oct 25 18:27 arm-linux-gnueabihf-thread-multi-64int

drwxr-xr-x 3 root root   4096 Oct 25 18:27 Class

drwxr-xr-x 8 root root   4096 Oct 25 18:27 DBI

-rw-r–r– 1 root root 311651 Oct 25 18:26 DBI.pm

drwxr-xr-x 3 root root   4096 Oct 26 05:15 i386-linux-thread-multi

drwxr-xr-x 3 root root   4096 Oct 25 18:27 i386-linux-thread-multi-64int

drwxr-xr-x 3 root root   4096 Oct 25 18:27 JSON

drwxr-xr-x 3 root root   4096 Oct 25 18:27 x86_64-linux-thread-multi

 

Then start lms with /etc/init.d/logitechmediaserver  start

And check with rc-status

logitechmediaserver  [  started  ]

 

3.2      Solution 2 : compile and install Perl 5.18.

Source : http://forums.slimdevices.com/showthread.php?103111-gentoo-and-perl-5-20&p=823040&viewfull=1#post823040

 

The goal is to install an old version of Perl and say to LMS to use it.

LMS could be installed as the normal way like in solution1.

The advantage of this solution is that it won’t more time to compile and to setup while the LMS will be completely independent of future PERL upgrade.

 

Procedure to be realized next time PERL will mess my system.

 

3.3      Solution 3 : compile and install Perl 5.18 and LMS

Source : http://forums.slimdevices.com/showthread.php?99648-Howto-build-a-self-contained-LMS&s=1b99033b65772166c641fee379c06f49

 

The goal is to install an old version of Perl and say to LMS to use it.

In this solution, I think he also compiled LMS : must be analyzed.

 

 


4         LMS Configuration

rc-update add logitechmediaserver default