Bug 9714 - noCPAN release of SqueezeCenter 7.2
: noCPAN release of SqueezeCenter 7.2
Status: RESOLVED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 7.2.1
: PC Other
: -- normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-14 11:10 UTC by Walker LaRon
Modified: 2011-03-16 04:35 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments
1: results of running slimserver for the first time (1.53 KB, text/plain)
2008-10-15 19:23 UTC, John Stimson
Details
2: results of trying to build all missing modules at once. (2.22 KB, text/plain)
2008-10-15 19:28 UTC, John Stimson
Details
9: results of building GD (1.96 KB, text/plain)
2008-10-15 19:29 UTC, John Stimson
Details
A: results of building DBD::mysql (1.68 KB, text/plain)
2008-10-15 19:29 UTC, John Stimson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walker LaRon 2008-10-14 11:10:14 UTC
Linux any Distrubution
Official SC release 7.x through now 7.2.1


Ticket Ref 081007-002802

Fresh installation of Perl 5.8.8

Steps to recreate issue

Start with any Linux distribution that does not have Perl pre-installed.  
Download, build, and install Perl 5.8.8 from perl.org.
Un-tar the SqueezeCenter tar.gz distribution file to /usr/local/slimserver
Try to run SqueezeCenter

You'll Get error messages about missing CPAN modules and incorrect versions for CPAN modules

Solution:
Delete those packages from slimserver/CPAN and installing the latest version of each module in my own Perl installation using "perl -MCPAN -e shell".


SqueezeCenter still hangs when trying to Load/Start SqueezeCenter

There are users in the forum that have gotten to this stage, and the only solution is reverting back to a previous version 6.5.4.
Comment 1 John Stimson 2008-10-14 11:21:09 UTC
My specific distribution is Slackware 8.1.  Perl completely removed (including /usr/lib/perl5 and /usr/local/lib/perl5)) and re-installed from a freshly downloaded source distribution of 5.8.8.

Same problem with official 7.2 and 7.2 nightly noCPAN tar.gz releases of SqueezeCenter.
Comment 2 Michael Herger 2008-10-15 00:16:08 UTC
What exactly do you want us to do?
Comment 3 John Stimson 2008-10-15 00:52:24 UTC
I was hoping that you could fix the tar.gz perl source release so that it would work with a fresh perl installation (5.8.8).  Ideally it would be tolerant of having newer versions of the requisite CPAN modules than the ones that come bundled with SqueezeCenter.

Working from a freshly compiled and installed Perl distribution and a freshly unpacked SqueezeCenter distribution, I get messages about missing CPAN modules.  I run the suggested command to have slimserver.pl build the missing modules itself.  It still complains about some of them being missing.

Here is a history from the last time I tried installing the 7.2 tar.gz release:

I have removed /usr/local/lib/perl5 and /usr/lib/perl5, and installed a fresh copy of Perl 5.8.8.  When invoked, slimserver.pl complained of many missing CPAN modules.  I installed most of the required modules through perl -MCPAN -e shell.  I installed DBD::mysql using the slimserver self-build method.   slimserver.pl complained that my version of XML::Parser was incorrect. Needed: 2.34, had: 2.34. The weird thing is, CPAN reports that I have version 2.36. So I did a slimserver self-build on the XML::Parser package.

Now, I get this message:
Can't locate loadable object for module Encode::Detect::Detector in @INC
[long path deleted]
Compilation failed in require at /usr/local/src/Audio/squeezecenter-7.2/Slim/Utils/Unicode.pm line 40.
BEGIN failed--compilation aborted at /usr/local/src/Audio/squeezecenter-7.2/Slim/Utils/Unicode.pm line 40.
Compilation failed in require at /usr/local/src/Audio/squeezecenter-7.2/Slim/Utils/Prefs/Namespace.pm line 30.
BEGIN failed--compilation aborted at /usr/local/src/Audio/squeezecenter-7.2/Slim/Utils/Prefs/Namespace.pm line 30.
Compilation failed in require at /usr/local/src/Audio/squeezecenter-7.2/Slim/Utils/Prefs.pm line 81.
BEGIN failed--compilation aborted at /usr/local/src/Audio/squeezecenter-7.2/Slim/Utils/Prefs.pm line 81.
Compilation failed in require at /usr/local/slimserver/slimserver.pl line 146.
BEGIN failed--compilation aborted at /usr/local/slimserver/slimserver.pl line 146.

That's the start of the problems.  It seems like slimserver.pl ought to tolerate having XML::Parser version 2.36 installed in /usr/lib/perl5 instead of bailing out because it needs version 2.34.
Comment 4 Michael Herger 2008-10-15 01:34:19 UTC
> I was hoping that you could fix the tar.gz perl source release so that it would
> work with a fresh perl installation (5.8.8).  Ideally it would be tolerant of
> having newer versions of the requisite CPAN modules than the ones that come
> bundled with SqueezeCenter.

Well, as the -noCPAN- in the file name says, the file does not come with all the modules packed in. And the regular file just can't fit all the distributions available out there.

So this is basically about a documentation update on what modules are needed?
Comment 5 John Stimson 2008-10-15 08:32:15 UTC
I don't think that will help -- slimserver.pl tells me which modules it thinks are missing.  The problem is that when I install the modules, it still thinks they are missing, or it says that the version is wrong even if the module is the same as what it's asking for or newer.

I can start over again with a pristine Perl installation and slimserver package.  I can tell you what happens step by step.  Which version do you recommend that I start with, the official distribution, the nightly with CPAN, or the nightly without CPAN?

Comment 6 John Stimson 2008-10-15 10:03:44 UTC
Before I start, I want to be sure that am starting the server with a proper method.  I log in as root and run:
/usr/local/slimserver/slimserver.pl --user slim --group slim --daemon --logfile /home/slimserver/slimserver.log

When I unpack the squeezecenter tar file, I change the owner and group of the squeezecenter tree to slim:slim.

I currently have the 7.2 official release and the 7.2.1 nightly build (23565/Oct 15) unpacked and ready to test.
Comment 7 John Stimson 2008-10-15 19:23:25 UTC
Created attachment 4138 [details]
1: results of running slimserver for the first time
Comment 8 John Stimson 2008-10-15 19:27:02 UTC
Tonight, I wiped out /usr/local/lib/perl5 and /usr/lib/perl5, installed perl 5.8.8 with the default configuration, and unpacked a fresh copy of squeezecenter 7.2.1, nightly build 23565 (the full perl source distribution).  I changed the ownership of the squeezecenter tree to slim:slim.  I placed the squeezecenter tree as /usr/local/slimserver.  I deleted /tmp/slimserver.

Then I started squeezecenter with:
/usr/local/slimserver/slimserver.pl --user slim --group slim --daemon --logfile /home/slimserver/slimserver.log

I got an error message listing missing perl modules.  That is attachment #1 [details].

I tried the suggested command to build the modules, however that failed.  The results are in attachment #2 [details].

I tried building each module individually.  The only ones that failed were DBD::mysql and GD.  The results are in attachments 9 and A.  The build of GD did not issue any warning or error messages, but running slimserver.pl again showed GD as still missing.

Comment 9 John Stimson 2008-10-15 19:28:20 UTC
Created attachment 4139 [details]
2: results of trying to build all missing modules at once.
Comment 10 John Stimson 2008-10-15 19:29:11 UTC
Created attachment 4140 [details]
9: results of building GD
Comment 11 John Stimson 2008-10-15 19:29:36 UTC
Created attachment 4141 [details]
A: results of building DBD::mysql
Comment 12 John Stimson 2008-10-16 12:43:23 UTC
Since it looks like you're targeting a fix for the GD and DBD::mysql self-build in version 7.3, I went ahead to see if I could get squeezecenter to work.  Here is what I did:

perl -MCPAN -e shell
(answer configuration questions)
install Bundle::CPAN
reload cpan
install GD
install DBI (DBD::mysql would not make without DBI)
force install DBD::mysql (make test failed due to database permissions)

When I ran slimserver.pl, I got the message on STDOUT that Encode::Detect::Detector was not found, and slimserver.pl exited.  So I went to /usr/local/slimserver/CPAN and removed the Encode tree.  Then:

perl -MCPAN -e shell
install Encode::Detect::Detector

At that point, slimserver.pl would run.  However, in the log file, I got two errors.  One stating that Template::Stash::XS was not found, and another series saying that it could not write files to /usr/local/slimserver/prefs/plugin.

To I removed the Template tree from /usr/local/slimserver/CPAN, and ran:

perl -MCPAN -e shell
install Template::Stash::XS

And answered yes to the questions about using XS by default.

I found that /usr/local/slimserver/prefs/plugin had been created by slimserver.pl with owner root:root instead of slim:slim.  I think that's another bug.  So I changed the ownership to slim:slim, and squeezecenter runs, and I can access the web interface.

So I guess I can say that I have found a workaround, for now.
Comment 13 James Richardson 2008-10-17 10:41:44 UTC
Michael, is this one yours to address?
Comment 14 Michael Herger 2008-10-19 09:30:15 UTC
I'm sorry James, no idea what there is to do. If I've got it right then LaRon is complaining about the buildscript for perl modules not working properly. This would rather be for Matt then - he's already working on improving it.

Un-assigning/un-targetting until we know what the action is.
Comment 15 John Stimson 2008-10-30 13:35:18 UTC
As I see it, there are two root causes for my problems:

First, and most important, is in how slimserver.pl and scanner.pl identify the modules and versions present on the local perl installation, the modules and versions present in the slimserver/CPAN tree, and how it determines which instance of each module to use.  That is evident from the frequency of messages along the lines of: 

# ./scanner.pl --user slim --group slim --logfile /home/slimserver/slimserver.log --debug scan=debug,scanner=debug,scan.info=debug --wipe /home/john/music.lib/Originals
The following CPAN modules were found but cannot work with SqueezeCenter:
GD (loaded 2.35, need 2.35)

Note that in this case I had installed GD in my local perl library in order to get slimserver.pl to run, and slimserver.pl had run successfully in this configuration.

In order to get scanner.pl to run, I had to delete the GD directory from slimserver/CPAN.

The second problem is with the build script issues identified in the attachments posted above.  I think this problem is less important, for two reasons.  I am perfectly happy and competent to install the required packages in my local perl library using CPAN.  Also, the module/version identification problem means that when I install the modules to my perl library, slimserver.pl usually will not identify them properly and use them.  That is especially a problem if I have some of the required modules already installed because I need them for some other piece of software such as SpamAssassin or my audio library batch converter.