Know your ISP.

User #195792   14 posts
Participant

Hi all,

I have been using the excellent electronic TV programme guide 'shepherd' for several months and have been very happy with how reliable it is and how simple it is in operation. However, four days ago it failed and now it gives the following error message:

Use of uninitialized value in concatenation (.) or string at /usr/lib64/perl5/5.8.8/x86_64-linu­ x-thread-multi/Scalar/Util.pm line 30.

DIE: line 269 in file /usr/lib/perl5/5.8.8/Carp.pm

ERROR:
Mandatory module 'Compress::Zlib' not found.

Please see the Wiki at svn.whuffy.com/wiki/Installation
for details on how to install this module.


I have the perl module Compress::Zlib installed:
$ yum list installed "*zlib*"
Installed Packages
jzlib.x86_64                             1.0.7-4jpp.1           installed      
perl-Compress-Raw-Zlib.x86_64            2.005-1.fc7            installed      
perl-Compress-Zlib.x86_64                1.42-1.fc6             installed      
perl-IO-Compress-Zlib.noarch             2.005-1.fc7            installed      
perl-IO-Zlib.noarch                      1.04-4.2.1             installed      
perl-POE-Filter-Zlib.noarch              1.8-1.fc7              installed      
zlib.x86_64                              1.2.3-10.fc7           installed      
zlib.i386                                1.2.3-10.fc7           installed


At the time of failure, I had shepherd version 1.2.25 installed. I manually upgraded this to the latest available from the website: 1.2.26 - this made no difference.

Anybody have any advice?

Cheers,
James.

posted 2007-Oct-20, 4pm AEST
edited 2007-Oct-20, 4pm AEST
User #5201   3940 posts
Whirlpool Forums Addict

Have you changed the version of perl that you are using?

Edit: and welcome to Whirlpool!

posted 2007-Oct-20, 4pm AEST
edited 2007-Oct-20, 4pm AEST
User #195792   14 posts
Participant

Possibly ... I probably did  yum upgrade, so if Perl has been upgraded in that timeframe then I would have changed.

$yum list installed "*perl*"
Installed Packages
groff-perl.x86_64                        1.18.1.4-6.fc7         installed      
mod_perl.x86_64                          2.0.3-9.1.fc7          installed      
newt-perl.x86_64                         1.08-14                installed      
perl.x86_64                              4:5.8.8-24.fc7         installed      
perl-Algorithm-Diff.noarch               1.1902-3.fc7           installed      
perl-Archive-Tar.noarch                  1.30-4.fc7             installed      
perl-Archive-Zip.noarch                  1.16-1.2.1             installed      
perl-BSD-Resource.x86_64                 1.28-1.fc6.1           installed      
perl-CPAN.x86_64                         1.76_02-24.fc7         installed      
perl-Class-Factory-Util.noarch           1.7-1.fc7              installed      
perl-Class-MethodMaker.x86_64            2.08-4.fc6             installed      
perl-Class-Singleton.noarch              1.03-4.fc7             installed      
perl-Compress-Raw-Zlib.x86_64            2.005-1.fc7            installed      
perl-Compress-Zlib.x86_64                1.42-1.fc6             installed      
perl-Curses.x86_64                       1.15-1.fc6             installed      
perl-DBD-MySQL.x86_64                    3.0008-1.fc7           installed      
perl-DBI.x86_64                          1.53-2.fc7             installed      
perl-DateManip.noarch                    5.44-3.fc7             installed      
perl-DateTime.x86_64                     1:0.37-3.fc7           installed      
perl-DateTime-Format-Builder.noarc­ h      0.7807-4.fc6           installed      
perl-DateTime-Format-Strptime.noar­ ch     1.0700-3.fc7           installed      
perl-Digest-HMAC.noarch                  1.01-15                installed      
perl-Digest-SHA1.x86_64                  2.11-1.2.1             installed      
perl-Event.x86_64                        1.09-1.fc7             installed      
perl-ExtUtils-Embed.x86_64               1.26-24.fc7            installed      
perl-ExtUtils-MakeMaker.x86_64           6.30-24.fc7            installed      
perl-File-Slurp.noarch                   9999.12-3.fc7          installed      
perl-GD.x86_64                           2.35-2.fc6             installed      
perl-HTML-Parser.x86_64                  3.56-1.fc7             installed      
perl-HTML-TableExtract.noarch            2.10-1.fc7             installed      
perl-HTML-Tagset.noarch                  3.10-5.fc7             installed      
perl-HTML-Tree.noarch                    1:3.23-1.fc7           installed      
perl-HTTP-Cache-Transparent.x86_64­       0.4-3.fc7              installed      
perl-IO-Compress-Base.noarch             2.005-1.fc7            installed      
perl-IO-Compress-Zlib.noarch             2.005-1.fc7            installed      
perl-IO-Socket-INET6.noarch              2.51-2.fc6             installed      
perl-IO-Socket-SSL.noarch                1.02-1.fc7             installed      
perl-IO-String.noarch                    1.08-1.1.1             installed      
perl-IO-Tty.x86_64                       1.07-2.fc6             installed      
perl-IO-Zlib.noarch                      1.04-4.2.1             installed      
perl-IO-stringy.noarch                   2.110-5.fc7            installed      
perl-Lingua-Preferred.noarch             0.2.4-3.fc7            installed      
perl-List-Compare.noarch                 0.33-2.fc6             installed      
perl-Locale-Hebrew.x86_64                1.04-2.fc7             installed      
perl-MIME-Lite.noarch                    3.01-5.fc6             installed      
perl-MailTools.noarch                    1.77-1.fc7             installed      
perl-MythTV.x86_64                       0.20.2-166.fc7         installed      
perl-Net-DNS.x86_64                      0.61-1.fc7             installed      
perl-Net-IP.noarch                       1.25-3.fc7             installed      
perl-Net-SSLeay.x86_64                   1.30-4.fc6             installed      
perl-POE.noarch                          0.9989-1.fc7           installed      
perl-POE-Filter-Zlib.noarch              1.8-1.fc7              installed      
perl-Params-Validate.x86_64              0.88-1.fc7             installed      
perl-Parse-Yapp.noarch                   1.05-36.fc6            installed      
perl-SOAP-Lite.noarch                    0.68-2.fc6             installed      
perl-Socket6.x86_64                      0.19-3.fc6             installed      
perl-String-CRC32.x86_64                 1.4-2.fc6              installed      
perl-Term-ProgressBar.noarch             2.09-2.fc6             installed      
perl-TermReadKey.x86_64                  2.30-1.2.2.1           installed      
perl-Test-Harness.x86_64                 2.56-24.fc7            installed      
perl-Test-Simple.x86_64                  0.62-24.fc7            installed      
perl-Text-Kakasi.x86_64                  2.04-3.fc6             installed      
perl-TimeDate.noarch                     1:1.16-3.2.1           installed      
perl-Tk.x86_64                           804.027-11.fc7         installed      
perl-Tk-TableMatrix.x86_64               1.2-17.fc7             installed      
perl-URI.noarch                          1.35-3                 installed      
perl-Unicode-UTF8simple.noarch           1.06-2.fc7             installed      
perl-WWW-Mechanize.noarch                1.30-2.fc7             installed      
perl-XML-DOM.noarch                      1.44-2.fc6             installed      
perl-XML-LibXML.x86_64                   1.62001-2.fc7          installed      
perl-XML-LibXML-Common.x86_64            0.13-8.2.2             installed      
perl-XML-NamespaceSupport.noarch         1.09-1.2.1             installed      
perl-XML-Parser.x86_64                   2.34-6.1.2.2.1         installed      
perl-XML-RegExp.noarch                   0.03-2.fc6             installed      
perl-XML-SAX.noarch                      0.15-1                 installed      
perl-XML-Simple.noarch                   2.16-2.fc7             installed      
perl-XML-Twig.noarch                     3.29-1.fc7             installed      
perl-XML-Writer.noarch                   0.603-2.fc7            installed      
perl-XML-XQL.noarch                      0.68-4.fc7             installed      
perl-XMLTV.noarch                        0.5.49-74.fc7          installed      
perl-devel.x86_64                        4:5.8.8-24.fc7         installed      
perl-devel.i386                          4:5.8.8-24.fc7         installed      
perl-libs.x86_64                         4:5.8.8-24.fc7         installed      
perl-libs.i386                           4:5.8.8-24.fc7         installed      
perl-libwww-perl.noarch                  5.805-1.1.1            installed

posted 2007-Oct-20, 5pm AEST
edited 2007-Oct-20, 5pm AEST
User #44690   10552 posts
Whirlpool Forums Addict

JamesLawrence writes...

so if Perl has been upgraded in that timeframe

You can find out precisely what has changed in that timeframe by searching /var/log/messages* for yum lines, looking at /var/log/yum.log*, and diffing /var/log/rpmpkgs.

posted 2007-Oct-20, 6pm AEST
User #195792   14 posts
Participant

From /var/log/messages:
Oct 16 20:58:55 mythtv yum: Updated: perl - 4:5.8.8-24.fc7.x86_64
That would be about 4 days before 20 Oct.

Yep, I can say confidently that perl was upgraded.

Let me try something:
yum remove perl-Compress-Zlib
This removes 25 packages due to dependencies.

yum install mythtv perl-Archive-Tar perl-POE-Filter-Zlib perl-XML-DOM perl-XML-Simple perl-XML-XQL
This gets (almost) all of them back again (it leaves out spamassassin and evolution, neither of which I use, but reinstalls all of the rest)

Hmm ... shepherd still gives the same error. Any idea what I should try next?

posted 2007-Oct-21, 1am AEST
User #195792   14 posts
Participant

Trying a reinstallation of shepherd:
$ mv .shepherd/ shepold
$ cp shepold/shepherd shepherd
$ ./shepherd

Use of uninitialized value in concatenation (.) or string at /usr/lib64/perl5/5.8.8/x86_64-linu­ x-thread-multi/Scalar/Util.pm line 30.

DIE: line 269 in file /usr/lib/perl5/5.8.8/Carp.pm

ERROR:
Mandatory module 'Compress::Zlib' not found.

Please see the Wiki at svn.whuffy.com/wiki/Installation
for details on how to install this module.

$

That didn't work either.

I'm not really willing to try uninstalling and reinstalling perl - there are 275 packages worth of dependencies.

posted 2007-Oct-21, 8am AEST
edited 2007-Oct-21, 9am AEST
User #44690   10552 posts
Whirlpool Forums Addict

Need to do a couple of basic checks. This shouldn't print out any errors:

perl -MCompress::Zlib -e 1

Also, if you do:

perl -V

what is in the @INC section at the bottom? Does it contain /usr/lib/perl5/vendor_perl/5.8.8?

posted 2007-Oct-21, 9am AEST
edited 2007-Oct-21, 9am AEST
User #195792   14 posts
Participant

$ perl -MCompress::Zlib -e 1
is only avaliable with the XS version at /usr/lib/perl5/site_perl/5.8.8/Com­ press/Zlib.pm line 9
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/Com­ press/Zlib.pm line 9.
Compilation failed in require.
BEGIN failed--compilation aborted.

(note that there is a ' ' (space) at the start of the first line, before 'is')
$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.20-1.2962.fc6xen, archname=x86_64-linux-thread-multi­

followed by several screens full of stuff, ending with
Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
                        PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT
                        USE_ITHREADS USE_LARGE_FILES USE_PERLIO
                        USE_REENTRANT_API
  Built under linux
  Compiled at Oct  1 2007 13:13:26
  %ENV:
    PERL5LIB="/usr/lib64/perl5/site_pe­ rl/5.8.8/x86_64-linux-thread-multi­ :/usr/lib/perl5/site_perl/5.8.8:/u­ sr/lib64/perl5/vendor_perl/5.8.8/x­ 86_64-linux-thread-multi:/usr/lib/­ perl5/vendor_perl/5.8.8"
  @INC:
    /usr/lib64/perl5/site_perl/5.8.8/x­ 86_64-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.8
    /usr/lib64/perl5/vendor_perl/5.8.8­ /x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.8
    /usr/lib64/perl5/site_perl/5.8.8/x­ 86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.7/x­ 86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.6/x­ 86_64-linux-thread-multi
    /usr/lib64/perl5/site_perl/5.8.5/x­ 86_64-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.8
    /usr/lib/perl5/site_perl/5.8.7
    /usr/lib/perl5/site_perl/5.8.6
    /usr/lib/perl5/site_perl/5.8.5
    /usr/lib/perl5/site_perl
    /usr/lib64/perl5/vendor_perl/5.8.8­ /x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.7­ /x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.6­ /x86_64-linux-thread-multi
    /usr/lib64/perl5/vendor_perl/5.8.5­ /x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.8
    /usr/lib/perl5/vendor_perl/5.8.7
    /usr/lib/perl5/vendor_perl/5.8.6
    /usr/lib/perl5/vendor_perl/5.8.5
    /usr/lib/perl5/vendor_perl
    /usr/lib64/perl5/5.8.8/x86_64-linu­ x-thread-multi
    /usr/lib/perl5/5.8.8
    .


So ... there is an error associated with Compress::Zlib, and @INC does include
/usr/lib/perl5/vendor_perl/5.8.8

posted 2007-Oct-21, 10am AEST
edited 2007-Oct-21, 10am AEST
User #44690   10552 posts
Whirlpool Forums Addict

$ perl -MCompress::Zlib -e 1
is only avaliable with the XS version at /usr/lib/perl5/site_perl/5.8.8/Com­ ­ press/Zlib.pm line 9
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/Com­ ­ press/Zlib.pm line 9.
Compilation failed in require.
BEGIN failed--compilation aborted.


Curious... I'll have to dig into the Compress::Zlib source for that one...

Aha... OK, that message is actually from Scalar::Util, which Compress::Zlib uses internally. From Zlib.pm line 9:

use Scalar::Util qw(dualvar);

Then in Util.pm:

sub export_fail {
  ...
  if (grep { /^(dualvar|set_prototype)$/ } @_ ) {
    require Carp;
    Carp::croak("$1 is only avaliable with the XS version");
  }
  ...
}
...
eval <<'ESQ' unless defined &dualvar;

use vars qw(@EXPORT_FAIL);
push @EXPORT_FAIL, qw(weaken isweak dualvar isvstring set_prototype);

# The code beyond here is only used if the XS is not installed
...
ESQ

I have no idea why it isn't saying "dualvar is only avaliable..." -- that's also odd. (Edit: I've just found an explanation for that)

Scalar::Util can operate in two different ways. It preferentially uses the XS (native) library, but if that fails to load it uses the pure-Perl code instead. However the pure-Perl version of Scalar::Util does not implement dualvar (as far as I know, it's not possible to implement that sub in pure Perl).

So the next question is why didn't the XS version of Scalar::Util load? More investigation required.

posted 2007-Oct-21, 11am AEST
edited 2007-Oct-21, 11am AEST
User #44690   10552 posts
Whirlpool Forums Addict

What do you get if you do:

PERL_DL_DEBUG=1 perl -MScalar::Util -e 1

?

posted 2007-Oct-21, 11am AEST
User #195792   14 posts
Participant

$ PERL_DL_DEBUG=1 perl -MScalar::Util -e 1
DynaLoader.pm loaded (/usr/lib64/perl5/site_perl/5.8.8/­ x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib64/perl5/vendor_perl/5.8.8­ /x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib64/perl5/site_perl/5.8.8/x­ 86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.7/x­ 86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.6/x­ 86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.5/x­ 86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8­ /x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.7­ /x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.6­ /x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.5­ /x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linu­ x-thread-multi /usr/lib/perl5/5.8.8 ., /usr/local/lib64 /lib64 /usr/lib64)

If I subsequently run perl -MScalar::Util -e 1 I get no error. However, shepherd still returns the same error.

I am currently running shepherd, without error, on another machine that I thought had the same configuration ... strange ...

posted 2007-Oct-21, 11am AEST
User #44690   10552 posts
Whirlpool Forums Addict

JamesLawrence writes...

If I subsequently run perl -MScalar::Util -e 1 I get no error. However, shepherd still returns the same error.

So Scalar::Util works, but Compress::Zlib, which uses Scalar::Util, doesn't? (Edit: Of course it will work... you didn't try to import dualvar.)

Was there a:

DynaLoader::bootstrap for List::Util (auto/List/Util/Util.so)

anywhere at the bottom of that output?

posted 2007-Oct-21, 11am AEST
edited 2007-Oct-21, 12pm AEST
User #195792   14 posts
Participant

I don't see a DynaLoader::bootstrap for List::Util (auto/List/Util/Util.so) anywhere ...

posted 2007-Oct-21, 12pm AEST
User #63202   3714 posts
Whirlpool Forums Addict

Foonly writes...

Aha... OK, that message is actually from Scalar::Util, which Compress::Zlib uses internally. From Zlib.pm line 9:

use Scalar::Util qw(dualvar);


I've just had to resolve this exact same issue... but it showed up in my MailScanner not Shepherd.

The fix is to force the reinstall of Scalar::Util
That is:
cpan
then
install Scalar::Util
If it says it is already up to date, then do:
force install Scalar::Util

I found this as a current bug on the CentOS web site. Seems a perl upgrade loads the latest version of Compress::Zlid which is not the XS version.

It fixed it for me.

posted 2007-Nov-10, 11am AEST
edited 2007-Nov-10, 11am AEST
Hosted by
WebCentral Australia
Big numbers
953,759 threads
16,780,594 posts
1,968,194 whims sent
2,997 wiki topics
236 ISPs listed
8,018 broadband plans
804 modems & routers
39,415 features filled