http://www.perlmonks.org?node_id=865778


in reply to Re^6: empty @INC in fresh compile of 5.12.2 on win32
in thread empty @INC in fresh compile of 5.12.2 on win32

Wow sorry, I don't see anything troublesome now either.

Here is how I prep my version

perl -pi.orig -e " s!^#INST_VER!INST_VER! " win32/makefile.mk perl -pi.orig -e " s!^#INST_ARCH!INST_ARCH! " win32/makefile.mk perl -pi.orig -e " s!^#INST_VER!INST_VER! " win32/Makefile perl -pi.orig -e " s!^#INST_ARCH!INST_ARCH! " win32/Makefile perl -pi.orig -e " s!^USE_SITECUST\s*=.*$!USE_SITECUST *= undef! " win +32/makefile.mk perl -pi.orig -e " s!^USE_SITECUST\s*=.*$!USE_SITECUST = undef! " win3 +2/Makefile perl -pi.orig -e " s!^(LIBC\s+=\s+-lmsvcrt)!#$1! " win32/makefile.mk perl -pi.orig -e "s!^#EMAIL\s[^=].*$!EMAIL *= username\@localhost\ncf_ +by=username\ncf_email=username\@localhost!" win32/makefile.mk perl -pi.orig -e "s!^#EMAIL\s[^=].*$!EMAIL = username\@localhost\ncf_b +y=username\ncf_email=username\@localhost!" win32/Makefile perl -pi.orig -e "s!^\s+cf_email=\$\(EMAIL\)\s+~\s+\\$!\t\tcf_email=us +ername\@localhost\t\t~\t\\\n\t\tcf_by=username\t\t~\t\\!" win32/makef +ile.mk perl -pi.orig -e "s!^\s+\x22cf_email=\$\(EMAIL\)\x22\s+\\$!\t\t\x22cf_ +email=username\@localhost\x22\t\t\t\\\n\t\t\x22cf_by=username\x22\t\t +\t\\!" win32/Makefile perl -pi.orig -e "BEGIN{@ARGV=glob'win32/config.*'; } s!^((?:html(?:1d +ir(?:exp)?|3dir(?:exp)?)|install(?:html(?:help|[13])?|sitehtml[13]|ve +ndorhtml[13])dir|sitehtml(?:1dir(?:exp)?|3dir(?:exp)?)|vendorhtml(?:1 +dir(?:exp)?|3dir(?:exp)?)))=.*$!$1=''!" perl -pi.orig -e "BEGIN{@ARGV=glob'win32/config.*'; } s!^((?:install(? +:man[13]|siteman[13]|vendorman[13])dir|man(?:1(?:dir(?:exp)?|ext)|3(? +:dir(?:exp)?|ext))|s(?:iteman(?:1dir(?:exp)?|3dir(?:exp)?)|ysman)|ven +dorman(?:1dir(?:exp)?|3dir(?:exp)?)))=.*$!$1=''!" perl -pi.orig -e "s!^(\s+)perl (\$OPT.*)$!$1\$Config{perlpath} $2!" wi +n32/bin/pl2bat.pl perl -pi.orig -e "BEGIN{@ARGV=glob'win32/config.*'; } s!^sitescript=.* +$!sitescript='~INST_TOP~\\site~INST_VER~\\bin'!" perl -pi.orig -e "BEGIN{@ARGV=glob'win32/config.*'; } s!^installsitesc +ript=.*$!installsitescript='~INST_TOP~\\site~INST_VER~\\bin'!" del win32\bin\pl2bat.pl.orig del win32\*.orig REM ECHO git diff > ..\perl-5.12.2-diff.txt REM ECHO dmake -f makefile.mk all installbare REM ECHO nmake all installbare
the only thing you do differently is you use inc_version_list and build for 64bits using msvs6, where as I build for win32 using gcc (GCC) 3.4.5 (mingw-vista special r3)

Do you have "Software\Perl" in your registry? Did you run nmake test?

Your version doesn't even use win32_get_sitelib()

Hmm, that could be a problem update: yup, looks like its a bug in perl.c in S_init_perllib(pTHX)

#ifndef PRIVLIB_EXP # define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" #endif #if defined(WIN32) s = win32_get_privlib(PERL_FS_VERSION, &len); if (s) incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE) +; #else # ifdef NETWARE S_incpush_use_sep(aTHX_ PRIVLIB_EXP, 0, INCPUSH_CAN_RELOCATE); # else S_incpush_use_sep(aTHX_ STR_WITH_LEN(PRIVLIB_EXP), INCPUSH_CAN_REL +OCATE); # endif #endif
PRIVLIB_EXP isn't used when defined on win32

Heck, even SITELIB_EXP seems to be ignored

#ifdef SITELIB_EXP # if defined(WIN32) /* this picks up sitearch as well */ s = win32_get_sitelib(PERL_FS_VERSION, &len); if (s) incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOC +ATE); # else S_incpush_use_sep(aTHX_ STR_WITH_LEN(SITELIB_EXP), INCPUSH_CAN_REL +OCATE); # endif #endif
This looks very much geared toward ActivePerl, they don't compile using INST_VER/INST_VER, and they use the registry.