Bug 3650 - /usr/local/slimserver isn't in @INC
: /usr/local/slimserver isn't in @INC
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Platform Support
: 6.3.0
: PC RedHat Linux
: P2 major (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-28 11:26 UTC by Michael Herger
Modified: 2006-07-02 11:13 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments
Startup log (4.68 KB, text/plain)
2006-06-29 03:52 UTC, Michael Herger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2006-06-28 11:26:55 UTC
From the forums: http://forums.slimdevices.com/showthread.php?p=118026

On some Linux systems Slimserver does not include its home path in @INC. It therefore can't find its own modules:

Can't locate Slim/Utils/Misc.pm in @INC (@INC contains: /usr/local/slimserver/SlimServer_6_3_x_v2006-05-25/CPAN/arch/5.8.4/i386-linux-thread-multi /usr/local/slimserver/SlimServer_6_3_x_v2006-05-25/CPAN/arch/5.8.4/i386-linux-thread-multi/auto /usr/local/slimserver/SlimServer_6_3_x_v2006-05-25/CPAN/arch/5.8/i386-linux-thread-multi /usr/local/slimserver/SlimServer_6_3_x_v2006-05-25/CPAN/arch/5.8/i386-linux-thread-multi/auto /usr/local/slimserver/SlimServer_6_3_x_v2006-05-25/CPAN/arch/i386-linux-thread-multi /usr/local/slimserver/SlimServer_6_3_x_v2006-05-25/lib /usr/local/slimserver/SlimServer_6_3_x_v2006-05-25/CPAN /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/local/slimserver/server/slimserver.pl line 267.
BEGIN failed--compilation aborted at /usr/local/slimserver/server/slimserver.pl line 267.

Adding the path manually as described in http://forums.slimdevices.com/showpost.php?p=118013&postcount=15 does of course work but isn't a real solution...
Comment 1 KDF 2006-06-28 19:42:32 UTC
try with d_server and d_startup. 

that seems to output a lot about module loading for me.  /usr/local/slimserver isn't included in my @INC either, but it works fine.  This is becuase "." IS in @INC.

As for why other setups don't work, they should probably run with those debug options.  
Comment 2 Michael Herger 2006-06-29 03:52:45 UTC
Created attachment 1295 [details]
Startup log

Here's the output of slimserver run with d_startup d_server

(RH 7.3 based e-smith 6.x, with self compiled Perl 5.8.6).
Comment 3 Michael Herger 2006-06-29 04:14:11 UTC
Going through SVN I found the following change:

http://svn.slimdevices.com/branches/BRANCH_6_3_x/server/slimserver.pl?rev=7207&r1=7146&r2=7207

This change removed '$Bin' from @SlimINC. Putting it in back again solves the problem for me (slimserver.pl.56 is the original file): 

[root@edelzwerg slimserver]# diff -u slimserver.pl.56 slimserver.pl
--- slimserver.pl.56    Wed Jun 28 00:45:26 2006
+++ slimserver.pl       Thu Jun 29 13:10:45 2006
 # SlimServer Copyright (C) 2001-2005 Sean Adams, Slim Devices Inc.
 # This program is free software; you can redistribute it and/or
@@ -186,6 +186,7 @@
        }

        my @SlimINC = (
+               $Bin,
                catdir($Bin,'CPAN','arch',(join ".", map {ord} split //, $^V), $Config::Config{'archname'}),
                catdir($Bin,'CPAN','arch',(join ".", map {ord} split //, $^V), $Config::Config{'archname'}, 'auto'),
                catdir($Bin,'CPAN','arch',(join ".", map {ord} (split //, $^V)[0,1]), $Config::Config{'archname'}),

Does this do any harm?
Comment 4 KDF 2006-06-29 08:51:57 UTC
*** Bug 3655 has been marked as a duplicate of this bug. ***
Comment 5 Dan Sully 2006-06-29 09:12:53 UTC
Fixed in change 8205
Comment 6 KDF 2006-07-01 09:54:56 UTC
*** Bug 3668 has been marked as a duplicate of this bug. ***
Comment 7 Ed Price 2006-07-02 11:13:14 UTC
*** Bug 3680 has been marked as a duplicate of this bug. ***