Bug 9708 - Can't locate Win32::Locale
: Can't locate Win32::Locale
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.3.0
: PC Windows Server 2003
: P1 critical (vote)
: 7.x
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-13 23:04 UTC by Jim McAtee
Modified: 2009-07-31 10:30 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim McAtee 2008-10-13 23:04:21 UTC
There was a crasher on my Windows system running the Perl code:

Can't locate Win32/Locale.pm in @INC (@INC contains: C:/Program Files/SqueezeCenter 7.3 Trunk/server C:/Perl/site/lib C:/Perl/lib .)
 at C:/Program Files/SqueezeCenter 7.3 Trunk/server/Slim/Utils/OS/Win32.pm line 10.
BEGIN failed--compilation aborted at C:/Program Files/SqueezeCenter 7.3 Trunk/server/Slim/Utils/OS/Win32.pm line 10.
Compilation failed in require at C:/Program Files/SqueezeCenter 7.3 Trunk/server/Slim/Utils/OSDetect.pm line 90.
BEGIN failed--compilation aborted at C:\Program Files\SqueezeCenter 7.3 Trunk\server\slimserver.pl line 116.[/code]


There was no Win32::Locale.pm in my ActiveState Perl 5.8 installation.  Had to download it and install in my Perl\lib\Win32 folder.

[url]http://search.cpan.org/~sburke/Win32-Locale-0.04/Locale.pm[/url]
Comment 1 Michael Herger 2008-10-14 00:07:10 UTC
Win32::Locale is in our CPAN folder. Don't know why it's not bound in to the binary.
Comment 2 Jim McAtee 2008-10-14 00:40:47 UTC
Ok, I see it in

\server\CPAN\arch\5.8\MSWin32-x86-multi-thread\Win32

What do you mean by "bound in to the binary"?  The EXE version?  Running the non-EXE Perl code, how is it supposed to be found?
Comment 3 Michael Herger 2008-10-14 00:58:42 UTC
Would the following change work?

Index: /Users/mh/Documents/workspace/7.3/server/Slim/Utils/OS/Win32.pm
===================================================================
--- /Users/mh/Documents/workspace/7.3/server/Slim/Utils/OS/Win32.pm	(revision 23540)
+++ /Users/mh/Documents/workspace/7.3/server/Slim/Utils/OS/Win32.pm	(working copy)
@@ -7,7 +7,6 @@
 use Scalar::Util qw(blessed);
 use Win32;
 use Win32::OLE::NLS;
-use Win32::Locale;
 use POSIX qw(LC_CTYPE LC_TIME);
 
 use base qw(Slim::Utils::OS);
@@ -152,6 +151,8 @@
 }
 
 sub localeDetails {
+	require Win32::Locale;
+	
 	my $langid = Win32::OLE::NLS::GetSystemDefaultLCID();
 	my $lcid   = Win32::OLE::NLS::MAKELCID($langid);
 	my $linfo  = Win32::OLE::NLS::GetLocaleInfo($lcid, Win32::OLE::NLS::LOCALE_IDEFAULTANSICODEPAGE());
Comment 4 Michael Herger 2008-10-14 01:01:02 UTC
could you please give me the full command line you're using? I can't reproduce this issue by simply running "perl slimserver.pl"
Comment 5 Jim McAtee 2008-10-14 01:14:12 UTC
(In reply to comment #3)
> Would the following change work?

Yeah, that appears to work.
Comment 6 Jim McAtee 2008-10-14 01:16:04 UTC
(In reply to comment #4)
> could you please give me the full command line you're using? I can't reproduce
> this issue by simply running "perl slimserver.pl"
 
C:\>"C:\Perl\bin\perl.exe" "C:\Program Files\SqueezeCenter 7.3 Trunk\server\slimserver.pl" --playeraddr 192.168.9.11 --cliaddr 192.168.9.11 --streamaddr 192.168.9.11 --httpaddr 192.168.9.11 --httpport 80 --prefsdir "D:\slim\11\prefs" --cachedir "D:\slim\11\cache" --logdir "D:\slim\11\logs"
Comment 7 Michael Herger 2008-10-14 01:58:31 UTC
change 23541 - thanks! Need to postpone module loading, as the library path isn't initialized yet when S::U::OS classes are loaded.
Comment 8 James Richardson 2008-12-15 12:08:17 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 9 Chris Owens 2009-07-31 10:30:52 UTC
Reduce number of active targets for SC