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

If I run this after nmake and nmake install on win32 (XP), compiled with VC++ 6.0 SP5 PP5:
C:\pkg\src>perl5.12.2 -le "print for @INC" C:\pkg\common\lib\perl5\site_perl/5.12.0\MSWin32-x86-multi-thread C:\pkg\common\lib\perl5\site_perl/5.12.0 C:\pkg\common\lib\perl5\site_perl/5.10.1 C:\pkg\common\lib\perl5\site_perl .

All it seems to be able to get is the dirs I set in inc_version_list (for the earlier version's site_perl lib dirs) and the contents of PERL5LIB env var, as well as . at the end. But it doesn't have C:\pkg\common\lib\perl5\5.12.2 or C:\pkg\common\lib\perl5\site_perl\5.12.2 in @INC, which are the primary lib dirs, so it can't even load Config.pm (so even perl -V croaks.)

All the /(install)?(arch|priv|site)lib.*/ entries in config.vc and equivalents in config_h.vc appear to be in order, so I really don't know what I could be missing that would result in the primary lib dirs not being in @INC.

Is there something that needs to be edited or executed that I could have missed. README.win32 doesn't seem to make any mention.

Thanks for any help.

Replies are listed 'Best First'.
Re: empty @INC in fresh compile of 5.12.2 on win32
by syphilis (Archbishop) on Oct 15, 2010 at 06:34 UTC
    All it seems to be able to get is the dirs I set in inc_version_list

    Ummm ... where/how is the setting of "inc_version_list" done ? (I'd be interested in trying to reproduce the problem, but I don't know what's entailed here. Is it just a matter of editing the inc_version_list entries in config.vc and config_H.vc before building ? Could it be that, if one does alter that value, then one is supposed to also specify the normal lib dirs as well ?)

    But it doesn't have C:\pkg\common\lib\perl5\5.12.2 or C:\pkg\common\lib\perl5\site_perl\5.12.2 in @INC

    From which I deduce that, in the Win32/Makefile, you've specified INST_ARCH    = \$(ARCHNAME)

    I really don't know what I could be missing that would result in the primary lib dirs not being in @INC

    It's interesting, however, that *one* of those directories (namely '.') is present.

    I would think you could get around the problem by prepending the 2 missing @INC locations to PERL5LIB ... but I guess that's not the point.

    Cheers,
    Rob
Re: empty @INC in fresh compile of 5.12.2 on win32
by Anonymous Monk on Oct 15, 2010 at 02:23 UTC
    If I run this after nmake and nmake install on win32 (XP), compiled with VC++ 6.0 SP5 PP5

    But what did you do before ? Please provide a diff ..... incpath

    C:\pkg\src>perl5.12.2 -le "print for @INC" C:\pkg\common\lib\perl5\site_perl/5.12.0\MSWin32-x86-multi-thread

    Which perl are you executing? The one you installed, or the one in the build directory?

      That output was from the one in the install directory. The one in the src dir gives the same thing, with one difference:

      C:/pkg/src/perl-5.12.2/lib just before C:\pkg\common\lib\perl5\site_perl/5.12.0\MSWin32-x86-multi-thread


      So basically, I can run

      C:\pkg\src\perl-5.12.2\perl.exe -V

      just fine, but running

      C:\pkg\all\perl-5.12.2\bin\MSWin32-x86-multi-thread\perl.exe -V

      results in:

      Can't locate Config.pm in @INC...


      Thanks for any more insight.