Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Bill Moseley
    Guest

    CPAN dir not in @INC with Slimserver v6.5.0?

    I've been running v5.4.0 with my SB2. I just downloaded the tarball
    for v6.5.0 and it complains about not finding modules upon startup.

    My v5.4.0 slimserver.pl file adds CPAN into @INC:

    use lib (
    $Bin,
    catdir($Bin,'CPAN'),
    catdir($Bin,'CPAN','arch',(join ".", map {ord} split //, $^V), $Config::Config{archname}),
    catdir($Bin,'CPAN','arch',(join ".", map {ord} (split //, $^V)[0,1]), $Config::Config{archname}),
    catdir($Bin,'CPAN','arch',$Config::Config{archname })
    );

    But the v6.5.0 script doesn't seem to do this:

    moseley@bumby:~/SlimServer_v6.5.0$ ./slimserver.pl --daemon
    Can't locate Text/Unidecode.pm in @INC (@INC contains: /usr/share/slimserver/lib /home/moseley/SlimServer_v6.5.0 /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/local/lib/perl/5.8.2 /usr/local/share/perl/5.8.2 /usr/local/lib/perl/5.8.1 /usr/local/share/perl/5.8.1 /usr/local/lib/perl/5.8.0 /usr/local/share/perl/5.8.0 .) at /home/moseley/SlimServer_v6.5.0/Slim/Utils/Unicode.pm line 36.

    How's v6.5.0 suppose to find the modules in the CPAN directory?

    I tried adding the above additions to slimserver.pl and then I get:

    $ ./slimserver.pl --daemon
    The following modules failed to load: DBD::mysql DBI HTML::Parser Compress::Zlib YAML::Syck

    To download and compile them, please run: /home/moseley/SlimServer_v6.5.0/Bin/build-perl-modules.pl DBD::mysql DBI HTML::Parser Compress::Zlib YAML::Syck

    Maybe I'm not setting @INC correctly for this version of SlimServer.
    I have all the modules:

    moseley@bumby:~/SlimServer_v6.5.0$ perl -MDBD::mysql -MDBI -MHTML::Parser -MCompress::Zlib -MYAML::Syck -le 'print "Yes!"'
    Yes!


    But, without setting @INC correctly I'll get version mis-matches:

    moseley@bumby:~/SlimServer_v6.5.0$ PERL5LIB=$(pwd)/CPAN perl -MDBD::mysql -MDBI -MHTML::Parser -MCompress::Zlib -MYAML::Syck -le 'print "Yes!"'
    DBI object version 1.53 does not match $DBI::VERSION 1.50 at /usr/lib/perl/5.8/DynaLoader.pm line 245.
    BEGIN failed--compilation aborted at /home/moseley/SlimServer_v6.5.0/CPAN/DBI.pm line 255.
    Compilation failed in require at /home/moseley/SlimServer_v6.5.0/CPAN/DBD/mysql.pm line 7.
    BEGIN failed--compilation aborted at /home/moseley/SlimServer_v6.5.0/CPAN/DBD/mysql.pm line 7.
    Compilation failed in require.
    BEGIN failed--compilation aborted.



    BTW -- I'm running Debian Sid, which has 6.3.0 but I wanted to use the
    newest version (trying to get SoftSqueeze working). I assume it's
    worth using the newer 6.5 version.


    --
    Bill Moseley
    moseley (AT) hank (DOT) org


  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,216

    CPAN dir not in @INC with Slimserver v6.5.0?

    > $ ./slimserver.pl --daemon
    > The following modules failed to load: DBD::mysql DBI HTML::Parser
    > Compress::Zlib YAML::Syck
    >
    > To download and compile them, please run:
    > /home/moseley/SlimServer_v6.5.0/Bin/build-perl-modules.pl DBD::mysql DBI
    > HTML::Parser Compress::Zlib YAML::Syck


    Did you actually follow this advice? It's not saying that it's missing
    them, but that it failed to load. 5.8.0 has imho some problems. Maybe
    slimserver wants more up to date modules than are available from 5.8.0.
    Please run the above to be sure.

    And please go straight to 6.5.1 even if it's not officially released. Many
    bugs have been fixed since 6.5.0.

    --

    Michael

    -----------------------------------------------------------------
    http://www.herger.net/SlimCD - your SlimServer on a CD
    http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR


  3. #3
    Bill Moseley
    Guest

    CPAN dir not in @INC with Slimserver v6.5.0?

    On Mon, Dec 04, 2006 at 09:17:13AM +0100, Michael Herger wrote:
    > >$ ./slimserver.pl --daemon
    > >The following modules failed to load: DBD::mysql DBI HTML::Parser
    > >Compress::Zlib YAML::Syck
    > >
    > >To download and compile them, please run:
    > >/home/moseley/SlimServer_v6.5.0/Bin/build-perl-modules.pl DBD::mysql DBI
    > >HTML::Parser Compress::Zlib YAML::Syck

    >
    > Did you actually follow this advice? It's not saying that it's missing
    > them, but that it failed to load.


    Sure wish it would give the Perl error message instead of just saying
    failed to load. I assume the problem in that case is it's loading the
    older slim-supplied DBI.pm, but the newer binary part from my perl
    libraries because @INC is not set correctly.

    > slimserver wants more up to date modules than are available from 5.8.0.
    > Please run the above to be sure.


    I'm running perl 5.8.8. You mean it wants more up to date modules
    than is included in the Slimserver tarball? The DBI.pm included in
    the tarball is 1.50 and on my machine I have the newer 1.53.


    Still, where is slimserver.pl setting @INC to use the modules included
    in the CPAN directory that are distributed with the tarball? Or maybe
    this is why I need the newer v6.5.1.

    > And please go straight to 6.5.1 even if it's not officially released. Many
    > bugs have been fixed since 6.5.0.


    I just went to the download page. The download page for the tarball
    is 6.5.0:

    http://www.slimdevices.com/mint/pepp..._v6.5.0.tar.gz

    Do I need to grab the nightly build to get 6.5.1?

    Or what about using this?

    http://www.slimdevices.com/downloads..._6.5.1_all.deb

    Know what's in that .deb?




    --
    Bill Moseley
    moseley (AT) hank (DOT) org


  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,216

    CPAN dir not in @INC with Slimserver v6.5.0?

    > Sure wish it would give the Perl error message instead of just saying
    > failed to load.


    Start slimserver with the -d_startup parameter to get them. Please give
    this a try to see what it's complaining about.

    > I'm running perl 5.8.8.


    Oops, sorry, I was mislead by the last entry of the CPAN path which points
    to 5.8.0.

    > Still, where is slimserver.pl setting @INC to use the modules included
    > in the CPAN directory that are distributed with the tarball? Or maybe
    > this is why I need the newer v6.5.1.


    I do remember there was such an issue, but I think it wasn't with 6.5.0.
    Give 6.5.1 a go anyway :-)

    > I just went to the download page. The download page for the tarball
    > is 6.5.0:


    Use http://www.slimdevices.com/downloads...ly/latest/6.5/ instead.

    > Do I need to grab the nightly build to get 6.5.1?


    Yes.

    > Know what's in that .deb?


    It's the debian package of slimserver.

    --

    Michael

    -----------------------------------------------------------------
    http://www.herger.net/SlimCD - your SlimServer on a CD
    http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR


  5. #5
    Bill Moseley
    Guest

    CPAN dir not in @INC with Slimserver v6.5.0?

    On Mon, Dec 04, 2006 at 10:09:27AM +0100, Michael Herger wrote:
    > >Know what's in that .deb?

    >
    > It's the debian package of slimserver.


    Yes, it's a .deb.

    It's a package that doesn't include all the CPAN modules, and instead
    depends on quite a few packages. Trying to install I get these unmet
    dependencies:

    $ sudo dpkg -i slimserver_6.5.1_all.deb 2>&1 | grep Package | cut -d ' ' -f 4
    libcgi-perl
    libmp4-info-perl
    libfile-bom-perl
    libpoe-perl
    libclass-data-accessor-perl
    libreadonly-perl
    libtext-unidecode-perl
    libenum-perl
    libtie-cache-lru-perl
    libtie-llhash-perl
    liburi-find-perl
    libtie-cache-lru-expires-perl
    libfile-find-rule-perl
    libdata-vstring-perl
    libproc-background-perl
    libdbix-class-perl
    libxml-xspf-perl
    libmpeg-audio-frame-perl
    libnet-upnp-perl
    libdbix-migration-perl
    libyaml-syck-perl

    Now, not all of those are in the Debian sources. So I added the Slim
    sources to sources.lst and then I end up with:

    The following packages have unmet dependencies:
    libdbix-class-perl: Depends: libtie-ixhash-perl but it is not going to be installed
    libfile-find-rule-perl: Depends: libnumber-compare-perl but it is not going to be installed
    libpoe-perl: Depends: libfilter-perl but it is not going to be installed
    slimserver: Depends: libxml-simple-perl (>= 2.15-1) but 2.14-5 is to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


    Time to stick with the tarball.

    --
    Bill Moseley
    moseley (AT) hank (DOT) org


  6. #6
    Bill Moseley
    Guest

    CPAN dir not in @INC with Slimserver v6.5.0?

    On Mon, Dec 04, 2006 at 10:09:27AM +0100, Michael Herger wrote:
    > >Sure wish it would give the Perl error message instead of just saying
    > >failed to load.

    >
    > Start slimserver with the -d_startup parameter to get them. Please give
    > this a try to see what it's complaining about.


    Ok, with the nightly tarball (that includes the CPAN directory)
    -d_startup shows the @INC path below.

    How in the world is it suppose to find modules modules included in the
    slimserver package if the CPAN and arch directories are not added to @INC?

    Extended @INC to contain:
    /usr/share/slimserver/lib
    /home/moseley/SlimServer_6.5_v2006-12-04
    /etc/perl
    /usr/local/lib/perl/5.8.8
    /usr/local/share/perl/5.8.8
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.8
    /usr/share/perl/5.8
    /usr/local/lib/site_perl
    /usr/local/lib/perl/5.8.7
    /usr/local/share/perl/5.8.7
    /usr/local/lib/perl/5.8.4
    /usr/local/share/perl/5.8.4
    /usr/local/lib/perl/5.8.2
    /usr/local/share/perl/5.8.2
    /usr/local/lib/perl/5.8.1
    /usr/local/share/perl/5.8.1
    /usr/local/lib/perl/5.8.0
    /usr/local/share/perl/5.8.0
    .


    You can see it's not looking in the local CPAN directory:

    XML::Simple version 2.15 required--this is only version 2.14 at /usr/share/perl/5.8/Exporter/Heavy.pm line 107.
    BEGIN failed--compilation aborted at ./slimserver.pl line 102.

    The 2.15 version is included in the Slimserver pacakge, though:

    moseley@bumby:~/SlimServer_6.5_v2006-12-04$ fgrep VERSION CPAN/XML/Simple.pm
    use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $PREFERRED_PARSER);
    $VERSION = '2.15';





    --
    Bill Moseley
    moseley (AT) hank (DOT) org


  7. #7
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    16,996
    Check the loadmodules routine in boostrap.pm in Slim folder. It has this code

    Code:
    		my $arch = $Config::Config{'archname'};
    		   $arch =~ s/^i[3456]86-/i386-/;
    		   $arch =~ s/gnu-//;
    
    		@SlimINC = (
    			catdir($libPath,'CPAN','arch',(join ".", map {ord} (split //, $^V)[0,1]), $arch),
    			catdir($libPath,'CPAN','arch',(join ".", map {ord} (split //, $^V)[0,1]), $arch, 'auto'),
    			catdir($libPath,'CPAN','arch',(join ".", map {ord} split //, $^V), $Config::Config{'archname'}),
    			catdir($libPath,'CPAN','arch',(join ".", map {ord} split //, $^V), $Config::Config{'archname'}, 'auto'),
    			catdir($libPath,'CPAN','arch',(join ".", map {ord} (split //, $^V)[0,1]), $Config::Config{'archname'}),
    			catdir($libPath,'CPAN','arch',(join ".", map {ord} (split //, $^V)[0,1]), $Config::Config{'archname'}, 'auto'),
    			catdir($libPath,'CPAN','arch',$Config::Config{'archname'}),
    			catdir($libPath,'lib'), 
    			catdir($libPath,'CPAN'), 
    			$libPath,
    		);

  8. #8
    Bill Moseley
    Guest

    Re: CPAN dir not in @INC with Slimserver v6.5.0?

    On Mon, Dec 04, 2006 at 09:57:19AM -0800, bpa wrote:
    >
    > Check the loadmodules routine in boostrap.pm in Slim folder. It has this
    > code


    And this little bit above:

    >-------if (Slim::Utils::OSDetect::isDebian() || Slim::Utils::OSDetect::isRHELorFC()) {


    >------->-------@SlimINC = Slim::Utils::OSDetect::dirsFor('lib');


    >-------} else {


    I'm on Debian, but NOT running the debian package. That's why it is
    breaking.

    I need to look more, but seems like it should be using FindBin to
    deterimine if running the Debian package.

    =head2 isDebian( )

    The Debian package has some specific differences for file locations.
    This routine needs no args, and returns 1 if Debian distro is detected, with
    a clear sign that the .deb package has been installed, 0 if not.

    Sure, but that doesn't tell if the *current running program* is the
    debian-installed package.

    --
    Bill Moseley
    moseley (AT) hank (DOT) org


  9. #9
    Bill Moseley
    Guest

    Re: CPAN dir not in @INC with Slimserver v6.5.0?

    On Mon, Dec 04, 2006 at 10:51:43AM -0800, Bill Moseley wrote:

    > =head2 isDebian( )


    And if I modify that to always return false, then the server starts
    just fine, but when I try to split off an indexing process to scan the
    music folder I get:

    Can't locate Proc/Background.pm in @INC (@INC contains: /usr/share/slimserver/lib /usr/sbin /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/local/lib/perl/5.8.2 /usr/local/share/perl/5.8.2 /usr/local/lib/perl/5.8.1 /usr/local/share/perl/5.8.1 /usr/local/lib/perl/5.8.0 /usr/local/share/perl/5.8.0 .) at /usr/share/perl5/Slim/Music/Import.pm line 45.
    BEGIN failed--compilation aborted at /usr/share/perl5/Slim/Music/Import.pm line 45.
    Compilation failed in require at /usr/sbin/slimserver-scanner line 32.
    BEGIN failed--compilation aborted at /usr/sbin/slimserver-scanner line 32.
    2006-12-04 11:00:47.1320 ERROR: file error - status_header.html: not found

    Slim::Music::Import makes another assumption:

    } elsif (-x '/usr/sbin/slimserver-scanner') {

    $command = '/usr/sbin/slimserver-scanner';
    }

    Is that a hack for Debian? I don't see slimserver-scanner in the
    6.5.1 tarball. I assume scanner.pl is reanamed slimserver-scanner
    when installed.

    If running from a tarball in some directory wouldn't it make sense to
    update PATH and PERL5LIB so any child processes work in the same
    environment as the parent slimserver process? And to name the scanner
    "slimserver-scanner" so that's what is run and let PATH do its job?


    --
    Bill Moseley
    moseley (AT) hank (DOT) org


  10. #10
    formerly known as Fletch
    Join Date
    May 2005
    Posts
    2,254
    Did you actually install the deb? I don't disagree that this is a bug, but if you're using the tarball, why don't you just remove the deb package and these problems will go away?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •