in reply to Perl Debug Build

Weak references are not implemented ...

Normally, that problem is related to a version of Scalar::Util that hasn't been built with XS support. Scalar::Util can in principle be built as a pure Perl module with restricted functionality (e.g. no weaken routine), or as the fully functioning XS version.  Storable's weak.t test loads Scalar::Util, which is where you're getting the error, because Scalar::Util realizes it doesn't have XS support and thus can't honor the import requests:

... require Scalar::Util; Scalar::Util->import(qw(weaken isweak)); # line 28 in weak.t if (grep { /weaken/ } @Scalar::Util::EXPORT_FAIL) { print("1..0 # Skip: No support for weaken in Scalar::Util\n"); exit 0; }

Now, the real question is, why do you have a non-XS Scalar::Util?  A couple of possible reasons:

So... What version(s) of Perl do you have on that machine? Which version are you trying to build with debug support? What were the configure options you used (post output of perl -V)? Any unusual messages/errors during configuring/building? Which platform are you on?

PS. see also Weak references are not implemented and Test::Deep - weak references are not implemented

Replies are listed 'Best First'.
Re^2: Perl Debug Build
by almond (Initiate) on Apr 27, 2009 at 12:05 UTC
    What version(s) of Perl do you have on that machine? -5.8.8
    Which version are you trying to build with debug support? 5.8.8
    What were the configure options you used (post output of perl -V)?
    $ ./perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=hpux, osvers=11.23, archname=IA64.ARCHREV_0-thread-multi uname='hp-ux myserver b.11.23 u ia64 0356346628 unlimited-user lic +ense ' config_args='-Dmksymlinks -DEBUGGING=both -ders -Dcc=cc -Dusethrea +ds -Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloc +libpth= -Dsh=/usr/bin/sh -Dd_attribut=undef -Dd_attribute_warn_unused +_result=undef -Dd_u32align=define -Aprepend:libswanted=cl -Dvendorpr +efix=/opt/perl_32 -Accflags=+DSitanium2 -Doptimize=-g -Accflags=+Z -A +ccflags=-DUSE_SITECUSTOMIZE -Duselargefiles -Accflags=-DNO_HASH_SEED +-Dprefix=/opt/perl_32 -Dinc_version_list=5.8.7/$archname 5.8.7 5.8.6/ +$archname 5.8.6 5.8.4/$archname 5.8.4 5.8.3/$archname 5.8.3 5.8.2/$ar +chname 5.8.2 5.8.1/$archname 5.8.1 5.8.0/$archname 5.8.0 -Dsed=/usr/b +in/sed -Duseshrplib -Dconfig_heavy=Config_dynamic.pl -Dlibpth=/usr/li +b/hpux32 -Dperladmin=abc@pqr.com -Dcf_email=abc@pqr.com -Dcf_by=Almon +d' . . .
    Any unusual messages/errors during configuring/building? No
    Which platform are you on? hp-ux 11.23 IA machine

      Please run the following command to find out where the Scalar/Util.pm is being loaded from, and if the corresponding Util.so is found:

      $ PERL_CORE=1 tusc ./perl ext/Storable/t/weak.t | grep Util

      This must be run from the main build directory, where the perl binary is located.

      The normal output from this - with a fully functioning Scalar::Util - would look like this:

      stat64("./Scalar/Util.pmc", 0x7fffdf30) ............. ... ERR#2 ENOENT stat64("./Scalar/Util.pm", 0x7fffdeb0) .............. ... ERR#2 ENOENT stat64("../lib/Scalar/Util.pmc", 0x7fffdf30) ........ ... ERR#2 ENOENT stat64("../lib/Scalar/Util.pm", 0x7fffdeb0) ......... ... = 0 open("../lib/Scalar/Util.pm", O_RDONLY|0x800, 0666) . ... = 4 stat64("./List/Util.pmc", 0x7fffdf30) ............... ... ERR#2 ENOENT stat64("./List/Util.pm", 0x7fffdeb0) ................ ... ERR#2 ENOENT stat64("../lib/List/Util.pmc", 0x7fffdf30) .......... ... ERR#2 ENOENT stat64("../lib/List/Util.pm", 0x7fffdeb0) ........... ... = 0 open("../lib/List/Util.pm", O_RDONLY|0x800, 0666) ... ... = 4 stat64("../lib/auto/List/Util/Util.so", 0x40011090) . ... = 0 stat64("../lib/auto/List/Util/Util.bs", 0x40011090) . ... = 0 open("../lib/auto/List/Util/Util.so", O_RDONLY, 0) .. ... = 4 open("../lib/auto/List/Util/Util.so", O_RDONLY, 0) .. ... = 4

      In case you don't get any output, make sure you can run the test itself (without tusc), i.e.

      $ PERL_CORE=1 ./perl ext/Storable/t/weak.t

      Alternatively, you could try to just load the module Scalar::Util and import weaken (output should be similar to above):

      $ tusc ./perl -I./lib -MScalar::Util=weaken -e1 | grep Util

      And if you find that you do have a Util.so, you might want to check whether it has been compiled properly (contains the required symbols):

      $ nm ./lib/auto/List/Util/Util.so | grep weak + [77] | 0| 0|FUNC |GLOB |0| UNDEF|Perl_sv_rvweak +en [102] | 67145504| 384|FUNC |GLOB |0| .text|XS_Scalar__Uti +l_isweak [66] | 67145184| 288|FUNC |GLOB |0| .text|XS_Scalar__Uti +l_weaken

      Also (just in case) you could check for other perls:

      $ find /opt/perl* -path "*bin/perl" $ find /opt/perl* -path "*bin/perl" -exec {} -v \; | grep 'is perl'

      ...because at least the code from Perl's Configure, which populates @inc_version_list, apparently did find directories for versions from 5.8.0 all through to 5.8.7.  This doesn't necessarily mean that all those are full installations, but it's at least a hint that there are - or have been - other versions of Perl on that machine, which might interfere under some circumstances (like PERL5LIB being set)...