Bug 12073 - Scanner fails to run using Perl code under ActivePerl 5.10
: Scanner fails to run using Perl code under ActivePerl 5.10
Status: RESOLVED INVALID
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.4.0
: PC Windows Server 2003
: -- trivial (vote)
: 7.4.0
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-15 19:29 UTC by Jim McAtee
Modified: 2009-05-18 22:18 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim McAtee 2009-05-15 19:29:10 UTC
Running on Windows Server 2003 with code checked out from SVN repository /7.4/branches/noweb-sqlite under ActivePerl 5.10.0.1004.  The SC server runs fine, the web interface is operational, the empty SQLite database is created, settings stick, logging works, but the scanner does not run.

On startup, the SC server sees an empty SQLite database and logs that it is initiating a scan.  After that there's nothing in server.log related to a scan, no scanner.log is created, and no isScanning record is created in the metainformation table of the SQLite database.

Running a scan manually from the web ui fares no better.
Comment 1 Jim McAtee 2009-05-17 14:31:53 UTC
I think the problem here was attempting to run with multiple versions of Perl installed on the server.  If I set things up so that Perl 5.10 is the only available version (and the only \perl\bin\ in the PATH environment variable) then the scanner runs.

I suspect that change 7953 for bug 3530 may not work on all systems, but I don't know how to go about debugging it.  Is there some way to get SC to log the command being used to launch the scanner?
Comment 2 Michael Herger 2009-05-18 00:32:35 UTC
The following patch will print what exact command is going to be run:


Index: D:/workspace/tinysc/server/Slim/Music/Import.pm
===================================================================
--- D:/workspace/tinysc/server/Slim/Music/Import.pm	(revision 26659)
+++ D:/workspace/tinysc/server/Slim/Music/Import.pm	(working copy)
@@ -147,6 +147,9 @@
 		$command  = $Config{'perlpath'};
 	}
 	
+	use Data::Dumper;
+	print Data::Dumper::Dumper($command, @args);
+	
 	# Pass debug flags to scanner
 	if ( $main::debug ) {
 		push @scanArgs, '--debug', $main::debug;
Comment 3 Jim McAtee 2009-05-18 16:23:48 UTC
Thanks, Michael.  I found the problem.  I wasn't aware that you can't just move Perl from one installation directory to another.  There are a number of paths specified in \lib\Config-heavy.pl that need to point to the correct installation directory.

$Config{'perlpath'} doesn't necessarily contain the path of the Perl executable that is running SC.  Instead, it's just a configuration string.  In this case it contained C:\Perl\bin\perl.exe, which on my system is the 5.8 Perl executable.  I believe this was because I originally installed 5.10 to that directory before finding that SC didn't run under 5.10.
Comment 4 Michael Herger 2009-05-18 22:18:21 UTC
> Thanks, Michael.  I found the problem.  I wasn't aware that you can't  
> just move Perl from one installation directory to another.

Great! Thanks for the feedback.