View Issue Details

IDProjectCategoryView StatusLast Update
0004987CentOS-5perlpublic2011-07-20 14:25
Reporterclockworksoldier 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionno change required 
Product Version5.6 
Target VersionFixed in Version 
Summary0004987: perl-5.8.8-32.el5_6.3.i386 -- Update -- broken -> Scalar::Util::weaken gone
DescriptionMost recent perl update (I got it 2am 19th) aparrently removed Scalar::Util::weaken.

Many packages depend on this module like Memcached/Fast.pm.

Subtle failures ensued :

Undefined subroutine &Scalar::Util::weaken called at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Cache/Memcached/Fast.pm line 591.\nCompilation failed in require ...

Reproduce easily every time with perl-5.8.8-32.el5_6.3.i386 by trying to install :

perl -MCPAN -e "install Task::Weaken"

subsequently fails :

    A CPAN module critically requires a function
    (Scalar::Util::weaken) that should exist in your
    Scalar::Util module but doesn't.

    This probably happened because you are using a Perl
    provided by a binary package from a vendor, and this
    vendor has packaged Perl incorrectly.

.....
---8<---
Additional InformationFull Transcript of testcase(s) attached in txtfile.
TagsNo tags attached.

Activities

2011-07-19 22:45

 

centos-5.6-perl-scalar_util_weaken-error-transcript.txt (5,586 bytes)
-----

### begin. going from perl perl-5.8.8-32.el5_5.2 base where all is OK.

[hostname]# yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

perl.i386                                                             4:5.8.8-32.el5_6.3                                                              updates
[hostname]# 

### done a yum upgrade - just the one perl package, and only from official repo.

[Tue Jul 19 23:21:35 2011] [error] Undefined subroutine &Scalar::Util::weaken called at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Cache/Memcached/Fast.pm line 591.\n

### attempt 1 to see if we can get an offical error about the problem...

cpan> install Scalar::Util
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Tue, 19 Jul 2011 16:31:35 GMT
Scalar::Util is up to date.

cpan> test Scalar::Util
Running test for module Scalar::Util
Running make for G/GB/GBARR/Scalar-List-Utils-1.23.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for /root/.cpan/sources/authors/id/G/GB/GBARR/Scalar-List-Utils-1.23.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Scalar-List-Utils-1.23/
---8<---
All tests successful, 4 subtests skipped.
Files=38, Tests=475,  2 wallclock secs ( 1.11 cusr +  0.45 csys =  1.56 CPU)
  /usr/bin/make test -- OK


### attempt 2 to see if we can get an offical error about the problem...

cpan> install Task::Weaken
Running install for module Task::Weaken
Running make for A/AD/ADAMK/Task-Weaken-1.04.tar.gz
Checksum for /root/.cpan/sources/authors/id/A/AD/ADAMK/Task-Weaken-1.04.tar.gz ok
Task-Weaken-1.04/
Task-Weaken-1.04/README
Task-Weaken-1.04/Makefile.PL
Task-Weaken-1.04/LICENSE
Task-Weaken-1.04/xt/
Task-Weaken-1.04/xt/meta.t
Task-Weaken-1.04/xt/pmv.t
Task-Weaken-1.04/xt/pod.t
Task-Weaken-1.04/META.yml
Task-Weaken-1.04/lib/
Task-Weaken-1.04/lib/Task/
Task-Weaken-1.04/lib/Task/Weaken.pm
Task-Weaken-1.04/MANIFEST
Task-Weaken-1.04/t/
Task-Weaken-1.04/t/01_compile.t
Task-Weaken-1.04/t/02_weaken.t
Task-Weaken-1.04/Changes
Task-Weaken-1.04/inc/
Task-Weaken-1.04/inc/Module/
Task-Weaken-1.04/inc/Module/Install/
Task-Weaken-1.04/inc/Module/Install/Win32.pm
Task-Weaken-1.04/inc/Module/Install/WriteAll.pm
Task-Weaken-1.04/inc/Module/Install/Can.pm
Task-Weaken-1.04/inc/Module/Install/Metadata.pm
Task-Weaken-1.04/inc/Module/Install/Base.pm
Task-Weaken-1.04/inc/Module/Install/Makefile.pm
Task-Weaken-1.04/inc/Module/Install/Fetch.pm
Task-Weaken-1.04/inc/Module/Install.pm
Removing previously used /root/.cpan/build/Task-Weaken-1.04

  CPAN.pm: Going to build A/AD/ADAMK/Task-Weaken-1.04.tar.gz




    ERROR:

    A CPAN module critically requires a function
    (Scalar::Util::weaken) that should exist in your
    Scalar::Util module but doesn't.

    This probably happened because you are using a Perl
    provided by a binary package from a vendor, and this
    vendor has packaged Perl incorrectly.

    I have checked for a couple of potential workarounds
    but none of them appear to be usable in your
    situation.

    I will try a last-ditch option anyway, but the most
    likely result is a number of noisily failing tests

    If this happens, you will need to contact technical
    support for your vendor and report the broken Perl,
    so that they can repair it.

    Please refer them to the documentation for the
    'Task::Weaken' CPAN module, which explains the problem
    and how they can fix it.

    I'm going to wait for about a minute now so you have time
    to read this message


### having another module complaining - we are sure it is not just cache::memcached::fast

[Tue Jul 19 23:27:54 2011] [error] Undefined subroutine &Scalar::Util::weaken called at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Cache/Memcached/Fast.pm line 591.\n



### rollback to where we started and evidence that Task::Weaken works with previous release

[hostname]# rpm -e --nodeps perl # erase new perl
[hostname]# perl -v
-bash: /usr/bin/perl: No such file or directory
[hostname]# 

[hostname]# rpm -i /var/spool/repackage/perl-5.8.8-32.el5_5.2.i386.rpm
error: unpacking of archive failed on file /usr/bin/a2p;4e26055d: cpio: MD5 sum mismatch
[hostname]# rpm -i --nomd5 /var/spool/repackage/perl-5.8.8-32.el5_5.2.i386.rpm
[hostname]# echo $?
0
[hostname]# perl -v

This is perl, v5.8.8 built for i386-linux-thread-multi

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[hostname]# rpm -qa |grep perl-5.8
perl-5.8.8-32.el5_5.2
[hostname]# 

[hostname]# perl -MCPAN -e "install Task::Weaken"
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Tue, 19 Jul 2011 16:31:35 GMT
Running install for module Task::Weaken
Running make for A/AD/ADAMK/Task-Weaken-1.04.tar.gz
--8<---
Files=2, Tests=21,  1 wallclock secs ( 0.03 usr  0.01 sys +  0.05 cusr  0.01 csys =  0.10 CPU)
Result: PASS
  /usr/bin/make test -- OK
Running make install
Manifying blib/man3/Task::Weaken.3pm
Installing /usr/lib/perl5/site_perl/5.8.8/Task/Weaken.pm
Installing /usr/share/man/man3/Task::Weaken.3pm
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
  /usr/bin/make install  -- OK
[hostname]# echo $?
0



## end. thanks for your time.
wolfy

wolfy

2011-07-20 10:50

developer   ~0013013

I could not reproduce on a freshly installed C5.6/x86_64

[root@pc68 ~]# rpm -q perl --qf "%{name}-%{version}.%{release}.%{arch}\n"
perl-5.8.8.32.el5_6.3.x86_64
perl-5.8.8.32.el5_6.3.i386

[root@pc68 ~]# perl -MCPAN -e "install Task::Weaken"
[..]
Running make for A/AD/ADAMK/Task-Weaken-1.04.tar.gz
  Is already unwrapped into directory /root/.cpan/build/Task-Weaken-1.04

  CPAN.pm: Going to build A/AD/ADAMK/Task-Weaken-1.04.tar.gz

cp lib/Task/Weaken.pm blib/lib/Task/Weaken.pm
Manifying blib/man3/Task::Weaken.3pm
  /usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/01_compile....ok
t/02_weaken.....ok
All tests successful.
Files=2, Tests=21, 0 wallclock secs ( 0.03 cusr + 0.01 csys = 0.04 CPU)
  /usr/bin/make test -- OK
Running make install
Installing /usr/lib/perl5/site_perl/5.8.8/Task/Weaken.pm
Installing /usr/share/man/man3/Task::Weaken.3pm
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
  /usr/bin/make install -- OK
range

range

2011-07-20 10:56

administrator   ~0013014

Same here.
clockworksoldier

clockworksoldier

2011-07-20 12:49

reporter   ~0013015

Sorry. My problem Seems to be related to a thrid party package. Very Sorry. ;-(

Comparing my workstation [fty] where Moose was previously fiddled with, with a pretty bare server [chewbag] - the cause becomes clear.

[fty ~]# cat tt.pl
##!/usr/bin/perl

    use Scalar::Util qw/weaken/;
      my $a;

    {
        my $b = "some very big thing";
        $a = \$b;

        weaken($a); # Make $a a weak reference
    }

    # $b has gone out of scope, since $a was a weak reference
    # $b can now be cleaned up and $a is set to undef


[fty ~]# perl ./tt.pl
weaken is only available with the XS version of Scalar::Util at ./tt.pl line 3
BEGIN failed--compilation aborted at ./tt.pl line 3.


[fty ~]# rpm -q perl-Task-Weaken --qf "%{name}-%{version}.%{release}.%{arch}\n"
perl-Task-Weaken-1.03.1.el5.rf.noarch
[fty ~]# ### this is broken

[fty ~]# rpm -qi perl-Task-Weaken
Name : perl-Task-Weaken Relocations: (not relocatable)
Version : 1.03 Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
Release : 1.el5.rf Build Date: Thu 18 Jun 2009 04:59:44 BST
Install Date: Fri 11 Feb 2011 16:48:42 GMT Build Host: lisse.hasselt.wieers.com
Group : Applications/CPAN Source RPM: perl-Task-Weaken-1.03-1.el5.rf.src.rpm
Size : 29721 License: Artistic/GPL
Signature : DSA/SHA1, Fri 19 Jun 2009 02:21:08 BST, Key ID a20e52146b8d79e6
Packager : Dag Wieers <dag@wieers.com>
URL : http://search.cpan.org/dist/Task-Weaken/
Summary : Ensure that a platform has weaken support
Description :
Ensure that a platform has weaken support.

After errant package is removed [fty] and a rollback to perl-5.8.8-32.el5_5.2.i386.rpm then a subsequent upgrade - fault remains.

-----------------------------

[chewbag ~]# rpm -q perl-Task-Weaken --qf "%{name}-%{version}.%{release}.%{arch}\n"
package perl-Task-Weaken is not installed
[chewbag ~]# ### this box is OK


Sorry, but thanks for yout time (I will try to be less excited next time).

Please close this ticket, because it is not a bug as I had initially thought.
herrold

herrold

2011-07-20 14:25

reporter   ~0013016

close per reporter request, as mis-filed

Issue History

Date Modified Username Field Change
2011-07-19 22:45 clockworksoldier New Issue
2011-07-19 22:45 clockworksoldier File Added: centos-5.6-perl-scalar_util_weaken-error-transcript.txt
2011-07-20 10:50 wolfy Note Added: 0013013
2011-07-20 10:56 range Note Added: 0013014
2011-07-20 12:49 clockworksoldier Note Added: 0013015
2011-07-20 14:25 herrold Note Added: 0013016
2011-07-20 14:25 herrold Status new => closed
2011-07-20 14:25 herrold Resolution open => no change required