LogitechMediaServer (LMS) on FreeNAS

willcycle

Dabbler
Joined
Sep 22, 2018
Messages
24
I appreciate the help KrisBee. I followed your suggestion and deleted the jail. I followed Frank's instructions to the Tee and got the same file access errors. Something must have changed in the repo. On a whim, I downloaded logitechmediaserver-7.9.2-1565967976.tgz from the slimdevices nightly (I couldn't find 7.9.2..g2018.12.10) on my Windows box and using WinSCP replaced the files in "/usr/ports/audio/logitechmediaserver/work/stage/usr/local/share /logitechmediaserver/ " with the expanded downloaded ones. I then ran "make config install clean" and it appeared to install now with a bunch of "Cleaning for ..." messages, however, after using the commands "sysrc logitechmediaserver_enable="YES" and "service logitechmediaserver start" I get:
Starting logitechmediaserver.
sh: /usr/local/share/logitechmediaserver/slimserver.pl: not found
/usr/local/etc/rc.d/logitechmediaserver: WARNING: failed to start logitechmediaserver
I checked and the file slimserver.pl is present so I don't understand why it's not working now unless there is someplace I need to set the paths.
I would be willing to test your script.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@willcycle I've no idea it's possible to hack the install in the way you've described, and doesn't the http://downloads.slimdevices.com/nightly/?ver=7.9 page describe that tarball being for i386 FreeBSD? Anyway, it's hard to say just why the port refuses to install for you at this distance. If you care to write out exactly the steps you've followed, something might standout.

Can't say for sure when my script will be done and dusted, but your welcome to use it when it's ready.
 

willcycle

Dabbler
Joined
Sep 22, 2018
Messages
24
This is what I followed.
Create a new jail via webui, using 11.x release , VNET and setting allow_raw_sockets=1 (use release 11.2)

In jail do:

pkg info

check for latest p5-IO-Socket-SSL pacakge and adjust XX
[I didn't understand this so used the pkg install below to install this package.]

pkg install nasm bash rsync gmake curl binutils faad2 sox flac mac libgd perl5 p5-IO-Socket-SSL-2.0XX
portsnap fetch extract
cd /usr/ports/audio/logitechmediaserver;make config install clean
cd /

edit /root/.cshrc to set correct locale
[I used ee as editor and it worked, though it doesn't look right when doing it. The lines appear mixed up.]
setenv LC_ALL 'en_GB.UTF-8'
setenv LANG 'en_GB.UTF-8'
setenv MM_CHARSET 'UTF-8'
setenv TZ Europe/London
[KrisBee, adjust for your geo location. Me, please look this up first as Country/City.]

test correctly set:

root@LMSjail:~ # locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_ALL=en_GB.UTF-8

sysrc logitechmediaserver_enable="YES"
service logitechmediaserver start

set jail to auto start by setting jail prop boot=on etc. in WebUI
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
OK, already mentioned the that list of pkgs should end in p5-IO-Socket-SSL.

Those "setenv" commands should be changed to reflect where you are, unless you're happy posing as a Brit.

Checking the info https://www.freshports.org/audio/logitechmediaserver/, it looks the ports only works with lang/perl5.30.

Let's try updating the pkg conf to get latest perl version in the jail.

Execute these commands as root in the jail:

Code:
sed -i.bak "s/quarterly/latest/" /etc/pkg/FreeBSD.conf
pkg update
pkg upgrade -y


Try installing the port now:

Code:
cd /usr/ports/audio/logitechmediaserver
make distclean
make config install clean
 

Frank Collins

Explorer
Joined
Apr 10, 2019
Messages
53
Willcycle,
If Krisbee can't get it to work, then I'm of no use. All my thanks go to him for his most generous and gracious assistance to me.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@willcycle Frank's confidence seem misplaced at the moment. I'm now getting those same messages as the LMS port fails to build in a jail. Lost patience after 3 attempts with & without pre-installing packages. This really should be straight forward and not need a crash course in the use of "make" in FreeBSD and LMS port failures. I think Frank got it working before the 13 August port update. But I'm no FreeBSD expert.

Disappointing to have to use a Linux VM with installed LMS package and NFS/CIFS to share pool data, but needs must if this port is troublesome.

I have built LMS from source in the past, but that was more by luck than judgment as I never really got my head round how the CPAN stuff works.
 

willcycle

Dabbler
Joined
Sep 22, 2018
Messages
24
I deleted my jail and started anew with the revised instructions. No Joy. Same error
I just saw your post so this confirms something changed in the port.
Is it possible to somehow just extract the logitechmediaserver tar file and install it independently since all depencies have already been installed?
 

willcycle

Dabbler
Joined
Sep 22, 2018
Messages
24
I did a little research on this in bugs.freebsd.org. Someone had the same problem in 2018 and he was using perl 5.24. Apparently the fix was to use perl 5.28. I checked and the version now is 5.30 in the jail. How can we downgrade to 5.28 to see if this fixes the install problem?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I deleted my jail and started anew with the revised instructions. No Joy. Same error
I just saw your post so this confirms something changed in the port.
Is it possible to somehow just extract the logitechmediaserver tar file and install it independently since all depencies have already been installed?

Doubt that's possible. A frustrating outcome after spending time working out how to accept licenses for batch mode port install as required when using scripts.
 

cbv

Cadet
Joined
Aug 18, 2019
Messages
7
I recently rebuilt my NAS from scratch and got stuck on LMS when I checked this thread. The comment above about perl5.28 was an interesting note, so I just tried it...
a) created a jail
b) set perl5.28 as default perl in /etc/make.conf
c) installed perl5.28
d) installed LMS
e) works

It's currently rescanning my music folder :)
 

cbv

Cadet
Joined
Aug 18, 2019
Messages
7
Sorry, I forgot ... Test needs to be checked off.
Otherwise it won't compile and install.
 

willcycle

Dabbler
Joined
Sep 22, 2018
Messages
24
Glad it works. As I am not as savvy with FreeBSD can you please briefly outline all the steps you took after creating the jail?
 

cbv

Cadet
Joined
Aug 18, 2019
Messages
7
Really, I just created a jail from scratch, then got the ports tree (which was missing).
From there, I went to /usr/ports/lang/perl5.28 and 'make install clean'.
Meanwhile, in a second shell, I already enabled the logitech server in /etc/rc.conf
Next, I went to /usr/ports/audo/logitechmediaserver and again 'make install clean' and as mentioned made sure, the TEST option was unchecked.

Once it was finished, I stopped the jail from the Web UI and went to the Jails menu and added my music folder to /media/Music, restarted the jails and voila, everything was working. Went over to the LMS:Settings and rescanned my library, and after a couple of album artists got added, I checked on my Squeezebox to make sure it was connecting and able to play, by zapping through a couple of songs.

All in all, I think it was done in about 20 minutes.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Seems I had one long senior moment over the last 24 hrs. Should have known errors meant the port just will not work with per5-5.30. How could I forget LMS is so sensitive to perl version changes from using it in Linux? Great isn't, the port supposed to have been updated to work with latest perl5 and doesn't.

But something's screwed up somewhere as pre-installing pkgs can lead to the port not pulling latest perl 5-5.30 in some circumstance, e.g. when adding "LICENSES_ACCEPTED=SDL" to /etc/make.conf and you end up with this even without fixing the perl version to 5.28.

Code:
sent 531,939 bytes  received 998 bytes  1,065,874.00 bytes/sec
total size is 528,433  speedup is 0.99
===>  Staging for logitechmediaserver-7.9.2.g2018.12.10
===>   logitechmediaserver-7.9.2.g2018.12.10 depends on executable: mac - found
===>   logitechmediaserver-7.9.2.g2018.12.10 depends on executable: faad - found
===>   logitechmediaserver-7.9.2.g2018.12.10 depends on executable: flac - found
===>   logitechmediaserver-7.9.2.g2018.12.10 depends on executable: sox - found
===>   logitechmediaserver-7.9.2.g2018.12.10 depends on package: perl5>=5.28.r1<5.29 - found
===>   Generating temporary packing list
===> Creating groups.
===> Creating users
.....................

[lmstest] Installing logitechmediaserver-7.9.2.g2018.12.10...


So it builds by accident. I've still much to learn re: working with FreeBSD, but I think I can finish my script now.


Note; https://www.freshports.org/audio/logitechmediaserver/ shows

Build dependencies:
  1. nasm : devel/nasm
  2. bash : shells/bash
  3. rsync : net/rsync
  4. gmake : devel/gmake
  5. perl5>=5.30.r1<5.31 : lang/perl5.3
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Glad it works. As I am not as savvy with FreeBSD can you please briefly outline all the steps you took after creating the jail?

@cbv can confirm, but you need to add "DEFAULT_VERSIONS=perl5=5.28" to your /etc/make.conf file: e.g:

echo "DEFAULT_VERSIONS=perl5=5.28" > /etc/make.conf

Doing that first should allow previous instructions to allow port to build & install.
 

cbv

Cadet
Joined
Aug 18, 2019
Messages
7
@KrisBee yes, see #50 step (b) :)

However, when you try to install perl5.28, it will notify you that 5.30 is default and that you will have to stop the build and explicitly have to set the default to 5.28 in order to proceed.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@KrisBee yes, see #50 step (b) :)

However, when you try to install perl5.28, it will notify you that 5.30 is default and that you will have to stop the build and explicitly have to set the default to 5.28 in order to proceed.

#50 step (b) states what do but not how.

Assume you are reffering to installing perl5.28 from ports. If you install perl5 from pkg in a jail at the moment you get per5-5.28 which I suppose you can then lock.
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
Hi!
I'm the owner of audiodigitale.eu
I made and installer script to install easily lms, I've compiled it from 2433703 commit (7.9.2 version)
I've tested it only on Freebsd-12 but I need some feedback if it has some bugs on other bsd versions.
Before proceeding if lms is already installed it's better to delete it (optional) and to delete related lines on rc.conf
Logitechmediaserver and FreeBSD

Thanks
 
Top