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

I've heard module authors complain that Perlmonks isn't the place to post bug reports for modules, but I'm not convinced the problem is actually with this module, but rather, it's something wider, affecting more modules, and weirder.

Running CPAN.pm trying to "(n)make test" on Scalar-List-Utils-1.18, on [http://pxperl.com|PXPerl with MinGW's port of gcc 3.2.3, I get the following output (I stripped the irrelevant stuff, like listing the contents of the archive):

cp lib/List/Util.pm blib\lib\List\Util.pm cp lib/Scalar/Util.pm blib\lib\Scalar\Util.pm D:\PXPerl\bin\perl.exe -Iinc D:\PXPerl\lib\ExtUtils/xsubpp -t +ypemap D:\ PXPerl\lib\ExtUtils\typemap Util.xs > Util.xsc && D:\PXPerl\bin\perl. +exe -Iinc -MExtUtils::Command -e mv Util.xsc Util.c gcc -c -g -O3 -fno-strict-aliasing -Wall -Wno-comment -DWIN +32 -D_CONS OLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLI +CIT_SYS -D USE_PERLIO -DPERL_MSVCRT_READFIX -DVERSION=\"1.18\" -DXS_VERSION= +\"1.18\" - DHASATTRIBUTE "-ID:\PXPerl\lib\CORE" -DPERL_EXT Util.c Running Mkbootstrap for List::Util () D:\PXPerl\bin\perl.exe -Iinc -MExtUtils::Command -e chmod 644 +Util.bs D:\PXPerl\bin\perl.exe -Iinc -MExtUtils::Mksymlists -e "Mksym +lists('NAM E'=>\"List::Util\", 'DLBASE' => 'Util', 'DL_FUNCS' => { }, 'FUNCLIST' + => [], 'I MPORTS' => { }, 'DL_VARS' => []);" dlltool --def Util.def --output-exp dll.exp gcc -o blib\arch\auto\List\Util\Util.dll -Wl,--base-file -Wl,d +ll.base -m dll -s -LD:\PXPerl\lib\CORE Util.o -Wl,--image-base,0x7b100000 D:\PXP +erl\lib\CO RE\libperl58.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcom +dlg32 -lad vapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr - +lwinmm -lv ersion -lodbc32 -lodbccp32 -lshlwapi -lstdc++ dll.exp Util.o(.text+0x1f60): In function `XS_List__Util_shuffle': D:/PXPerl/.cpan/build/Scalar-List-Utils-1.18/Util.xs:333: undefined re +ference to `Perl_seed' NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code + '0x1' Stop. nmake -- NOT OK Running make test Can't test without successful make
I'll repeat the essential line, as it's drowning in the sea of verbosity:
D:/PXPerl/.cpan/build/Scalar-List-Utils-1.18/Util.xs:333: undefined re +ference to `Perl_seed'
I believe this is one of the functions from perl58.lib that is supposed to be available for the linker, but for some reason, it isn't. I've seen the same behaviour, for different symbols, in other modules. What's really weird is that this module, obviously, builds succesfully on other platforms. So, what's going on?

I've tried the same test build on ActivePerl 5.8.8 with MinGW. (Yes I know ActivePerl 5.8.8 comes with Scalar-List-Utils-1.18. This is just a test, mmmkay?) Now the results there are really puzzling.

CPAN.pm: Going to build G/GB/GBARR/Scalar-List-Utils-1.18.tar.gz Undefined subroutine &ActivePerl::Config::find_prog called at C:/Perl/ +site/lib/A ctivePerl/Config.pm line 70. Compilation failed in require at C:/Perl/lib/ExtUtils/MakeMaker.pm lin +e 7. BEGIN failed--compilation aborted at C:/Perl/lib/ExtUtils/MakeMaker.pm + line 7. Compilation failed in require at inc/Module/Install/Can.pm - /home/gba +rr/perl/Mo dule/Install/Can.pm line 8. BEGIN failed--compilation aborted at inc/Module/Install/Can.pm - /home +/gbarr/per l/Module/Install/Can.pm line 8. Compilation failed in require at inc/Module/Install.pm - /home/gbarr/p +erl/Module /Install.pm line 267. The 'can_cc' method does not exist in the 'inc' path! Please remove the 'inc' directory and run Makefile.PL again to load it +. Running make test Make had some problems, maybe interrupted? Won't test cpan>
WTF? I've checked ActivePerl::Config, line 70 is
if ($^O eq "MSWin32" && !find_prog(_orig_conf("cc"))) {
and further up, it contains the line
use ActiveState::Path qw(find_prog realpath);
In ActiveState::Path, find_prog is a plain and simple Perl sub. Both these modules seem to work normally, when I invoke them from the command line. Nothing weird in either. Neither depend on the module that I'm trying to build, which could have been a possible explanation. And yes, other XS modules appear to build normally.

I'd like some hints as to what is going on, and maybe get some help to construct proper bug reports.

Replies are listed 'Best First'.
Re: Weird problems building Scalar-List-Utils-1.18 on Win32+MinGW
by syphilis (Archbishop) on Jun 20, 2006 at 10:58 UTC
    No such problem with the same module on my MinGW/dmake-built perl 5.8.8 (built from CPAN source). It compiles and tests fine. Apart from the fact that I'm using 'dmake' and you're (apparently) using 'nmake', I'm also using MinGW's port of gcc-3.4.2 (as opposed to your gcc-3.2.3). I also steadfastly refuse to use CPAN.pm (as I've got enough to do without having to come to terms with CPAN.pm bugs/features). However, I'm not inclined to think that any of those differences accounts for the problem ... could this be a PXPerl issue ? (PXPerl is one of the many things that I know absolutely nothing about.)

    With ActiveState perl (build 817) I do, however, get exactly the same mind-numbing output as you reported ... but ... aaaarrgh ... this is one of those modules that wants to 'use inc::Module::Install' and there are problems with that wrt ActiveState perl. (ActiveState know about this - or at least Jan Dubois does. I spent some time digging around with this wrt PAR - not sure that I've fully recovered to the extent that I'm ready to re-visit the issue - see the thread "PAR problems" at http://www.mail-archive.com/par@perl.org/. The post at http://www.mail-archive.com/par@perl.org/msg02184.html is probably the most edifying of the posts within that thread - and should provide the fix. Let us know if it doesn't.)

    Cheers,
    Rob
Re: Weird problems building Scalar-List-Utils-1.18 on Win32+MinGW
by vkon (Curate) on Jun 20, 2006 at 10:40 UTC
    You're searching a very narrow audience: those who use pxperl, and compile by themselves, and try to resolve a possible bug in that core build of pxperl.

    From what I see, at the pxperl's site http://www.pxperl.com/ very first link contains comments and it is spammed (thus unsupported).
    More to say, it is in the same state for several months already.

    What I want to say, you'll most probably find and, may be, resolve an issue of pxperl itself.
    Why bother?

    Besides, you even did not specified version of perl.

    Better spend time with your own fresh build, where you have more under control, or use activestate's binaries.

    BR,
    Vadim.

      You're searching a very narrow audience: those who use pxperl, and compile by themselves, and try to resolve a possible bug in that core build of pxperl.
      No I'm not. Last time I got a similar problem with another module, I encountered the same problem with other perl builds on Win32. Including on ActivePerl, in that case it worked, er, better. There was no difference in building (or rather, trying to build) on ActivePerl and on PXPerl, for that module. Both fell flat in exactly the same way. Well, not here.

      I'm inviting everybody who can build modules on Win32 for any perl port, to check it out, and report here. I'm trying to establish a general picture here. Apparently not all symbols are exported everywhere. I'm wondering why.

        still, you did not showed perl -V or even perl version.
        I, personally, helped in resolving some bug of not included into the Perl linker symbol, for some perl.5.8.x version, but this is very version dependant.

        Try reproducing your error in other builds, including your own freshly created one.

        Besides, according to http://win32.perl.org/wiki/index.php?title=Win32_Distributions PXPerl is abandoned, so your audience is indeed very narrow.

Re: Weird problems building Scalar-List-Utils-1.18 on Win32+MinGW
by vkon (Curate) on Jun 20, 2006 at 17:01 UTC
    yes, I reproduced your problem with ActiveState perl.

    Indeed, you'll better report this to p5p.

    OTOH as this is CORE module, why you need rebuilding it in the first place?

    BTW when you will rebuild Perl on Win32 next time :), you'll edit "makedef.pl" first, to contain Perl_seed, so you'll have it exported next time :)
    This way export functions are added.

    But this bring me into misunderstanding a bit, how the Fine core perl built okay?

    BR,
    Vadim

Re: Weird problems building Scalar-List-Utils-1.18 on Win32+MinGW
by tsee (Curate) on Jun 21, 2006 at 10:00 UTC

    Hi Bart,

    The problem you are seeing on ActivePerl with Scalar-List-Utils is related to Module::Install pre 0.61 combined with a recent AS Perl (817 for sure, maybe earlier). I have reported the problem to the author, but he failed to release a new version with a more current Module::Install so far. See the corresponding RT ticket.

    For now, the solution is to send a mail to the maintainer and then locally install Module::Install from CPAN, delete inc/ in the unpacked Scalar-List-Utils distribution directory, run Makefile.PL and voila, it 'make's.

    HTH,
    Steffen

      I have been down this road before and submitted a bug report. The answer I recieved from ActiveState was just like above, upgrade Module::Install, because you get weird errors otherwise.

Re: Weird problems building Scalar-List-Utils-1.18 on Win32+MinGW
by vkon (Curate) on Jun 23, 2006 at 17:00 UTC
    have you reported this to p5p already, so you'll benefit when newer perl version will be released?