perl11 / cperl

A perl5 with classes, types, compilable, company friendly, security
http://perl11.org/
Other
142 stars 17 forks source link

Config.pm doesn't exist, when FindExt.pm is loaded in config_sh.PL on Win32 build #33

Closed bulk88 closed 9 years ago

bulk88 commented 9 years ago
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_EXTERNAL
_GLOB -DPERL_IS_MINIPERL -Fo.\mini\utf8.obj ..\utf8.c
utf8.c
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_EXTERNAL
_GLOB -DPERL_IS_MINIPERL -Fo.\mini\util.obj ..\util.c
util.c
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_EXTERNAL
_GLOB -DPERL_IS_MINIPERL -Fo.\mini\xsutils.obj ..\xsutils.c
xsutils.c
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_EXTERNAL
_GLOB -DPERL_IS_MINIPERL -Fo.\mini\miniperlmain.obj ..\miniperlmain.c
miniperlmain.c
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_EXTERNAL
_GLOB -DPERL_IS_MINIPERL -Fo.\mini\perlio.obj ..\perlio.c
perlio.c
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_IS_MINIP
ERL -Fo.\mini\win32.obj win32.c
win32.c
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_IS_MINIP
ERL -Fo.\mini\win32io.obj win32io.c
win32io.c
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_IS_MINIP
ERL -Fo.\mini\win32sck.obj win32sck.c
win32sck.c
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_IS_MINIP
ERL -Fo.\mini\win32thread.obj win32thread.c
win32thread.c
        cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT -DPERLDLL -DPERL_CORE   -O1 -MD -Zi -DNDEBUG -GL -DPERL_IS_MINIP
ERL -Fo.\mini\fcrypt.obj fcrypt.c
fcrypt.c
        link -out:..\miniperl.exe @C:\WINDOWS\TEMP\nm1EC0.tmp
Generating code
Finished generating code
LINK : warning LNK4089: all references to 'WS2_32.dll' discarded by /OPT:REF
        if exist ..\miniperl.exe.manifest mt -nologo -manifest ..\miniperl.exe.m
anifest -outputresource:..\miniperl.exe;1 &&  if exist ..\miniperl.exe.manifest
del ..\miniperl.exe.manifest
        ..\miniperl.exe -I..\lib -f ..\write_buildcustomize.pl ..
        copy config.vc config.w32
        1 file(s) copied.
        ..\miniperl.exe -I..\lib config_sh.PL "INST_TOP=c:\perl"
         "INST_VER="                     "INST_ARCH="            "archname=MSWin
32-x86-multi-thread"                     "cc=cl"
 "ld=link"                               "ccflags=-nologo -GF -W3 -O1 -MD -Zi -D
NDEBUG -GL -DWIN32 -D_CONSOLE -DNO_STRICT  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLIC
IT_CONTEXT -DPERL_IMPLICIT_SYS -D_USE_32BIT_TIME_T"      "usecplusplus="
         "cf_email="                     "d_mymalloc=undef"              "libs=o
ldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi3
2.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.l
ib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib"
                 "incpath=C:\Program Files\Microsoft Visual Studio .NET 2003\VC7
\include"                "libperl=perl523.lib"           "libpth=C:\Program File
s\Microsoft Visual Studio .NET 2003\VC7\lib;"    "libc=msvcrt.lib"
                 "make=nmake"                            "static_ext=Win32CORE"
         "usethreads=define"             "useithreads=define"            "usemul
tiplicity=define"                "use64bitint=undef"             "uselongdouble=
undef"                   "uselargefiles=define"  "usesitecustomize=undef"
 "LINK_FLAGS=-nologo -nodefaultlib -debug -opt:ref,icf -ltcg  -libpath:\"c:\perl
\lib\CORE\"  -machine:x86"               "optimize=-O1 -MD -Zi -DNDEBUG -GL"
         "WIN64=undef" config.w32 > ..\config.sh
Can't locate Config.pm in @INC (you may need to install the Config module) (@INC
 contains: C:\sources\cperl\lib C:\sources\cperl\cpan\AutoLoader\lib C:\sources\
cperl\dist\Carp\lib C:\sources\cperl\dist\PathTools C:\sources\cperl\dist\PathTo
ols\lib C:\sources\cperl\cpan\ExtUtils-Command\lib C:\sources\cperl\cpan\ExtUtil
s-Install\lib C:\sources\cperl\cpan\ExtUtils-MakeMaker\lib C:\sources\cperl\cpan
\ExtUtils-Manifest\lib C:\sources\cperl\cpan\File-Path\lib C:\sources\cperl\ext\
re C:\sources\cperl\dist\Term-ReadLine\lib C:\sources\cperl\dist\Exporter\lib C:
\sources\cperl\ext\File-Find\lib C:\sources\cperl\cpan\Text-Tabs\lib C:\sources\
cperl\dist\constant\lib C:\sources\cperl\cpan\Text-ParseWords\lib .) at FindExt.
pm line 7.
BEGIN failed--compilation aborted at FindExt.pm line 7.
Compilation failed in require at config_sh.PL line 3.
BEGIN failed--compilation aborted at config_sh.PL line 3.
NMAKE : fatal error U1077: '..\miniperl.exe' : return code '0x2'
Stop.

C:\sources\cperl\win32>

caused by https://github.com/perl11/cperl/commit/7c3330a48d8f0671c9d048d5b066b17177128a91

when 'config_sh.PL' runs during the Win32 build process, 'Config.pm' doesn't exist yet. static extensions list is passed on command line to 'config_sh.PL' from the d/n/gmake process. Static extension list can't be looked up from 'config.sh' since 'static_ext' from 'config.sh' would be the canned 'static_ext' from the canned 'config.sh' for miniperl which is always empty string when 'config_sh.PL' runs. I reverted https://github.com/perl11/cperl/commit/7c3330a48d8f0671c9d048d5b066b17177128a91 in my repo so I can continue the Win32 build but some other solution will be needed.

rurban commented 9 years ago

Oh, only that caused the problems? cool. But I am afraid. Who how are we going to know which is static or dynamic? Maybe generate FindExt.pm

Note: I haven't improved the win32 makefiles yet for missing Config, as I did with the unix Makefile.SH

rurban commented 9 years ago

Did you add the rules for the compiled Config also? Without you have only the old uncompiled lib/Config.pm, which I use for miniperl only

bulk88 commented 9 years ago

https://github.com/bulk88/cperl/commits/master see the commit called "Win32 build fixes", there is timestamp rebuild the world hell because Config.pm switch from mini Config.pm to XS Config.pm, and back to Config.pm then to XS Config.pm when rebuilding.

Maybe FindExt needs to do a BEGIN{eval {require Config;} $no_config = 1 if $@;} and just not read the static ext list if no Config and let it be inaccurate since static extensions list is not fetched from FindExt by config_sh.PL. Only at make_ext.pl time does FindExt's static list matter.

rurban commented 9 years ago

fixed with 47d5c1a, thanks!