Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Howdy Brethren,

I come to you with a confusion. I ocassionally use the wonderful Graph module. However, I've been unable to update to the most recent version (0.69), although I could install 0.68. The error message I get is a bit puzzling:

$ perl -w Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Graph Weak references are not implemented in the version of perl at (eval 13 +) line 1 You do not have Scalar::Util::weaken, cannot continue, aborting. # Looks like your test died before it could output anything.

This was puzzling, but I thought "hmm, I must be missing a module." But no, when I do:

$ perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.8) ReadLine support enabled cpan> cpan> install Scalar::Util CPAN: Storable loaded ok Going to read /db2/dlink/.cpan/Metadata Database was generated on Tue, 13 Dec 2005 01:06:49 GMT Scalar::Util is up to date.

Indeed, I found:

$ perl -MScalar::Util -e 'print $Scalar::Util::VERSION' 1.18

And here is my system-info:

$ perl -v This is perl, v5.8.7 built for aix Copyright 1987-2005, 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 ki +t. 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 Pa +ge. $ oslevel 5.2.0.0

Any guidance would be much appreciated!

Replies are listed 'Best First'.
Re: Graph 0.69 on AIX
by randyk (Parson) on Dec 13, 2005 at 15:48 UTC
    The relevant section of Graph's Makefile.PL:
    # Some Debian distributions have a broken List::Util # (see rt.cpan.org #9568) eval 'require Scalar::Util; import Scalar::Util qw(weaken)'; if ($@) { die <<__EOF__; $@ You do not have Scalar::Util::weaken, cannot continue, aborting. __EOF__ }
    and the referenced bug suggests that this check is to detect a broken List::Util installation. Try reinstalling List::Util manually and see if that helps.

      Ahh, thanks that does seem to set me on the right path. Wnen I try an install of List::Util I get:

      t/weak..........skipped all skipped: weaken requires XS version

      The full install log is below, but I'm not sure why I'm not installing the xs version -- the README and perldocs didn't suggest how to do so, and in Makefile.PL I only saw a reference to can_cc(), which I couldn't find any documentation on? Any more guidance on where I could go looking?

      Incidentally, for some silly reason its never occurred to me to look at the *code* that was giving the error, but that'll be a useful thing for debugging installs -- thanks!

      $ perl -w Makefile.PL Name "Module::Install::AUTOLOAD" used only once: possible typo at inc/ +Module/Install.pm - /home/gbarr/perl/Module/Install.pm line 172. Subroutine new redefined at inc/Module/Install/Base.pm - /home/gbarr/p +erl/Module/Install/Base.pm line 29. Subroutine AUTOLOAD redefined at inc/Module/Install/Base.pm - /home/gb +arr/perl/Module/Install/Base.pm line 47. Subroutine _top redefined at inc/Module/Install/Base.pm - /home/gbarr/ +perl/Module/Install/Base.pm line 58. Subroutine admin redefined at inc/Module/Install/Base.pm - /home/gbarr +/perl/Module/Install/Base.pm line 69. Subroutine is_admin redefined at inc/Module/Install/Base.pm - /home/gb +arr/perl/Module/Install/Base.pm line 74. Subroutine DESTROY redefined at inc/Module/Install/Base.pm - /home/gba +rr/perl/Module/Install/Base.pm line 79. Subroutine new redefined at inc/Module/Install/Base.pm - /home/gbarr/p +erl/Module/Install/Base.pm line 84. Subroutine AUTOLOAD redefined at inc/Module/Install/Base.pm - /home/gb +arr/perl/Module/Install/Base.pm line 85. Subroutine DESTROY redefined at inc/Module/Install/Base.pm - /home/gba +rr/perl/Module/Install/Base.pm line 86. Checking if your kit is complete... Looks good Writing Makefile for List::Util $ make cp lib/List/Util.pm blib/lib/List/Util.pm cp lib/Scalar/Util.pm blib/lib/Scalar/Util.pm /db2blast/Paul/perl5.8.7/bin/perl -Iinc -e 'use ExtUtils::Mksymlists; +\ Mksymlists("NAME" => "List::Util", "DL_FUNCS" => { }, "FUNCLIST" => [ +], "DL_VARS" => []);' /db2blast/Paul/perl5.8.7/bin/perl -Iinc /db2blast/Paul/perl5.8.7/lib/5 +.8.7/ExtUtils/xsubpp -typemap /db2blast/Paul/perl5.8.7/lib/5.8.7/Ext +Utils/typemap Util.xs > Util.xsc && mv Util.xsc Util.c gcc -c -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_D +LOPEN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGE_FILES +-O -DVERSION=\"1.18\" -DXS_VERSION=\"1.18\" "-I/db2blast/Paul/perl +5.8.7/lib/5.8.7/aix/CORE" -DPERL_EXT Util.c Running Mkbootstrap for List::Util () chmod 644 Util.bs rm -f blib/arch/auto/List/Util/Util.so gcc -Wl,-bhalt:4 -Wl,-bexpall -Wl,-G -Wl,-bnoentry -lc -L/usr/local/l +ib Util.o -o blib/arch/auto/List/Util/Util.so \ \ chmod 755 blib/arch/auto/List/Util/Util.so cp Util.bs blib/arch/auto/List/Util/Util.bs chmod 644 blib/arch/auto/List/Util/Util.bs Manifying blib/man3/List::Util.3 Manifying blib/man3/Scalar::Util.3 $ make test PERL_DL_NONLAZY=1 /db2blast/Paul/perl5.8.7/bin/perl "-MExtUtils::Comma +nd::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/00version.....ok t/blessed.......ok t/dualvar.......skipped all skipped: dualvar requires XS version t/first.........ok 2/17 skipped: Poor man's MULTICALL can't cope t/isvstring.....skipped all skipped: isvstring requires XS version t/lln...........ok t/max...........ok t/maxstr........ok t/min...........ok t/minstr........ok t/openhan.......ok t/p_blessed.....ok t/p_first.......ok t/p_lln.........ok t/p_max.........ok t/p_maxstr......ok t/p_min.........ok t/p_minstr......ok t/p_openhan.....ok t/p_readonly....ok t/p_reduce......ok t/p_refaddr.....ok t/p_reftype.....ok t/p_shuffle.....ok t/p_sum.........ok t/p_tainted.....ok t/proto.........skipped all skipped: set_prototype requires XS version t/readonly......ok t/reduce........ok 2/23 skipped: Poor man's MULTICALL can't cope t/refaddr.......ok t/reftype.......ok t/shuffle.......ok t/sum...........ok t/tainted.......ok t/weak..........skipped all skipped: weaken requires XS version All tests successful, 4 tests and 4 subtests skipped. Files=35, Tests=327, 3 wallclock secs ( 1.52 cusr + 1.49 csys = 3.0 +1 CPU)
        The full install log is below, but I'm not sure why I'm not installing the xs version -- the README and perldocs didn't suggest how to do so, and in Makefile.PL I only saw a reference to can_cc(), which I couldn't find any documentation on? Any more guidance on where I could go looking?
        The can_cc() routine referenced in the Makefile.PL refers to the included Module::Install::Can (a private helper module). For some reason this fails for you, which is why the XS version wasn't built. You might try building the package as
        perl Makefile.PL -xs
        which should override the setting returned by can_cc().